/** * {@inheritdoc} */ public function request($method, $path, $body = null, array $options = []) { $filePath = $this->fileResolver->getFilePath($method, $path, $body, $options); if (!file_exists($filePath)) { throw new \RuntimeException(sprintf('The HTTP fixture file "%s" do not exists', $filePath)); } return file_get_contents($filePath); }
/** * @return array */ public function getItems() { $items = array(); $pathWhereToFindMarkupsArray = FileResolver::getInstance()->setPackageName('modules_form')->setDirectory('templates/markup')->getPaths(''); foreach ($pathWhereToFindMarkupsArray as $pathWhereToFindMarkups) { $dir = dir($pathWhereToFindMarkups); while ($entry = $dir->read()) { if ($entry[0] != '.' && is_dir($pathWhereToFindMarkups . DIRECTORY_SEPARATOR . $entry)) { $items[] = new list_Item(f_Locale::translateUI('&modules.form.bo.markup.' . $entry . ';'), $entry); } } } return $items; }