Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 54 → Rev 53

/trunk/Model.php
17,7 → 17,7
*
* @type Table|string
*/
protected static $_persistentTable;
protected $_persistentTable;
 
/**
* The name(s) of the property or properties whose value(s)
57,22 → 57,20
 
public function getPersistentTable ()
{
$class = \get_class($this);
if (\is_string($class::$_persistentTable))
if (is_string($this->_persistentTable))
{
/* Call setter to convert to Table */
$this->setPersistentTable($class::$_persistentTable);
$this->persistentTable = $this->_persistentTable;
}
 
return $class::$_persistentTable;
return $this->_persistentTable;
}
 
public function setPersistentTable ($value)
{
$class = \get_class($this);
if ($value instanceof Table)
{
$class::$_persistentTable = $value;
$this->_persistentTable = $value;
}
else
{
85,7 → 83,7
);
}
 
$class::$_persistentTable = $table;
$this->_persistentTable = $table;
}
}
 
132,7 → 130,6
*/
public function find ()
{
$class = \get_class($this);
$result = $this->persistentTable->find($this->{$this->_persistentId});
if ($result)
{