本文整理匯總了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;
}