/** * Список методов, доступных для вызова */ public static function getMethodsList() { if (!AuthManager::isAuthorizedAsAdmin() || PsDefines::isProduction()) { return array(); } if (!is_array(self::$METHODS)) { self::$METHODS = array(); $methodNames = PsUtil::getClassMethods(TestManager::inst(), true, false, true, true); foreach ($methodNames as $name) { $method = new ReflectionMethod(TestManager::inst(), $name); $params['name'] = $name; $params['descr'] = implode("\n", StringUtils::parseMultiLineComments($method->getDocComment())); $params['params'] = array(); /* @var $param ReflectionParameter */ foreach ($method->getParameters() as $param) { $params['params'][] = array('name' => $param->getName(), 'dflt' => $param->isDefaultValueAvailable() ? var_export($param->getDefaultValue(), true) : null); } self::$METHODS[$name] = $params; } } return self::$METHODS; }
public function getHtmlDescr() { return join('<br/>', StringUtils::parseMultiLineComments($this->rm->getDocComment())); }