コード例 #1
0
ファイル: Dt.php プロジェクト: tokushima/rhaco3
 /**
  * アプリケーションのマップ一覧
  */
 private function get_flow_output_maps()
 {
     if (empty($this->flow_output_maps)) {
         foreach (new \RecursiveDirectoryIterator(getcwd(), \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS) as $e) {
             if (substr($e->getFilename(), -4) == '.php' && strpos($e->getPathname(), '/.') === false && strpos($e->getPathname(), '/_') === false) {
                 $src = file_get_contents($e->getFilename());
                 if (strpos($src, 'Flow') !== false) {
                     $entry_name = substr($e->getFilename(), 0, -4);
                     foreach (\org\rhaco\Flow::get_maps($e->getPathname()) as $k => $m) {
                         if (!isset($m['deprecated'])) {
                             $m['deprecated'] = false;
                         }
                         if (!isset($m['mode'])) {
                             $m['mode'] = null;
                         }
                         if (!isset($m['summary'])) {
                             $m['summary'] = null;
                         }
                         if (!isset($m['template'])) {
                             $m['template'] = null;
                         }
                         if (!isset($m['class']) || $m['class'] != str_replace('\\', '.', __CLASS__)) {
                             $m['error'] = '';
                             $m['url'] = $k;
                             try {
                                 if (isset($m['method'])) {
                                     $info = \org\rhaco\Dt\Man::method_info($m['class'], $m['method']);
                                     if (!isset($m['summary'])) {
                                         list($m['summary']) = explode(PHP_EOL, $info['description']);
                                     }
                                     if (!$m['deprecated']) {
                                         $m['deprecated'] = $info['deprecated'];
                                     }
                                 }
                                 $m['entry'] = $entry_name;
                             } catch (\Exception $e) {
                                 $m['error'] = $e->getMessage();
                             }
                             $this->flow_output_maps[$entry_name . '::' . $m['name']] = $m;
                         }
                     }
                 }
             }
         }
     }
     return $this->flow_output_maps;
 }
コード例 #2
0
ファイル: Dt.php プロジェクト: tokushima/rhaco3
 public static function method_info($class, $method)
 {
     return Dt\Man::method_info($class, $method);
 }