src/Mapper/Definition/CachedProvider.php 1 location
|
@@ 55-62 (lines=8) @@
|
| 52 |
|
/** |
| 53 |
|
* {@inheritdoc} |
| 54 |
|
*/ |
| 55 |
|
public function getDefinition(string $class): Definition |
| 56 |
|
{ |
| 57 |
|
if (! isset($this->definitions[$class])) { |
| 58 |
|
$this->definitions[$class] = $this->provideDefinition($class); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
return $this->definitions[$class]; |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
/** |
| 65 |
|
* Provide definition: try cache or get from provider |
src/Mapper/Definition/MergedProvider.php 1 location
|
@@ 38-45 (lines=8) @@
|
| 35 |
|
/** |
| 36 |
|
* {@inheritdoc} |
| 37 |
|
*/ |
| 38 |
|
public function getDefinition(string $class): Definition |
| 39 |
|
{ |
| 40 |
|
if (! isset($this->definitions[$class])) { |
| 41 |
|
$this->definitions[$class] = $this->createDefinition($class); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
return $this->definitions[$class]; |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
/** |
| 48 |
|
* Create definition |
src/Mapper/Definition/YamlDefinitionProvider.php 1 location
|
@@ 111-118 (lines=8) @@
|
| 108 |
|
/** |
| 109 |
|
* {@inheritdoc} |
| 110 |
|
*/ |
| 111 |
|
public function getDefinition(string $class): Definition |
| 112 |
|
{ |
| 113 |
|
if (! isset($this->definitionCache[$class])) { |
| 114 |
|
$this->definitionCache[$class] = $this->createDefinition($class); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
return $this->definitionCache[$class]; |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
/** |
| 121 |
|
* Create definition |