Update Doctrine Common to latest version and add new methods to ClassMetadataInfo
This commit is contained in:
parent
5d81e867be
commit
f4021e7469
@ -1840,4 +1840,52 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
{
|
{
|
||||||
$this->isReadOnly = true;
|
$this->isReadOnly = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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()
|
||||||
|
{
|
||||||
|
return array_keys($this->fieldMappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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()
|
||||||
|
{
|
||||||
|
return array_keys($this->associationMappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the target class name of the given association.
|
||||||
|
*
|
||||||
|
* @param string $assocName
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAssociationTargetClass($assocName)
|
||||||
|
{
|
||||||
|
if (!isset($this->associationMappings[$assocName])) {
|
||||||
|
throw new \InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association.");
|
||||||
|
}
|
||||||
|
return $this->associationMappings[$assocName]['targetEntity'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fully-qualified class name of this persistent class.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
lib/vendor/doctrine-common
vendored
2
lib/vendor/doctrine-common
vendored
@ -1 +1 @@
|
|||||||
Subproject commit ba63ae0f0b6b62a2a8617f01386698730ff2b713
|
Subproject commit ea434bbea37e067aa52272816c6dcda5ff826154
|
Loading…
x
Reference in New Issue
Block a user