Skip to content

Commit ebf4976

Browse files
committed
Fixing namespaces
1 parent 9d05ca7 commit ebf4976

26 files changed

+35
-82
lines changed

composer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "mouf/database.querywritter",
3-
"description": "TODO",
4-
"keywords": ["security", "user", "user management"],
5-
"homepage": "https://github.com/thecodingmachine/database.querywritter",
2+
"name": "mouf/database.querywriter",
3+
"description": "This package contains classes useful to generate SQL statements such as SELECT queries, etc...",
4+
"keywords": ["database", "query", "mouf"],
5+
"homepage": "https://github.com/thecodingmachine/database.querywriter",
66
"type": "library",
77
"license": "MIT",
88
"authors": [
@@ -13,7 +13,9 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.3.0"
16+
"php": ">=5.3.0",
17+
"mouf/database.dbconnection": "~2.0",
18+
"mouf/utils.common.connectioninterface": "~2.0"
1719
},
1820
"autoload": {
1921
"psr-0": {

package.xml

Lines changed: 0 additions & 49 deletions
This file was deleted.

Column.php renamed to src/Mouf/Database/QueryWriter/Column.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
namespace database\querywriter;
2+
namespace Mouf\Database\QueryWriter;
33

44
/**
55
* The Column class represents one or many columns to be retrieved in a SQL Select statement
@@ -50,7 +50,7 @@ public function __construct($tableName = null, $columnName = null, $alias = null
5050

5151
/**
5252
* (non-PHPdoc)
53-
* @see database\querywriter.SqlRenderInterface::toSql()
53+
* @see Mouf\Database\QueryWriter.SqlRenderInterface::toSql()
5454
*/
5555
public function toSql(\DB_ConnectionInterface $dbConnection) {
5656
$sql = "";

filters/AndFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/AndFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The AndFilter class translates into an "AND" SQL statement between many filters.
@@ -79,7 +79,7 @@ public function toSql(\DB_ConnectionInterface $dbConnection) {
7979
$filters_sql = array();
8080

8181
foreach ($this->filters as $filter) {
82-
if (!$filter instanceof \database\querywriter\filters\FilterInterface) {
82+
if (!$filter instanceof \Mouf\Database\QueryWriter\Filters\FilterInterface) {
8383
throw new \Exception("Error in AndFilter: One of the parameters is not a filter.");
8484
}
8585

filters/BetweenFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/BetweenFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The BetweenFilter class translates into an "BETWEEN" SQL statement.

filters/DifferentFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/DifferentFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The DifferentFilter class translates into an "<>" SQL statement (or a "IS NOT NULL" statement if the value to compare is null).

filters/EqualFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/EqualFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The EqualFilter class translates into an "=" SQL statement (or a "IS NULL" statement if the value to compare is null).

filters/FilterInterface.php renamed to src/Mouf/Database/QueryWriter/Filters/FilterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* Represents a SQL statement that can appear in a WHERE clause (or in a ON clause).
2424
*
2525
* @author David Negrier
2626
* @Component
2727
*/
28-
interface FilterInterface extends \database\querywriter\SqlRenderInterface {
28+
interface FilterInterface extends \Mouf\Database\QueryWriter\SqlRenderInterface {
2929

3030
/**
3131
* Returns the tables used in the filter in an array.

filters/GreaterFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/GreaterFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The GreaterFilter class translates into an ">" SQL statement.

filters/GreaterOrEqualFilter.php renamed to src/Mouf/Database/QueryWriter/Filters/GreaterOrEqualFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
namespace database\querywriter\filters;
20+
namespace Mouf\Database\QueryWriter\Filters;
2121

2222
/**
2323
* The GreaterOrEqualFilter class translates into an ">=" SQL statement.

0 commit comments

Comments
 (0)