Skip to content

Commit

Permalink
autoloading, moving files around
Browse files Browse the repository at this point in the history
  • Loading branch information
salebab committed Sep 15, 2013
1 parent 2893f7d commit a3b9ab2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -157,4 +157,4 @@ Automatic determination of INSERT or UPDATE. If $data['user_id'] exits it will b
/* @var User[] $users Collection of User objects */
$users = $db->executeQuery("SELECT * FROM users")->fetchCollection(new User);

[See more examples for Sakila database](https://github.com/salebab/database/tree/master/sakila-examples)
[See more examples for Sakila database](https://github.com/salebab/database/tree/master/examples/sakila)
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,6 +16,6 @@
},

"autoload": {
"psr-0": {"database": "database/"}
"psr-0": {"database\\": "src/"}
}
}
13 changes: 0 additions & 13 deletions database/database.php

This file was deleted.

File renamed without changes.
@@ -1,6 +1,8 @@
<?php
include_once "_config.php";
include_once "../database/database.php";
include_once "../../src/database/DB.php";
include_once "../../src/database/Statement.php";
include_once "../../src/database/Query.php";

class Customer {}
class City {}
Expand Down
@@ -1,6 +1,9 @@
<?php
include_once "_config.php";
include_once "../database/database.php";
include_once "../../src/database/DB.php";
include_once "../../src/database/Statement.php";
include_once "../../src/database/Query.php";

$db = new database\DB(DB_DSN, DB_USER, DB_PASS);

class Film {
Expand Down
1 change: 0 additions & 1 deletion database/DB.php → src/database/DB.php
Expand Up @@ -319,7 +319,6 @@ function buildWhere($where, $operand = "AND")
*/
function createQuery()
{
include_once 'Query.php';
return new Query($this);
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a3b9ab2

Please sign in to comment.