. */ namespace Doctrine\Common\Persistence\Mapping; /** * Contract for a Doctrine persistence layer ClassMetadata class to implement. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.1 * @author Benjamin Eberlei * @author Jonathan Wage */ interface ClassMetadataFactory { /** * Forces the factory to load the metadata of all classes known to the underlying * mapping driver. * * @return array The ClassMetadata instances of all mapped classes. */ function getAllMetadata(); /** * Gets the class metadata descriptor for a class. * * @param string $className The name of the class. * @return ClassMetadata */ function getMetadataFor($className); /** * Checks whether the factory has the metadata for a class loaded already. * * @param string $className * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. */ function hasMetadataFor($className); /** * Sets the metadata descriptor for a specific class. * * @param string $className * @param ClassMetadata $class */ function setMetadataFor($className, $class); /** * Whether the class with the specified name should have its metadata loaded. * This is only the case if it is either mapped directly or as a * MappedSuperclass. * * @param string $className * @return boolean */ function isTransient($className); }