Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 51 → Rev 52

/trunk/Model.php
1,6 → 1,6
<?php
 
require_once __DIR__ . '/AbstractModel.php';
namespace PointedEars\PHPX;
 
/**
* Abstract model class for Object-Relational Mapping
10,7 → 10,7
*
* @author Thomas Lahn
*/
abstract class Model extends AbstractModel
abstract class Model extends \PointedEars\PHPX\AbstractModel
{
/**
* The <code>Table</code> for instances of this model
69,11 → 69,11
else
{
$table = new $value();
if (!($table instanceof Table))
if (!($table instanceof Db\Table))
{
throw new \InvalidArgumentException(
'Expected Table instance or string for table name, saw '
. (\get_class($value) || \gettype($value))
'Parameter does not specify a subclass of \\PointedEars\\PHPX\\Table: '
. $value
);
}
 
125,7 → 125,7
public function find ()
{
$result = $this->persistentTable->find(
$this->{$this->__persistentId});
$this->{$this->_persistentId});
if ($result)
{
return $this->map($result);