lithium\data\entity\Document::_relation PHP Method

_relation() protected method

Instantiates a new Document object as a descendant of the current object, and sets all default values and internal state.
protected _relation ( string $classType, string $key, array $data, array $options = [] ) : object
$classType string The type of class to create, either `'entity'` or `'set'`.
$key string The key name to which the related object is assigned.
$data array The internal data of the related object.
$options array Any other options to pass when instantiating the related object.
return object Returns a new `Document` object instance.
    protected function _relation($classType, $key, $data, $options = array())
    {
        return parent::_relation($classType, $key, $data, array('exists' => false) + $options);
    }