Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 62 → Rev 63

/trunk/AbstractModel.php
26,14 → 26,20
/**
* Creates a new model object
*
* @param array $data Initialization data (optional)
* @param array $mapping Mapping for initialization data (optional)
* @param array $data
* Initialization data (optional)
* @param array $mapping
* Mapping for initialization data (optional)
* @param bool $exclusiveMapping
* Exclusive mapping (optional; default: inclusive)
* @see AbstractModel::map()
*/
protected function __construct (array $data = null, array $mapping = null)
protected function __construct (
array $data = null, array $mapping = null, $exclusiveMapping = false)
{
if (!is_null($data))
{
$this->map($data, $mapping);
$this->map($data, $mapping, $exclusiveMapping);
}
}
 
97,8 → 103,8
* <var>$mapping</var>, the value is mapped as if <var>$mapping</var>
* was <code>null</code>.</p>
* @param bool $exclusive = false
* <p>If <code>true</code>, <em>only</em> the keys of $data that are present
* in $mapping are mapped.</p>
* <p>If <code>true</code>, <em>only</em> the keys of <var>$data</var>
* that are present in <var>$mapping</var> are mapped.</p>
* @return AbstractModel
* The modified object
*/