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
5b594a54
Commit
5b594a54
authored
Jan 31, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some methods added
parent
42c7dd6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
Cache.php
lib/Doctrine/Cache.php
+23
-4
No files found.
lib/Doctrine/Cache.php
View file @
5b594a54
...
...
@@ -93,14 +93,33 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
{
return
array_pop
(
$this
->
_queries
);
}
/**
* reset
*
* removes all queries from the query stack
* @return void
*/
public
function
reset
()
{
$this
->
_queries
=
array
();
}
/**
* count
*
* @return integer the number of queries in the stack
* @return integer
the number of queries in the stack
*/
public
function
count
()
{
return
count
(
$this
->
_queries
);
return
count
(
$this
->
_queries
);
}
/**
* getIterator
*
* @return ArrayIterator an iterator that iterates through the query stack
*/
public
function
getIterator
()
{
return
new
ArrayIterator
(
$this
->
_queries
);
}
/**
* save
...
...
@@ -151,7 +170,7 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
}
public
function
onQuery
(
Doctrine_Db_Event
$event
)
{
$this
->
add
Query
(
$event
->
getQuery
(),
$event
->
getInvoker
()
->
getName
());
$this
->
add
(
$event
->
getQuery
(),
$event
->
getInvoker
()
->
getName
());
}
public
function
onPrePrepare
(
Doctrine_Db_Event
$event
)
...
...
@@ -178,6 +197,6 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite
}
public
function
onExecute
(
Doctrine_Db_Event
$event
)
{
$this
->
add
Query
(
$event
->
getQuery
(),
$event
->
getInvoker
()
->
getName
());
$this
->
add
(
$event
->
getQuery
(),
$event
->
getInvoker
()
->
getName
());
}
}
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