public function openFile($file) { $file = $this->decodePath($file); $this->validateOpenFile($file); if (!is_readable($file) || !is_file($file)) { throw new dmCodeEditorException($file . ' does not exist or is not readable'); } $mimeGroup = $this->mimeTypeResolver->getGroupByFilename($file); return array('full_path' => $file, 'path' => dmProject::unRootify($file), 'is_writable' => is_writable($file) && !$this->fileBackup->isFileBackup($file), 'is_image' => 'image' === $mimeGroup, 'code' => 'image' !== $mimeGroup ? dmString::unixify(file_get_contents($file)) : ''); }