import v1.0.0-RC4 | 2009-05-20
This commit is contained in:
24
libs/Monkeys/Db/Profiler.php
Executable file
24
libs/Monkeys/Db/Profiler.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
|
||||
* @license http://creativecommons.org/licenses/BSD/ BSD License
|
||||
* @author Keyboard Monkey Ltd
|
||||
* @since CommunityID 0.9
|
||||
* @package CommunityID
|
||||
* @packager Keyboard Monkeys
|
||||
*/
|
||||
|
||||
class Monkeys_Db_Profiler extends Zend_Db_Profiler
|
||||
{
|
||||
public function Monkeys_Db_Profiler()
|
||||
{
|
||||
parent::__construct(true);
|
||||
}
|
||||
|
||||
public function queryStart($queryText, $queryType = null)
|
||||
{
|
||||
Zend_Registry::get('logger')->log("DB QUERY: $queryText", Zend_Log::DEBUG);
|
||||
return parent::queryStart($queryText, $queryType);
|
||||
}
|
||||
}
|
18
libs/Monkeys/Db/Table/Gateway.php
Executable file
18
libs/Monkeys/Db/Table/Gateway.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
|
||||
* @license http://creativecommons.org/licenses/BSD/ BSD License
|
||||
* @author Keyboard Monkey Ltd
|
||||
* @since CommunityID 0.9
|
||||
* @package CommunityID
|
||||
* @packager Keyboard Monkeys
|
||||
*/
|
||||
|
||||
abstract class Monkeys_Db_Table_Gateway extends Zend_Db_Table_Abstract
|
||||
{
|
||||
public function getRowInstance($id)
|
||||
{
|
||||
return $this->fetchRow($this->select()->where('id = ?', $id));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user