コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function setPropertyValue($object, PropertyInterface $property, $value)
 {
     $config = $property->getConfig();
     if (isset($config['doctrine:reference'])) {
         $value = $this->getBySubject($value);
     }
     return parent::setPropertyValue($object, $property, $value);
 }
コード例 #2
0
ファイル: dba2rdfMapper.php プロジェクト: nemein/openpsa
 private function _get_fieldname($object, PropertyInterface $node)
 {
     $config = $node->getConfig();
     if (!array_key_exists('dba_name', $config)) {
         $fieldname = $node->getIdentifier();
     } else {
         $fieldname = $config['dba_name'];
     }
     if (!\midcom::get('dbfactory')->property_exists($object, $fieldname)) {
         throw new \midcom_error('Could not find property mapping for ' . $fieldname);
     }
     return $fieldname;
 }