Commit 0d5b4493 authored by zYne's avatar zYne

formatting fix

parent ee07246d
...@@ -50,30 +50,34 @@ class Doctrine_Event ...@@ -50,30 +50,34 @@ class Doctrine_Event
const UPDATE = 13; const UPDATE = 13;
const INSERT = 14; const INSERT = 14;
/** /**
* @var mixed $invoker the handler which invoked this event * @var mixed $_invoker the handler which invoked this event
*/ */
protected $invoker; protected $_invoker;
/** /**
* @var string $query the sql query associated with this event (if any) * @var string $_query the sql query associated with this event (if any)
*/ */
protected $query; protected $_query;
/** /**
* @var string $params the parameters associated with the query (if any) * @var string $_params the parameters associated with the query (if any)
*/ */
protected $params; protected $_params;
/** /**
* @see Doctrine_Event constants * @see Doctrine_Event constants
* @var integer $code the event code * @var integer $_code the event code
*/ */
protected $code; protected $_code;
/** /**
* @var integer $startedMicrotime the time point in which this event was started * @var integer $_startedMicrotime the time point in which this event was started
*/ */
protected $startedMicrotime; protected $_startedMicrotime;
/** /**
* @var integer $endedMicrotime the time point in which this event was ended * @var integer $_endedMicrotime the time point in which this event was ended
*/ */
protected $endedMicrotime; protected $_endedMicrotime;
/**
* @var boolean $skipOperation
*/
protected $_skipOperation = false;
/** /**
* constructor * constructor
* *
...@@ -83,10 +87,10 @@ class Doctrine_Event ...@@ -83,10 +87,10 @@ class Doctrine_Event
*/ */
public function __construct($invoker, $code, $query = null, $params = array()) public function __construct($invoker, $code, $query = null, $params = array())
{ {
$this->invoker = $invoker; $this->_invoker = $invoker;
$this->code = $code; $this->_code = $code;
$this->query = $query; $this->_query = $query;
$this->params = $params; $this->_params = $params;
} }
/** /**
* getQuery * getQuery
...@@ -95,7 +99,7 @@ class Doctrine_Event ...@@ -95,7 +99,7 @@ class Doctrine_Event
*/ */
public function getQuery() public function getQuery()
{ {
return $this->query; return $this->_query;
} }
/** /**
* getName * getName
...@@ -105,7 +109,7 @@ class Doctrine_Event ...@@ -105,7 +109,7 @@ class Doctrine_Event
*/ */
public function getName() public function getName()
{ {
switch ($this->code) { switch ($this->_code) {
case self::QUERY: case self::QUERY:
return 'query'; return 'query';
case self::EXEC: case self::EXEC:
...@@ -131,7 +135,7 @@ class Doctrine_Event ...@@ -131,7 +135,7 @@ class Doctrine_Event
*/ */
public function getCode() public function getCode()
{ {
return $this->code; return $this->_code;
} }
/** /**
* start * start
...@@ -141,7 +145,7 @@ class Doctrine_Event ...@@ -141,7 +145,7 @@ class Doctrine_Event
*/ */
public function start() public function start()
{ {
$this->startedMicrotime = microtime(true); $this->_startedMicrotime = microtime(true);
} }
/** /**
* hasEnded * hasEnded
...@@ -151,7 +155,7 @@ class Doctrine_Event ...@@ -151,7 +155,7 @@ class Doctrine_Event
*/ */
public function hasEnded() public function hasEnded()
{ {
return ($this->endedMicrotime != null); return ($this->_endedMicrotime != null);
} }
/** /**
* end * end
...@@ -161,7 +165,7 @@ class Doctrine_Event ...@@ -161,7 +165,7 @@ class Doctrine_Event
*/ */
public function end() public function end()
{ {
$this->endedMicrotime = microtime(true); $this->_endedMicrotime = microtime(true);
} }
/** /**
* getInvoker * getInvoker
...@@ -171,7 +175,7 @@ class Doctrine_Event ...@@ -171,7 +175,7 @@ class Doctrine_Event
*/ */
public function getInvoker() public function getInvoker()
{ {
return $this->invoker; return $this->_invoker;
} }
/** /**
* getParams * getParams
...@@ -181,7 +185,7 @@ class Doctrine_Event ...@@ -181,7 +185,7 @@ class Doctrine_Event
*/ */
public function getParams() public function getParams()
{ {
return $this->params; return $this->_params;
} }
/** /**
* Get the elapsed time (in microseconds) that the event ran. If the event has * Get the elapsed time (in microseconds) that the event ran. If the event has
...@@ -191,9 +195,9 @@ class Doctrine_Event ...@@ -191,9 +195,9 @@ class Doctrine_Event
*/ */
public function getElapsedSecs() public function getElapsedSecs()
{ {
if (is_null($this->endedMicrotime)) { if (is_null($this->_endedMicrotime)) {
return false; return false;
} }
return ($this->endedMicrotime - $this->startedMicrotime); return ($this->_endedMicrotime - $this->_startedMicrotime);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment