loader = $loader; } /** * {@inheritdoc} * @see getNames() */ public function getAll() { if (null === $this->data) { $this->data = $this->loader->load(); } return $this->data; } /** * {@inheritdoc} * @see has() */ public function getOne($name) { $data = $this->getAll(); return isset($data[$name]) ? $data[$name] : null; } /** * {@inheritdoc} */ public function getNames() { $data = $this->getAll(); return array_keys($data); } /** * {@inheritdoc} */ public function has($name) { $this->getAll(); return isset($this->data[$name]); } }