1 | <?php |
||
7 | class Entity extends AbstractBuilder |
||
8 | { |
||
9 | /** |
||
10 | * @param string $class |
||
11 | * |
||
12 | * @return Entity |
||
13 | */ |
||
14 | public function setRepositoryClass($class) |
||
20 | |||
21 | /** |
||
22 | * @return Entity |
||
23 | */ |
||
24 | public function readOnly() |
||
25 | { |
||
26 | $this->builder->setReadOnly(); |
||
27 | |||
28 | return $this; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Enables second-level cache on this entity. |
||
33 | * If you want to enable second-level cache, |
||
34 | * you must enable it on the EntityManager configuration. |
||
35 | * Depending on the cache mode selected, you may also need to configure |
||
36 | * lock modes. |
||
37 | * |
||
38 | * @param int $usage Cache mode. use ClassMetadataInfo::CACHE_USAGE_* constants. |
||
39 | * Defaults to READ_ONLY mode. |
||
40 | * @param string|null $region The cache region to be used. Doctrine will use a default region |
||
41 | * for each entity, if none is provided. |
||
42 | * |
||
43 | * @return Entity |
||
44 | * @see http://doctrine-orm.readthedocs.org/en/latest/reference/second-level-cache.html |
||
45 | */ |
||
46 | public function cacheable($usage = ClassMetadataInfo::CACHE_USAGE_READ_ONLY, $region = null) |
||
53 | } |
||
54 |