예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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;
 }