Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
0ef216a9
Commit
0ef216a9
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved more files to TODO
parent
18ec38ee
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
18 additions
and
249 deletions
+18
-249
Doctrine.php
lib/Doctrine.php
+2
-2
Hook.php
lib/Doctrine/Hook.php
+0
-231
Export.php
lib/Doctrine/ORM/Export/Export.php
+2
-2
Import.php
lib/Doctrine/ORM/Import/Import.php
+2
-2
File.php
lib/Doctrine/TODO/File.php
+0
-0
FileFinder.php
lib/Doctrine/TODO/FileFinder.php
+0
-0
Formatter.php
lib/Doctrine/TODO/Formatter.php
+0
-0
I18n.php
lib/Doctrine/TODO/I18n.php
+0
-0
Inflector.php
lib/Doctrine/TODO/Inflector.php
+2
-2
Lib.php
lib/Doctrine/TODO/Lib.php
+2
-2
Log.php
lib/Doctrine/TODO/Log.php
+0
-0
Migration.php
lib/Doctrine/TODO/Migration.php
+0
-0
Node.php
lib/Doctrine/TODO/Node.php
+2
-2
Pager.php
lib/Doctrine/TODO/Pager.php
+0
-0
Parser.php
lib/Doctrine/TODO/Parser.php
+0
-0
Search.php
lib/Doctrine/TODO/Search.php
+0
-0
Task.php
lib/Doctrine/TODO/Task.php
+0
-0
Template.php
lib/Doctrine/TODO/Template.php
+0
-0
Tree.php
lib/Doctrine/TODO/Tree.php
+2
-2
Util.php
lib/Doctrine/TODO/Util.php
+0
-0
Validator.php
lib/Doctrine/TODO/Validator.php
+2
-2
View.php
lib/Doctrine/TODO/View.php
+2
-2
No files found.
lib/Doctrine.php
View file @
0ef216a9
...
@@ -1162,7 +1162,7 @@ final class Doctrine
...
@@ -1162,7 +1162,7 @@ final class Doctrine
*/
*/
public
static
function
tableize
(
$className
)
public
static
function
tableize
(
$className
)
{
{
return
Doctrine_Inflector
::
tableize
(
$className
);
return
Doctrine_
TODO_
Inflector
::
tableize
(
$className
);
}
}
/**
/**
...
@@ -1175,6 +1175,6 @@ final class Doctrine
...
@@ -1175,6 +1175,6 @@ final class Doctrine
*/
*/
public
static
function
classify
(
$tableName
)
public
static
function
classify
(
$tableName
)
{
{
return
Doctrine_Inflector
::
classify
(
$tableName
);
return
Doctrine_
TODO_
Inflector
::
classify
(
$tableName
);
}
}
}
}
\ No newline at end of file
lib/Doctrine/Hook.php
deleted
100644 → 0
View file @
18ec38ee
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
/**
* Doctrine_Hook
*
* @package Doctrine
* @subpackage Hook
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @todo May be no longer useful and can be removed later.
*/
class
Doctrine_Hook
{
/**
* @var Doctrine_Query $query the base query
*/
protected
$query
;
/**
* @var array $joins the optional joins of the base query
*/
protected
$joins
;
/**
* @var array $hooks hooks array
*/
protected
$hooks
=
array
(
'where'
,
'orderby'
,
'limit'
,
'offset'
);
/**
* @var array $fieldParsers custom field parsers array
* keys as field names in the format componentAlias.FieldName
* values as parser names / objects
*/
protected
$fieldParsers
=
array
();
/**
* @var array $typeParsers type parsers array
* keys as type names and values as parser names / objects
*/
protected
$typeParsers
=
array
(
'char'
=>
'Doctrine_Hook_WordLike'
,
'string'
=>
'Doctrine_Hook_WordLike'
,
'varchar'
=>
'Doctrine_Hook_WordLike'
,
'integer'
=>
'Doctrine_Hook_Integer'
,
'enum'
=>
'Doctrine_Hook_Integer'
,
'time'
=>
'Doctrine_Hook_Time'
,
'date'
=>
'Doctrine_Hook_Date'
,
);
/**
* @param Doctrine_Query $query the base query
*/
public
function
__construct
(
$query
)
{
if
(
is_string
(
$query
))
{
$this
->
query
=
new
Doctrine_Query
();
$this
->
query
->
parseQuery
(
$query
);
}
elseif
(
$query
instanceof
Doctrine_Query
)
{
$this
->
query
=
$query
;
}
else
{
throw
new
Doctrine_Exception
(
'Constructor argument should be either Doctrine_Query object or valid DQL query'
);
}
$this
->
query
->
getQuery
();
}
/**
* getQuery
*
* @return Doctrine_Query returns the query object associated with this hook
*/
public
function
getQuery
()
{
return
$this
->
query
;
}
/**
* setTypeParser
*
* @param string $type type name
* @param string|object $parser parser name or custom parser object
*/
public
function
setTypeParser
(
$type
,
$parser
)
{
$this
->
typeParsers
[
$type
]
=
$parser
;
}
/**
* setFieldParser
*
* @param string $field field name
* @param string|object $parser parser name or custom parser object
*/
public
function
setFieldParser
(
$field
,
$parser
)
{
$this
->
fieldParsers
[
$field
]
=
$parser
;
}
/**
* hookWhere
* builds DQL query where part from given parameter array
*
* @param array $params an associative array containing field
* names and their values
* @return boolean whether or not the hooking was
*/
public
function
hookWhere
(
$params
)
{
if
(
!
is_array
(
$params
))
{
return
false
;
}
foreach
(
$params
as
$name
=>
$value
)
{
if
(
$value
===
''
||
$value
===
'-'
)
{
continue
;
}
$e
=
explode
(
'.'
,
$name
);
if
(
count
(
$e
)
==
2
)
{
list
(
$alias
,
$column
)
=
$e
;
$map
=
$this
->
query
->
getAliasDeclaration
(
$alias
);
$table
=
$map
[
'table'
];
if
(
!
$table
)
{
throw
new
Doctrine_Exception
(
'Unknown alias '
.
$alias
);
}
if
(
$def
=
$table
->
getDefinitionOf
(
$column
))
{
$def
[
0
]
=
gettype
(
$value
);
if
(
isset
(
$this
->
typeParsers
[
$def
[
0
]]))
{
$name
=
$this
->
typeParsers
[
$def
[
0
]];
$parser
=
new
$name
;
}
$parser
->
parse
(
$alias
,
$column
,
$value
);
$this
->
query
->
addWhere
(
$parser
->
getCondition
(),
$parser
->
getParams
());
}
}
}
return
true
;
}
/**
* hookOrderBy
* builds DQL query orderby part from given parameter array
*
* @param array $params an array containing all fields which the built query
* should be ordered by
* @return boolean whether or not the hooking was successful
*/
public
function
hookOrderby
(
$params
)
{
if
(
!
is_array
(
$params
))
{
return
false
;
}
foreach
(
$params
as
$name
)
{
$e
=
explode
(
' '
,
$name
);
$order
=
'ASC'
;
if
(
count
(
$e
)
>
1
)
{
$order
=
(
$e
[
1
]
==
'DESC'
)
?
'DESC'
:
'ASC'
;
}
$e
=
explode
(
'.'
,
$e
[
0
]);
if
(
count
(
$e
)
==
2
)
{
list
(
$alias
,
$column
)
=
$e
;
$map
=
$this
->
query
->
getAliasDeclaration
(
$alias
);
$table
=
$map
[
'table'
];
if
(
$def
=
$table
->
getDefinitionOf
(
$column
))
{
$this
->
query
->
addOrderBy
(
$alias
.
'.'
.
$column
.
' '
.
$order
);
}
}
}
return
true
;
}
/**
* set the hook limit
*
* @param integer $limit
* @return void
*/
public
function
hookLimit
(
$limit
)
{
$this
->
query
->
limit
((
int
)
$limit
);
}
/**
* set the hook offset
*
* @param integer $offset
*/
public
function
hookOffset
(
$offset
)
{
$this
->
query
->
offset
((
int
)
$offset
);
}
}
lib/Doctrine/Export.php
→
lib/Doctrine/
ORM/Export/
Export.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Export.php 4805 2008-08-25 19:11:58Z subzero2000
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4805
$
* @todo Rename to ExportManager. Subclasses: MySqlExportManager, PgSqlExportManager etc.
* @todo Rename to ExportManager. Subclasses: MySqlExportManager, PgSqlExportManager etc.
*/
*/
class
Doctrine_Export
extends
Doctrine_Connection_Module
class
Doctrine_Export
extends
Doctrine_Connection_Module
...
...
lib/Doctrine/Import.php
→
lib/Doctrine/
ORM/Import/
Import.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Import.php 4866 2008-08-31 18:27:16Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4866
$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com>
* @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com>
*/
*/
...
...
lib/Doctrine/File.php
→
lib/Doctrine/
TODO/
File.php
View file @
0ef216a9
File moved
lib/Doctrine/FileFinder.php
→
lib/Doctrine/
TODO/
FileFinder.php
View file @
0ef216a9
File moved
lib/Doctrine/Formatter.php
→
lib/Doctrine/
TODO/
Formatter.php
View file @
0ef216a9
File moved
lib/Doctrine/I18n.php
→
lib/Doctrine/
TODO/
I18n.php
View file @
0ef216a9
File moved
lib/Doctrine/Inflector.php
→
lib/Doctrine/
TODO/
Inflector.php
View file @
0ef216a9
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
* @version $Revision: 3189 $
* @version $Revision: 3189 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
*/
class
Doctrine_Inflector
class
Doctrine_
TODO_
Inflector
{
{
/**
/**
* pluralize
* pluralize
...
@@ -207,7 +207,7 @@ class Doctrine_Inflector
...
@@ -207,7 +207,7 @@ class Doctrine_Inflector
*/
*/
public
static
function
classify
(
$word
)
public
static
function
classify
(
$word
)
{
{
return
preg_replace_callback
(
'~(_?)(_)([\w])~'
,
array
(
"Doctrine_Inflector"
,
"classifyCallback"
),
ucfirst
(
strtolower
(
$word
)));
return
preg_replace_callback
(
'~(_?)(_)([\w])~'
,
array
(
"Doctrine_
TODO_
Inflector"
,
"classifyCallback"
),
ucfirst
(
strtolower
(
$word
)));
}
}
/**
/**
...
...
lib/Doctrine/Lib.php
→
lib/Doctrine/
TODO/
Lib.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Lib.php 4523 2008-06-15 15:56:28Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4523
$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @todo Split into DBAL/ORM parts. DBAL class goes into Doctrine::DBAL::Tools
* @todo Split into DBAL/ORM parts. DBAL class goes into Doctrine::DBAL::Tools
*/
*/
...
...
lib/Doctrine/Log.php
→
lib/Doctrine/
TODO/
Log.php
View file @
0ef216a9
File moved
lib/Doctrine/Migration.php
→
lib/Doctrine/
TODO/
Migration.php
View file @
0ef216a9
File moved
lib/Doctrine/Node.php
→
lib/Doctrine/
TODO/
Node.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Node.php 4364 2008-05-13 21:20:34Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4364
$
* @author Joe Simms <joe.simms@websites4.com>
* @author Joe Simms <joe.simms@websites4.com>
*/
*/
class
Doctrine_Node
implements
IteratorAggregate
class
Doctrine_Node
implements
IteratorAggregate
...
...
lib/Doctrine/Pager.php
→
lib/Doctrine/
TODO/
Pager.php
View file @
0ef216a9
File moved
lib/Doctrine/Parser.php
→
lib/Doctrine/
TODO/
Parser.php
View file @
0ef216a9
File moved
lib/Doctrine/Search.php
→
lib/Doctrine/
TODO/
Search.php
View file @
0ef216a9
File moved
lib/Doctrine/Task.php
→
lib/Doctrine/T
ODO/T
ask.php
View file @
0ef216a9
File moved
lib/Doctrine/Template.php
→
lib/Doctrine/T
ODO/T
emplate.php
View file @
0ef216a9
File moved
lib/Doctrine/Tree.php
→
lib/Doctrine/T
ODO/T
ree.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Tree.php 4699 2008-07-20 20:13:24Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4699
$
* @author Joe Simms <joe.simms@websites4.com>
* @author Joe Simms <joe.simms@websites4.com>
* @todo Move to NestedSet behavior.
* @todo Move to NestedSet behavior.
*/
*/
...
...
lib/Doctrine/Util.php
→
lib/Doctrine/
TODO/
Util.php
View file @
0ef216a9
File moved
lib/Doctrine/Validator.php
→
lib/Doctrine/
TODO/
Validator.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: Validator.php 4699 2008-07-20 20:13:24Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4699
$
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @todo Move to validator package.
* @todo Move to validator package.
...
...
lib/Doctrine/View.php
→
lib/Doctrine/
TODO/
View.php
View file @
0ef216a9
<?php
<?php
/*
/*
* $Id$
* $Id
: View.php 4456 2008-05-30 12:09:24Z romanb
$
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.phpdoctrine.org
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision
: 4456
$
* @todo Maybe needs a reworked implementation and a new place.
* @todo Maybe needs a reworked implementation and a new place.
*/
*/
class
Doctrine_View
class
Doctrine_View
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment