Skip to content
Browse files

Update Doctrine Common to latest version and add new methods to Class…

…MetadataInfo
  • Loading branch information...
1 parent 5d81e86 commit f4021e7469109588c69b13420707482982ba7cf0 @beberlei beberlei committed May 16, 2011
Showing with 49 additions and 1 deletion.
  1. +48 −0 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
  2. +1 −1 lib/vendor/doctrine-common
View
48 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
@@ -1840,4 +1840,52 @@ public function markReadOnly()
{
$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
@@ -1 +1 @@
-Subproject commit ba63ae0f0b6b62a2a8617f01386698730ff2b713
+Subproject commit ea434bbea37e067aa52272816c6dcda5ff826154

0 comments on commit f4021e7

Please sign in to comment.
Something went wrong with that request. Please try again.