Queries the attribute for it's parent MetaModel instance.
public getMetaModel ( ) : MetaModels\IMetaModel | ||
리턴 | MetaModels\IMetaModel | the MetaModel instance. |
/** * Check the single attributes. * * @param IAttribute $latitudeAttribute The attribute to be checked. * * @param IAttribute $longitudeAttribute The attribute to be checked. * * @return void * * @throws \InvalidArgumentException If one of the attribute is not from type ISimple. */ private function checkSingleAttributes($latitudeAttribute, $longitudeAttribute) { // Check if both of the are simple if (!$latitudeAttribute instanceof ISimple || !$longitudeAttribute instanceof ISimple) { throw new \InvalidArgumentException('Only simple attributes are allowed.'); } if ($latitudeAttribute->getMetaModel() !== $longitudeAttribute->getMetaModel()) { throw new \InvalidArgumentException('The first and second attribute have to be from the same MetaModel.'); } }