public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } try { return call_user_func_array(array($this, 'QubitObject::__get'), $args); } catch (sfException $e) { } if ('relationI18ns' == $name) { if (!isset($this->refFkValues['relationI18ns'])) { if (!isset($this->id)) { $this->refFkValues['relationI18ns'] = QubitQuery::create(); } else { $this->refFkValues['relationI18ns'] = self::getrelationI18nsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['relationI18ns']; } try { if (1 > strlen($value = call_user_func_array(array($this->getCurrentrelationI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrentrelationI18n(array('sourceCulture' => true) + $options), '__get'), $args); } return $value; } catch (sfException $e) { } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }
public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } try { return call_user_func_array(array($this, 'QubitObject::__get'), $args); } catch (sfException $e) { } if ('physicalObjectsRelatedByparentId' == $name) { if (!isset($this->refFkValues['physicalObjectsRelatedByparentId'])) { if (!isset($this->id)) { $this->refFkValues['physicalObjectsRelatedByparentId'] = QubitQuery::create(); } else { $this->refFkValues['physicalObjectsRelatedByparentId'] = self::getphysicalObjectsRelatedByparentIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['physicalObjectsRelatedByparentId']; } if ('physicalObjectI18ns' == $name) { if (!isset($this->refFkValues['physicalObjectI18ns'])) { if (!isset($this->id)) { $this->refFkValues['physicalObjectI18ns'] = QubitQuery::create(); } else { $this->refFkValues['physicalObjectI18ns'] = self::getphysicalObjectI18nsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['physicalObjectI18ns']; } try { if (1 > strlen($value = call_user_func_array(array($this->getCurrentphysicalObjectI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrentphysicalObjectI18n(array('sourceCulture' => true) + $options), '__get'), $args); } return $value; } catch (sfException $e) { } if ('ancestors' == $name) { if (!isset($this->values['ancestors'])) { if ($this->new) { $this->values['ancestors'] = QubitQuery::create(array('self' => $this) + $options); } else { $criteria = new Criteria(); $this->addAncestorsCriteria($criteria); $this->addOrderByPreorder($criteria); $this->values['ancestors'] = self::get($criteria, array('self' => $this) + $options); } } return $this->values['ancestors']; } if ('descendants' == $name) { if (!isset($this->values['descendants'])) { if ($this->new) { $this->values['descendants'] = QubitQuery::create(array('self' => $this) + $options); } else { $criteria = new Criteria(); $this->addDescendantsCriteria($criteria); $this->addOrderByPreorder($criteria); $this->values['descendants'] = self::get($criteria, array('self' => $this) + $options); } } return $this->values['descendants']; } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }
public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } $offset = 0; foreach ($this->tables as $table) { foreach ($table->getColumns() as $column) { if ($name == $column->getPhpName()) { return $this->rowOffsetGet($name, $offset, $options); } if ("{$name}Id" == $column->getPhpName()) { $relatedTable = $column->getTable()->getDatabaseMap()->getTable($column->getRelatedTableName()); return call_user_func(array($relatedTable->getClassName(), 'getBy' . ucfirst($relatedTable->getColumn($column->getRelatedColumnName())->getPhpName())), $this->rowOffsetGet("{$name}Id", $offset, $options)); } $offset++; } } if ('propertyI18ns' == $name) { if (!isset($this->refFkValues['propertyI18ns'])) { if (!isset($this->id)) { $this->refFkValues['propertyI18ns'] = QubitQuery::create(); } else { $this->refFkValues['propertyI18ns'] = self::getpropertyI18nsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['propertyI18ns']; } try { if (1 > strlen($value = call_user_func_array(array($this->getCurrentpropertyI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrentpropertyI18n(array('sourceCulture' => true) + $options), '__get'), $args); } return $value; } catch (sfException $e) { } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }
public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } try { return call_user_func_array(array($this, 'QubitActor::__get'), $args); } catch (sfException $e) { } if ('aclPermissions' == $name) { if (!isset($this->refFkValues['aclPermissions'])) { if (!isset($this->id)) { $this->refFkValues['aclPermissions'] = QubitQuery::create(); } else { $this->refFkValues['aclPermissions'] = self::getaclPermissionsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['aclPermissions']; } if ('aclUserGroups' == $name) { if (!isset($this->refFkValues['aclUserGroups'])) { if (!isset($this->id)) { $this->refFkValues['aclUserGroups'] = QubitQuery::create(); } else { $this->refFkValues['aclUserGroups'] = self::getaclUserGroupsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['aclUserGroups']; } if ('notes' == $name) { if (!isset($this->refFkValues['notes'])) { if (!isset($this->id)) { $this->refFkValues['notes'] = QubitQuery::create(); } else { $this->refFkValues['notes'] = self::getnotesById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['notes']; } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }
public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } $offset = 0; foreach ($this->tables as $table) { foreach ($table->getColumns() as $column) { if ($name == $column->getPhpName()) { return $this->rowOffsetGet($name, $offset, $options); } if ("{$name}Id" == $column->getPhpName()) { $relatedTable = $column->getTable()->getDatabaseMap()->getTable($column->getRelatedTableName()); return call_user_func(array($relatedTable->getClassName(), 'getBy' . ucfirst($relatedTable->getColumn($column->getRelatedColumnName())->getPhpName())), $this->rowOffsetGet("{$name}Id", $offset, $options)); } $offset++; } } if ('oaiHarvests' == $name) { if (!isset($this->refFkValues['oaiHarvests'])) { if (!isset($this->id)) { $this->refFkValues['oaiHarvests'] = QubitQuery::create(); } else { $this->refFkValues['oaiHarvests'] = self::getoaiHarvestsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['oaiHarvests']; } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }
public function __get($name) { $args = func_get_args(); $options = array(); if (1 < count($args)) { $options = $args[1]; } try { return call_user_func_array(array($this, 'QubitObject::__get'), $args); } catch (sfException $e) { } if ('actorsRelatedByentityTypeId' == $name) { if (!isset($this->refFkValues['actorsRelatedByentityTypeId'])) { if (!isset($this->id)) { $this->refFkValues['actorsRelatedByentityTypeId'] = QubitQuery::create(); } else { $this->refFkValues['actorsRelatedByentityTypeId'] = self::getactorsRelatedByentityTypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['actorsRelatedByentityTypeId']; } if ('actorsRelatedBydescriptionStatusId' == $name) { if (!isset($this->refFkValues['actorsRelatedBydescriptionStatusId'])) { if (!isset($this->id)) { $this->refFkValues['actorsRelatedBydescriptionStatusId'] = QubitQuery::create(); } else { $this->refFkValues['actorsRelatedBydescriptionStatusId'] = self::getactorsRelatedBydescriptionStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['actorsRelatedBydescriptionStatusId']; } if ('actorsRelatedBydescriptionDetailId' == $name) { if (!isset($this->refFkValues['actorsRelatedBydescriptionDetailId'])) { if (!isset($this->id)) { $this->refFkValues['actorsRelatedBydescriptionDetailId'] = QubitQuery::create(); } else { $this->refFkValues['actorsRelatedBydescriptionDetailId'] = self::getactorsRelatedBydescriptionDetailIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['actorsRelatedBydescriptionDetailId']; } if ('digitalObjectsRelatedByusageId' == $name) { if (!isset($this->refFkValues['digitalObjectsRelatedByusageId'])) { if (!isset($this->id)) { $this->refFkValues['digitalObjectsRelatedByusageId'] = QubitQuery::create(); } else { $this->refFkValues['digitalObjectsRelatedByusageId'] = self::getdigitalObjectsRelatedByusageIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['digitalObjectsRelatedByusageId']; } if ('digitalObjectsRelatedBymediaTypeId' == $name) { if (!isset($this->refFkValues['digitalObjectsRelatedBymediaTypeId'])) { if (!isset($this->id)) { $this->refFkValues['digitalObjectsRelatedBymediaTypeId'] = QubitQuery::create(); } else { $this->refFkValues['digitalObjectsRelatedBymediaTypeId'] = self::getdigitalObjectsRelatedBymediaTypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['digitalObjectsRelatedBymediaTypeId']; } if ('events' == $name) { if (!isset($this->refFkValues['events'])) { if (!isset($this->id)) { $this->refFkValues['events'] = QubitQuery::create(); } else { $this->refFkValues['events'] = self::geteventsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['events']; } if ('functionsRelatedBytypeId' == $name) { if (!isset($this->refFkValues['functionsRelatedBytypeId'])) { if (!isset($this->id)) { $this->refFkValues['functionsRelatedBytypeId'] = QubitQuery::create(); } else { $this->refFkValues['functionsRelatedBytypeId'] = self::getfunctionsRelatedBytypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['functionsRelatedBytypeId']; } if ('functionsRelatedBydescriptionStatusId' == $name) { if (!isset($this->refFkValues['functionsRelatedBydescriptionStatusId'])) { if (!isset($this->id)) { $this->refFkValues['functionsRelatedBydescriptionStatusId'] = QubitQuery::create(); } else { $this->refFkValues['functionsRelatedBydescriptionStatusId'] = self::getfunctionsRelatedBydescriptionStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['functionsRelatedBydescriptionStatusId']; } if ('functionsRelatedBydescriptionDetailId' == $name) { if (!isset($this->refFkValues['functionsRelatedBydescriptionDetailId'])) { if (!isset($this->id)) { $this->refFkValues['functionsRelatedBydescriptionDetailId'] = QubitQuery::create(); } else { $this->refFkValues['functionsRelatedBydescriptionDetailId'] = self::getfunctionsRelatedBydescriptionDetailIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['functionsRelatedBydescriptionDetailId']; } if ('informationObjectsRelatedBylevelOfDescriptionId' == $name) { if (!isset($this->refFkValues['informationObjectsRelatedBylevelOfDescriptionId'])) { if (!isset($this->id)) { $this->refFkValues['informationObjectsRelatedBylevelOfDescriptionId'] = QubitQuery::create(); } else { $this->refFkValues['informationObjectsRelatedBylevelOfDescriptionId'] = self::getinformationObjectsRelatedBylevelOfDescriptionIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['informationObjectsRelatedBylevelOfDescriptionId']; } if ('informationObjectsRelatedBycollectionTypeId' == $name) { if (!isset($this->refFkValues['informationObjectsRelatedBycollectionTypeId'])) { if (!isset($this->id)) { $this->refFkValues['informationObjectsRelatedBycollectionTypeId'] = QubitQuery::create(); } else { $this->refFkValues['informationObjectsRelatedBycollectionTypeId'] = self::getinformationObjectsRelatedBycollectionTypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['informationObjectsRelatedBycollectionTypeId']; } if ('informationObjectsRelatedBydescriptionStatusId' == $name) { if (!isset($this->refFkValues['informationObjectsRelatedBydescriptionStatusId'])) { if (!isset($this->id)) { $this->refFkValues['informationObjectsRelatedBydescriptionStatusId'] = QubitQuery::create(); } else { $this->refFkValues['informationObjectsRelatedBydescriptionStatusId'] = self::getinformationObjectsRelatedBydescriptionStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['informationObjectsRelatedBydescriptionStatusId']; } if ('informationObjectsRelatedBydescriptionDetailId' == $name) { if (!isset($this->refFkValues['informationObjectsRelatedBydescriptionDetailId'])) { if (!isset($this->id)) { $this->refFkValues['informationObjectsRelatedBydescriptionDetailId'] = QubitQuery::create(); } else { $this->refFkValues['informationObjectsRelatedBydescriptionDetailId'] = self::getinformationObjectsRelatedBydescriptionDetailIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['informationObjectsRelatedBydescriptionDetailId']; } if ('notes' == $name) { if (!isset($this->refFkValues['notes'])) { if (!isset($this->id)) { $this->refFkValues['notes'] = QubitQuery::create(); } else { $this->refFkValues['notes'] = self::getnotesById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['notes']; } if ('objectTermRelations' == $name) { if (!isset($this->refFkValues['objectTermRelations'])) { if (!isset($this->id)) { $this->refFkValues['objectTermRelations'] = QubitQuery::create(); } else { $this->refFkValues['objectTermRelations'] = self::getobjectTermRelationsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['objectTermRelations']; } if ('otherNames' == $name) { if (!isset($this->refFkValues['otherNames'])) { if (!isset($this->id)) { $this->refFkValues['otherNames'] = QubitQuery::create(); } else { $this->refFkValues['otherNames'] = self::getotherNamesById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['otherNames']; } if ('physicalObjects' == $name) { if (!isset($this->refFkValues['physicalObjects'])) { if (!isset($this->id)) { $this->refFkValues['physicalObjects'] = QubitQuery::create(); } else { $this->refFkValues['physicalObjects'] = self::getphysicalObjectsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['physicalObjects']; } if ('relations' == $name) { if (!isset($this->refFkValues['relations'])) { if (!isset($this->id)) { $this->refFkValues['relations'] = QubitQuery::create(); } else { $this->refFkValues['relations'] = self::getrelationsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['relations']; } if ('repositorysRelatedBydescStatusId' == $name) { if (!isset($this->refFkValues['repositorysRelatedBydescStatusId'])) { if (!isset($this->id)) { $this->refFkValues['repositorysRelatedBydescStatusId'] = QubitQuery::create(); } else { $this->refFkValues['repositorysRelatedBydescStatusId'] = self::getrepositorysRelatedBydescStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['repositorysRelatedBydescStatusId']; } if ('repositorysRelatedBydescDetailId' == $name) { if (!isset($this->refFkValues['repositorysRelatedBydescDetailId'])) { if (!isset($this->id)) { $this->refFkValues['repositorysRelatedBydescDetailId'] = QubitQuery::create(); } else { $this->refFkValues['repositorysRelatedBydescDetailId'] = self::getrepositorysRelatedBydescDetailIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['repositorysRelatedBydescDetailId']; } if ('rightssRelatedBybasisId' == $name) { if (!isset($this->refFkValues['rightssRelatedBybasisId'])) { if (!isset($this->id)) { $this->refFkValues['rightssRelatedBybasisId'] = QubitQuery::create(); } else { $this->refFkValues['rightssRelatedBybasisId'] = self::getrightssRelatedBybasisIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['rightssRelatedBybasisId']; } if ('rightssRelatedByactId' == $name) { if (!isset($this->refFkValues['rightssRelatedByactId'])) { if (!isset($this->id)) { $this->refFkValues['rightssRelatedByactId'] = QubitQuery::create(); } else { $this->refFkValues['rightssRelatedByactId'] = self::getrightssRelatedByactIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['rightssRelatedByactId']; } if ('rightssRelatedBycopyrightStatusId' == $name) { if (!isset($this->refFkValues['rightssRelatedBycopyrightStatusId'])) { if (!isset($this->id)) { $this->refFkValues['rightssRelatedBycopyrightStatusId'] = QubitQuery::create(); } else { $this->refFkValues['rightssRelatedBycopyrightStatusId'] = self::getrightssRelatedBycopyrightStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['rightssRelatedBycopyrightStatusId']; } if ('statussRelatedBytypeId' == $name) { if (!isset($this->refFkValues['statussRelatedBytypeId'])) { if (!isset($this->id)) { $this->refFkValues['statussRelatedBytypeId'] = QubitQuery::create(); } else { $this->refFkValues['statussRelatedBytypeId'] = self::getstatussRelatedBytypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['statussRelatedBytypeId']; } if ('statussRelatedBystatusId' == $name) { if (!isset($this->refFkValues['statussRelatedBystatusId'])) { if (!isset($this->id)) { $this->refFkValues['statussRelatedBystatusId'] = QubitQuery::create(); } else { $this->refFkValues['statussRelatedBystatusId'] = self::getstatussRelatedBystatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['statussRelatedBystatusId']; } if ('termsRelatedByparentId' == $name) { if (!isset($this->refFkValues['termsRelatedByparentId'])) { if (!isset($this->id)) { $this->refFkValues['termsRelatedByparentId'] = QubitQuery::create(); } else { $this->refFkValues['termsRelatedByparentId'] = self::gettermsRelatedByparentIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['termsRelatedByparentId']; } if ('termI18ns' == $name) { if (!isset($this->refFkValues['termI18ns'])) { if (!isset($this->id)) { $this->refFkValues['termI18ns'] = QubitQuery::create(); } else { $this->refFkValues['termI18ns'] = self::gettermI18nsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['termI18ns']; } if ('accessionsRelatedByacquisitionTypeId' == $name) { if (!isset($this->refFkValues['accessionsRelatedByacquisitionTypeId'])) { if (!isset($this->id)) { $this->refFkValues['accessionsRelatedByacquisitionTypeId'] = QubitQuery::create(); } else { $this->refFkValues['accessionsRelatedByacquisitionTypeId'] = self::getaccessionsRelatedByacquisitionTypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['accessionsRelatedByacquisitionTypeId']; } if ('accessionsRelatedByprocessingPriorityId' == $name) { if (!isset($this->refFkValues['accessionsRelatedByprocessingPriorityId'])) { if (!isset($this->id)) { $this->refFkValues['accessionsRelatedByprocessingPriorityId'] = QubitQuery::create(); } else { $this->refFkValues['accessionsRelatedByprocessingPriorityId'] = self::getaccessionsRelatedByprocessingPriorityIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['accessionsRelatedByprocessingPriorityId']; } if ('accessionsRelatedByprocessingStatusId' == $name) { if (!isset($this->refFkValues['accessionsRelatedByprocessingStatusId'])) { if (!isset($this->id)) { $this->refFkValues['accessionsRelatedByprocessingStatusId'] = QubitQuery::create(); } else { $this->refFkValues['accessionsRelatedByprocessingStatusId'] = self::getaccessionsRelatedByprocessingStatusIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['accessionsRelatedByprocessingStatusId']; } if ('accessionsRelatedByresourceTypeId' == $name) { if (!isset($this->refFkValues['accessionsRelatedByresourceTypeId'])) { if (!isset($this->id)) { $this->refFkValues['accessionsRelatedByresourceTypeId'] = QubitQuery::create(); } else { $this->refFkValues['accessionsRelatedByresourceTypeId'] = self::getaccessionsRelatedByresourceTypeIdById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['accessionsRelatedByresourceTypeId']; } if ('deaccessions' == $name) { if (!isset($this->refFkValues['deaccessions'])) { if (!isset($this->id)) { $this->refFkValues['deaccessions'] = QubitQuery::create(); } else { $this->refFkValues['deaccessions'] = self::getdeaccessionsById($this->id, array('self' => $this) + $options); } } return $this->refFkValues['deaccessions']; } try { if (1 > strlen($value = call_user_func_array(array($this->getCurrenttermI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrenttermI18n(array('sourceCulture' => true) + $options), '__get'), $args); } return $value; } catch (sfException $e) { } if ('ancestors' == $name) { if (!isset($this->values['ancestors'])) { if ($this->new) { $this->values['ancestors'] = QubitQuery::create(array('self' => $this) + $options); } else { $criteria = new Criteria(); $this->addAncestorsCriteria($criteria); $this->addOrderByPreorder($criteria); $this->values['ancestors'] = self::get($criteria, array('self' => $this) + $options); } } return $this->values['ancestors']; } if ('descendants' == $name) { if (!isset($this->values['descendants'])) { if ($this->new) { $this->values['descendants'] = QubitQuery::create(array('self' => $this) + $options); } else { $criteria = new Criteria(); $this->addDescendantsCriteria($criteria); $this->addOrderByPreorder($criteria); $this->values['descendants'] = self::get($criteria, array('self' => $this) + $options); } } return $this->values['descendants']; } throw new sfException("Unknown record property \"{$name}\" on \"" . get_class($this) . '"'); }