-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClassMetadataFactoryInterface.php
53 lines (48 loc) · 1.39 KB
/
ClassMetadataFactoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* This file is part of the Cubiche package.
*
* Copyright (c) Cubiche
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cubiche\Core\Metadata;
/**
* ClassMetadataFactory interface.
*
* @author Ivannis Suárez Jerez <ivannis.suarez@gmail.com>
*/
interface ClassMetadataFactoryInterface
{
/**
* 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.
*/
public function getAllMetadata();
/**
* Gets the class metadata descriptor for a class.
*
* @param string $className The name of the class.
*
* @return ClassMetadataInterface|null
*/
public function getMetadataFor($className);
/**
* Checks whether the factory has the metadata for a class loaded already.
*
* @param string $className
*
* @return bool TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
*/
public function hasMetadataFor($className);
/**
* Sets the metadata descriptor for a specific class.
*
* @param string $className
* @param ClassMetadataInterface $metadata
*/
public function setMetadataFor($className, ClassMetadataInterface $metadata);
}