Commit 7bacdf07 authored by zYne's avatar zYne

--no commit message

--no commit message
parent a00c6061
......@@ -45,7 +45,69 @@ class Doctrine_AuditLog
{
$this->_table = $table;
}
/**
* __get
* an alias for getOption
*
* @param string $option
*/
public function __get($option)
{
if (isset($this->options[$option])) {
return $this->options[$option];
}
return null;
}
/**
* __isset
*
* @param string $option
*/
public function __isset($option)
{
return isset($this->options[$option]);
}
/**
* getOptions
* returns all options of this table and the associated values
*
* @return array all options and their values
*/
public function getOptions()
{
return $this->options;
}
/**
* setOption
* sets an option and returns this object in order to
* allow flexible method chaining
*
* @see slef::$_options for available options
* @param string $name the name of the option to set
* @param mixed $value the value of the option
* @return Doctrine_AuditLog this object
*/
public function setOption($name, $value)
{
if ( ! isset($this->_options[$name])) {
throw new Doctrine_Exception('Unknown option ' . $name);
}
$this->options[$name] = $value;
}
/**
* getOption
* returns the value of given option
*
* @param string $name the name of the option
* @return mixed the value of given option
*/
public function getOption($name)
{
if (isset($this->options[$name])) {
return $this->options[$name];
}
return null;
}
public function audit()
{
$conn = $this->_table->getConnection();
......
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