Skip to content

Commit

Permalink
Update Doctrine Common to latest version and add new methods to Class…
Browse files Browse the repository at this point in the history
…MetadataInfo
  • Loading branch information
beberlei committed May 16, 2011
1 parent 5d81e86 commit f4021e7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Expand Up @@ -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 changes: 1 addition & 1 deletion lib/vendor/doctrine-common
Submodule doctrine-common updated 31 files
+6 −7 lib/Doctrine/Common/Annotations/AnnotationReader.php
+30 −43 lib/Doctrine/Common/Annotations/Lexer.php
+78 −34 lib/Doctrine/Common/Annotations/Parser.php
+3 −7 lib/Doctrine/Common/Cache/AbstractCache.php
+26 −6 lib/Doctrine/Common/ClassLoader.php
+8 −5 lib/Doctrine/Common/Collections/ArrayCollection.php
+47 −3 lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
+0 −2 lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php
+0 −2 lib/Doctrine/Common/Persistence/ObjectManager.php
+10 −4 lib/Doctrine/Common/Persistence/ObjectRepository.php
+25 −0 phpunit.xml.dist
+0 −32 tests/Doctrine/Tests/AllTests.php
+0 −39 tests/Doctrine/Tests/Common/AllTests.php
+0 −32 tests/Doctrine/Tests/Common/Annotations/AllTests.php
+20 −3 tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php
+0 −2 tests/Doctrine/Tests/Common/Annotations/LexerTest.php
+105 −28 tests/Doctrine/Tests/Common/Annotations/ParserTest.php
+0 −34 tests/Doctrine/Tests/Common/Cache/AllTests.php
+1 −3 tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
+0 −2 tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
+0 −2 tests/Doctrine/Tests/Common/Cache/CacheTest.php
+0 −2 tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php
+0 −2 tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php
+0 −2 tests/Doctrine/Tests/Common/ClassLoaderTest.php
+0 −30 tests/Doctrine/Tests/Common/Collections/AllTests.php
+1 −3 tests/Doctrine/Tests/Common/Collections/CollectionTest.php
+0 −2 tests/Doctrine/Tests/Common/EventManagerTest.php
+0 −11 tests/Doctrine/Tests/DoctrineTestSuite.php
+3 −1 tests/Doctrine/Tests/TestInit.php
+3 −5 tests/NativePhpunitTask.php
+4 −2 tests/README.markdown

0 comments on commit f4021e7

Please sign in to comment.