Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 protected function parentSchema()
 {
     if (!$this->builder->hasRecord($this->getParentClass()->getName())) {
         return null;
     }
     return $this->builder->record($this->getParentClass()->getName());
 }
 /**
  * Get RecordSchema to be associated with, method must throw an exception if outer record not
  * found.
  *
  * @return RecordSchema
  * @throws RelationSchemaException
  * @throws SchemaException
  * @throws RecordSchemaException
  */
 protected function outerRecord()
 {
     if (!$this->builder->hasRecord($this->target)) {
         throw new RelationSchemaException("Undefined outer record '{$this->target}' in relation '{$this->record}'.'{$this}'.");
     }
     return $this->builder->record($this->target);
 }