lithium\data\Collection::assignTo PHP Method

assignTo() public method

Configures protected properties of a Collection so that it is parented to $parent.
public assignTo ( object $parent, array $config = [] ) : void
$parent object
$config array
return void
    public function assignTo($parent, array $config = array())
    {
        foreach ($config as $key => $val) {
            $this->{'_' . $key} = $val;
        }
        $this->_parent =& $parent;
    }