/** * Gets a file * @param string|null $key * @return array|null */ public function getFile($key = null) { if (null === $this->_files) { $this->_files = new Collection($this->getFilesRaw(), array('type' => 'string', 'indexType' => Collection::INDEX_ASSOCIATIVE, 'readonly' => true)); $this->_files->setFlags(Collection::ARRAY_AS_PROPS); } if (null === $key) { return $this->_files; } return $this->_files->offsetExists($key) ? $this->_files[$key] : null; }