コード例 #1
0
 /**
  * To check this relationship belongs to a specfic resource set, type 
  * and property
  * 
  * @param ResourceSet      $resourceSet      Resource set for the association
  *                                           end
  * @param ResourceType     $resourceType     Resource type for the association
  *                                           end
  * @param ResourceProperty $resourceProperty Resource property for the 
  *                                           association end
  * 
  * @return boolean
  */
 public function isBelongsTo(ResourceSet $resourceSet, ResourceType $resourceType, ResourceProperty $resourceProperty)
 {
     return strcmp($resourceSet->getName(), $this->_resourceSet->getName()) == 0 && $this->_resourceType->isAssignableFrom($resourceType) && (is_null($resourceProperty) && is_null($this->_resourceProperty) || !is_null($resourceProperty) && !is_null($this->_resourceProperty) && strcmp($resourceProperty->getName(), $this->_resourceProperty->getName()) == 0);
 }