You are here

class TestObjectMetadata in Plug 7

Hierarchy

Expanded class hierarchy of TestObjectMetadata

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php, line 153

Namespace

Doctrine\Tests\Common\Persistence
View source
class TestObjectMetadata implements ClassMetadata {
  public function getAssociationMappedByTargetField($assocName) {
    $assoc = array(
      'children' => 'parent',
    );
    return $assoc[$assocName];
  }
  public function getAssociationNames() {
    return array(
      'parent',
      'children',
    );
  }
  public function getAssociationTargetClass($assocName) {
    return __NAMESPACE__ . '\\TestObject';
  }
  public function getFieldNames() {
    return array(
      'id',
      'name',
    );
  }
  public function getIdentifier() {
    return array(
      'id',
    );
  }
  public function getName() {
    return __NAMESPACE__ . '\\TestObject';
  }
  public function getReflectionClass() {
    return new \ReflectionClass($this
      ->getName());
  }
  public function getTypeOfField($fieldName) {
    $types = array(
      'id' => 'integer',
      'name' => 'string',
    );
    return $types[$fieldName];
  }
  public function hasAssociation($fieldName) {
    return in_array($fieldName, array(
      'parent',
      'children',
    ));
  }
  public function hasField($fieldName) {
    return in_array($fieldName, array(
      'id',
      'name',
    ));
  }
  public function isAssociationInverseSide($assocName) {
    return $assocName === 'children';
  }
  public function isCollectionValuedAssociation($fieldName) {
    return $fieldName === 'children';
  }
  public function isIdentifier($fieldName) {
    return $fieldName === 'id';
  }
  public function isSingleValuedAssociation($fieldName) {
    return $fieldName === 'parent';
  }
  public function getIdentifierValues($entity) {
  }
  public function getIdentifierFieldNames() {
  }
  public function initializeReflection(ReflectionService $reflService) {
  }
  public function wakeupReflection(ReflectionService $reflService) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestObjectMetadata::getAssociationMappedByTargetField public function Returns the target field of the owning side of the association. Overrides ClassMetadata::getAssociationMappedByTargetField
TestObjectMetadata::getAssociationNames public function Returns a numerically indexed list of association names of this persistent class. Overrides ClassMetadata::getAssociationNames
TestObjectMetadata::getAssociationTargetClass public function Returns the target class name of the given association. Overrides ClassMetadata::getAssociationTargetClass
TestObjectMetadata::getFieldNames public function A numerically indexed list of field names of this persistent class. Overrides ClassMetadata::getFieldNames
TestObjectMetadata::getIdentifier public function Gets the mapped identifier field name. Overrides ClassMetadata::getIdentifier
TestObjectMetadata::getIdentifierFieldNames public function Returns an array of identifier field names numerically indexed. Overrides ClassMetadata::getIdentifierFieldNames
TestObjectMetadata::getIdentifierValues public function Returns the identifier of this object as an array with field name as key. Overrides ClassMetadata::getIdentifierValues
TestObjectMetadata::getName public function Gets the fully-qualified class name of this persistent class. Overrides ClassMetadata::getName
TestObjectMetadata::getReflectionClass public function Gets the ReflectionClass instance for this mapped class. Overrides ClassMetadata::getReflectionClass
TestObjectMetadata::getTypeOfField public function Returns a type name of this field. Overrides ClassMetadata::getTypeOfField
TestObjectMetadata::hasAssociation public function Checks if the given field is a mapped association for this class. Overrides ClassMetadata::hasAssociation
TestObjectMetadata::hasField public function Checks if the given field is a mapped property for this class. Overrides ClassMetadata::hasField
TestObjectMetadata::initializeReflection public function
TestObjectMetadata::isAssociationInverseSide public function Checks if the association is the inverse side of a bidirectional association. Overrides ClassMetadata::isAssociationInverseSide
TestObjectMetadata::isCollectionValuedAssociation public function Checks if the given field is a mapped collection valued association for this class. Overrides ClassMetadata::isCollectionValuedAssociation
TestObjectMetadata::isIdentifier public function Checks if the given field name is a mapped identifier for this class. Overrides ClassMetadata::isIdentifier
TestObjectMetadata::isSingleValuedAssociation public function Checks if the given field is a mapped single valued association for this class. Overrides ClassMetadata::isSingleValuedAssociation
TestObjectMetadata::wakeupReflection public function