/** * Instantiates a new `Document` object as a descendant of the current object, and sets all * default values and internal state. * * @param string $classType The type of class to create, either `'entity'` or `'set'`. * @param string $key The key name to which the related object is assigned. * @param array $data The internal data of the related object. * @param array $options 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()) { $options['exists'] = false; return parent::_relation($classType, $key, $data, $options); }
/** * Instantiates a new `Document` object as a descendant of the current object, and sets all * default values and internal state. * * @param string $classType The type of class to create, either `'entity'` or `'set'`. * @param string $key The key name to which the related object is assigned. * @param array $data The internal data of the related object. * @param array $options 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); }