1 | <?php |
||
22 | class RepositoryFactory implements ContainerAwareInterface |
||
23 | { |
||
24 | use ContainerAwareTrait; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $repositoryClass; |
||
30 | |||
31 | /** |
||
32 | * Collection of fieldTypes, lazy loaded via a closure. |
||
33 | * |
||
34 | * @var \eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory |
||
35 | */ |
||
36 | protected $fieldTypeCollectionFactory; |
||
37 | |||
38 | /** |
||
39 | * Collection of fieldTypes, lazy loaded via a closure. |
||
40 | * |
||
41 | * @var \eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeNameableCollectionFactory |
||
42 | */ |
||
43 | protected $fieldTypeNameableCollectionFactory; |
||
44 | |||
45 | /** |
||
46 | * Collection of limitation types for the RoleService. |
||
47 | * |
||
48 | * @var \eZ\Publish\SPI\Limitation\Type[] |
||
49 | */ |
||
50 | protected $roleLimitations = array(); |
||
51 | |||
52 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * Builds the main repository, heart of eZ Publish API. |
||
64 | * |
||
65 | * This always returns the true inner Repository, please depend on ezpublish.api.repository and not this method |
||
66 | * directly to make sure you get an instance wrapped inside Signal / Cache / * functionality. |
||
67 | * |
||
68 | * @param \eZ\Publish\SPI\Persistence\Handler $persistenceHandler |
||
69 | * @param \eZ\Publish\SPI\Search\Handler $searchHandler |
||
70 | * @param \eZ\Publish\Core\Search\Common\BackgroundIndexer $backgroundIndexer |
||
71 | * |
||
72 | * @return \eZ\Publish\API\Repository\Repository |
||
73 | */ |
||
74 | public function buildRepository( |
||
98 | |||
99 | /** |
||
100 | * Registers a limitation type for the RoleService. |
||
101 | * |
||
102 | * @param string $limitationName |
||
103 | * @param \eZ\Publish\SPI\Limitation\Type $limitationType |
||
104 | */ |
||
105 | public function registerLimitationType($limitationName, SPILimitationType $limitationType) |
||
109 | |||
110 | /** |
||
111 | * Returns a service based on a name string (content => contentService, etc). |
||
112 | * |
||
113 | * @param \eZ\Publish\API\Repository\Repository $repository |
||
114 | * @param string $serviceName |
||
115 | * |
||
116 | * @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException |
||
117 | * |
||
118 | * @return mixed |
||
119 | */ |
||
120 | public function buildService(Repository $repository, $serviceName) |
||
129 | } |
||
130 |