Subversion Repositories PHPX

Compare Revisions

Last modification

Regard whitespace Rev 48 → Rev 49

/trunk/Db/Mapper.php
1,5 → 1,6
<?php
 
require_once __DIR__ . '/../AbstractModel.php';
require_once __DIR__ . '/Table.php';
 
/**
7,7 → 8,7
*
* @author Thomas Lahn
*/
abstract class Mapper
abstract class Mapper extends AbstractModel
{
/**
* Class name of the associated table model
64,6 → 65,16
}
/**
* Returns the <code>Table</code> for this object.
*
* @return Table
*/
public function getTable ()
{
return $this->getDbTable();
}
 
/**
* Sorts an array of objects by the property of the nested object.
* To be used with the u*sort() functions.
*
/trunk/AbstractModel.php
28,7 → 28,7
* @param array $data Initialization data (optional)
* @param array $mapping Mapping for initialization data (optional)
*/
public function __construct(array $data = null, array $mapping = null)
protected function __construct(array $data = null, array $mapping = null)
{
if (!is_null($data))
{
154,6 → 154,8
* @param bool $exclusive = false
* <p>If <code>true</code>, <em>only</em> the keys of $data that are present
* in $mapping are mapped.</p>
* @return AbstractModel
* The modified object
*/
public function map(array $data, array $mapping = null, $exclusive = false)
{
181,5 → 183,7
}
}
}
 
return $this;
}
}