Skip to content

Commit

Permalink
Add namespaces to library and use them in example
Browse files Browse the repository at this point in the history
  • Loading branch information
cybrox committed Apr 20, 2017
1 parent 5979dad commit c823d26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion example.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php

// Require source files
// Require source files (not needed if you use composer)
require 'src/crunchdb.class.php';
require 'src/crunchtable.class.php';
require 'src/crunchresource.class.php';

// Alias class accessor to omit namespace (optional)
use cybrox\crunchdb\crunchDB as crunchDB;

// Creating new cdb instance
$cdb = new crunchDB('./db/');

Expand Down
1 change: 1 addition & 0 deletions src/crunchdb.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Named after delicious cookies!
*/

namespace cybrox\crunchdb;

class crunchDB {

Expand Down
1 change: 1 addition & 0 deletions src/crunchresource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Named after delicious cookies!
*/

namespace cybrox\crunchdb;

class crunchResource {

Expand Down
1 change: 1 addition & 0 deletions src/crunchtable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Named after delicious cookies!
*/

namespace cybrox\crunchdb;

class crunchTable {

Expand Down

0 comments on commit c823d26

Please sign in to comment.