protected function getDataFromFile($path) { if (!is_readable($path)) { throw new LoadException("File is not readable: {$path}"); } $loader = $this->loaderFactory->getForPath($path); return $loader->load($path); }