Skip to content

Commit

Permalink
Add more useful methods on Doctrine\Common\Persistence\Mapping\ClassM…
Browse files Browse the repository at this point in the history
…etadata interface
  • Loading branch information
beberlei committed May 15, 2011
1 parent 59910f5 commit 8bd7a0a
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ interface ClassMetadata
{
/**
* Gets the mapped identifier field name.
*
* The returned structure is an array of the identifier field names.
*
* @return mixed
* @return array
*/
public function getIdentifier();

Expand Down Expand Up @@ -83,4 +85,41 @@ public function isSingleValuedAssociation($fieldName);
* @return boolean
*/
public function isCollectionValuedAssociation($fieldName);

/**
* A numerically indexed list of field names of this persistent class.
*
* This array includes identifier fields if present on this class.
*
* @return array
*/
public function getFieldNames();

/**
* A numerically indexed list of association names of this persistent class.
*
* This array includes identifier associations if present on this class.
*
* @return array
*/
public function getAssociationNames();

/**
* Returns a type name of this field.
*
* This type names can be implementation specific but should at least include the php types:
* integer, string, boolean, float/double, datetime.
*
* @param string $fieldName
* @return string
*/
public function getTypeOfField($fieldName);

/**
* Returns the target class name of the given association.
*
* @param string $assocName
* @return string
*/
public function getAssociationTargetClass($assocName);
}

0 comments on commit 8bd7a0a

Please sign in to comment.