當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Method::updateMethodDetails方法代碼示例

本文整理匯總了PHP中Method::updateMethodDetails方法的典型用法代碼示例。如果您正苦於以下問題:PHP Method::updateMethodDetails方法的具體用法?PHP Method::updateMethodDetails怎麽用?PHP Method::updateMethodDetails使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Method的用法示例。


在下文中一共展示了Method::updateMethodDetails方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Method

 public function &updateClassDetails(&$File, &$Component, &$SourceAnalyzer)
 {
     $MethodInstance = new Method(array('init' => false));
     $MethodInstance->setConnection($this->getConnection());
     $MethodInstance->init();
     $parsed_details = $SourceAnalyzer->getParsedArray($File->body);
     $available_classes = empty($parsed_details['classes']) ? array() : array_keys($parsed_details['classes']);
     if (empty($available_classes)) {
         return $available_classes;
     }
     $Classes = array();
     foreach ($available_classes as $class_name) {
         $extends = !empty($parsed_details['classes'][$class_name]['extends']) ? $parsed_details['classes'][$class_name]['extends'] : false;
         if ($extends) {
             $SourceAnalyzer->log('Looking for parent class: ' . $extends);
             $ParentClass = $this->_addOrUpdateClassDetails($extends, $File, $Component, $SourceAnalyzer, array(), true);
         }
         $Class = $this->_addOrUpdateClassDetails($class_name, $File, $Component, $SourceAnalyzer, $parsed_details['classes'][$class_name]);
         if (!empty($ParentClass)) {
             $SourceAnalyzer->log('Setting ' . $extends . ' as the parent of ' . $class_name);
             $ParentClass->tree->addChild($Class);
             $ParentClass->save();
         }
         $Class->methods = array();
         if (!empty($parsed_details['classes'][$class_name]['methods'])) {
             foreach ($parsed_details['classes'][$class_name]['methods'] as $method_name => $method_details) {
                 $Class->methods[] = $MethodInstance->updateMethodDetails($Class, $method_name, $method_details, $SourceAnalyzer);
             }
         }
         $Classes[] = $Class;
     }
     return $Classes;
 }
開發者ID:bermi,項目名稱:akelos,代碼行數:33,代碼來源:klass.php


注:本文中的Method::updateMethodDetails方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。