function detailAction() { $out = array(); $model = DocModel::getInstance(); $path = $this->getRequest()->getParam('path'); preg_match('/\\/([\\d\\.]+(-\\w+)?)\\.txt/', $path, $match); $out['arr'] = $model->parse($path, array('version' => $match[1])); $this->getView()->assign($out); }
function detailAction() { $out = array(); $model = DocModel::getInstance(); $path = $this->getRequest()->getParam('path'); // v1.0.0-beta preg_match('/\\/(v[\\d\\.]+(-\\w+)?)/', $path, $match); $out['arr'] = $model->parse($path, array('version' => $match[1])); $this->getView()->getAdapter()->registerClass("Arrays", 'Ares333\\YafLib\\Helper\\Arrays'); $this->getView()->assign($out); }
protected function buildModel($sourcePath, $options) { $files = CFileHelper::findFiles($sourcePath, $options); if ($this->withYii) { foreach (CFileHelper::findFiles(YII_PATH, $this->yiiOptions) as $file) { $files[] = $file; } /*If it's an application with yii, extensions must be included, too*/ if ($this->basePath === APP_PATH) { foreach (CFileHelper::findFiles(EXTENSIONS_PATH, $this->extOptions) as $file) { $files[] = $file; } } } $model = new DocModel(array('basePath' => $this->basePath, 'name' => $this->name, 'withYii' => $this->withYii, 'withYiiLinks' => $this->withYiiLinks, 'url' => $this->url)); $model->build($files); return $model; }