当前位置: 首页>>代码示例>>PHP>>正文


PHP Library::getFullyQualifiedClassName方法代码示例

本文整理汇总了PHP中Library::getFullyQualifiedClassName方法的典型用法代码示例。如果您正苦于以下问题:PHP Library::getFullyQualifiedClassName方法的具体用法?PHP Library::getFullyQualifiedClassName怎么用?PHP Library::getFullyQualifiedClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Library的用法示例。


在下文中一共展示了Library::getFullyQualifiedClassName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: expand

 protected function expand($class, $reflection, $descriptor)
 {
     if (is_array($this->values[0])) {
         $this->httpMethods = $this->values[0];
     } else {
         $this->httpMethods = array($this->values[0]);
     }
     if (isset($this->values[1])) {
         $this->path = $this->values[1];
     }
     $controller = Library::getFullyQualifiedClassName($class);
     $controllerMethod = $reflection->getName();
     if (strpos($this->path, Library::pathSeparator) === 0) {
         // Absolute Route
         $route = new Route($controller, $controllerMethod, $this->httpMethods, $this->path);
         $descriptor->methodUrls[$controllerMethod] = $this->path;
     } else {
         // Relative Route
         $route = new Route($controller, $controllerMethod, $this->httpMethods, $descriptor->routesPrefix . $this->path);
         $descriptor->methodUrls[$controllerMethod] = $descriptor->routesPrefix . $this->path;
     }
     $route->fileDefined = $reflection->getFileName();
     $route->lineDefined = $reflection->getStartLine();
     $descriptor->routes[] = $route;
 }
开发者ID:amitshukla30,项目名称:recess,代码行数:25,代码来源:RouteAnnotation.class.php

示例2: toRoute

 function toRoute()
 {
     $route = new Route(Library::getFullyQualifiedClassName($this->c), $this->f, array(), '');
     $route->app = $this->a;
     return $route;
 }
开发者ID:amitshukla30,项目名称:recess,代码行数:6,代码来源:Rt.class.php

示例3: printRelationships

function printRelationships($relationships)
{
    ?>
	<a name="relationships"></a>
	<h3>Relationships</h3>
	<ul class="relationships">
	<?php 
    foreach ($relationships as $relationship) {
        ?>
		<li><span class="relationship-type"><?php 
        echo $relationship->getType();
        ?>
</span>
			<?php 
        echo $relationship->name;
        ?>
, Class:
			<a href="<?php 
        echo Library::getFullyQualifiedClassName($relationship->foreignClass);
        ?>
"><?php 
        echo $relationship->foreignClass;
        ?>
</a>
			<ul class="relationship-details">
				<li>ForeignKey: <?php 
        echo $relationship->foreignKey;
        ?>
</li>
				<li>OnDelete: <?php 
        echo $relationship->onDelete == 'unspecified' ? $relationship->getDefaultOnDeleteMode() : $relationship->onDelete;
        ?>
</li>
				<?php 
        if ($relationship->through != '') {
            ?>
				<li>Through: <?php 
            echo $relationship->through;
            ?>
</li>
				<?php 
        }
        ?>
			</ul>
		</li>
	<?php 
    }
    echo '</ul>';
}
开发者ID:nanotech,项目名称:recess,代码行数:49,代码来源:classInfo.html.php

示例4: parse

 /**
  * Given a docstring, returns an array of Recess Annotations.
  * @param $docstring
  * @return unknown_type
  */
 static function parse($docstring)
 {
     preg_match_all('%(?:\\s|\\*)*!(\\S+)[^\\n\\r\\S]*(?:(.*?)(?:\\*/)|(.*))%', $docstring, $result, PREG_PATTERN_ORDER);
     $annotations = $result[1];
     if (isset($result[2][0]) && $result[2][0] != '') {
         $values = $result[2];
     } else {
         $values = $result[3];
     }
     $returns = array();
     if (empty($result[1])) {
         return array();
     }
     foreach ($annotations as $key => $annotation) {
         // Strip Whitespace
         $value = preg_replace('/\\s*(\\(|:|,|\\))[^\\n\\r\\S]*/', '${1}', '(' . $values[$key] . ')');
         // Extract Strings
         preg_match_all('/\'(.*?)(?<!\\\\)\'|"(.*?)(?<!\\\\)"/', $value, $result, PREG_PATTERN_ORDER);
         $quoted_strings = $result[2];
         $value = preg_replace('/\'.*?(?<!\\\\)\'|".*?(?<!\\\\)"/', '%s', $value);
         // Insert Single Quotes
         $value = preg_replace('/((?!\\(|,|:))(?!\\))(.*?)((?=\\)|,|:))/', '${1}\'${2}\'${3}', $value);
         // Array Keyword
         $value = str_replace('(', 'array(', $value);
         // Arrows
         $value = str_replace(':', '=>', $value);
         $value = vsprintf($value . ';', $quoted_strings);
         @eval('$array = ' . $value);
         if (!isset($array)) {
             throw new InvalidAnnotationValueException('There is an unparseable annotation value: "!' . $annotation . ': ' . $values[$key] . '"', 0, 0, '', 0, array());
         }
         $annotationClass = $annotation . 'Annotation';
         $fullyQualified = Library::getFullyQualifiedClassName($annotationClass);
         if ($annotationClass != $fullyQualified || class_exists($annotationClass, false)) {
             $annotation = new $annotationClass();
             $annotation->init($array);
         } else {
             throw new UnknownAnnotationException('Unknown annotation: "' . $annotation . '"', 0, 0, '', 0, get_defined_vars());
         }
         $returns[] = $annotation;
     }
     unset($annotations, $values, $result);
     return $returns;
 }
开发者ID:amitshukla30,项目名称:recess,代码行数:49,代码来源:Annotation.class.php

示例5: substr

Layout::extend('layouts/apps');
$title = 'Uninstall';
?>

<h1>To <span class="removed">Uninstall</span> <?php 
echo $app->name;
?>
...</h1>
<ol>
	<li><span class="highlight">Open <?php 
echo $_ENV['dir.bootstrap'];
?>
recess-conf.php</span></li>
	<li>Find the <span class="highlight">RecessConf::$applications</span> array.</li>
	<?php 
$appClass = Library::getFullyQualifiedClassName(get_class($app));
?>
	<li><span class="highlight">Remove the string '<?php 
echo $appClass;
?>
'</span></li>
	<li>[Optional] Delete the directory <?php 
echo $_ENV['dir.apps'] . substr($appClass, 0, strpos($appClass, '.'));
?>
</li>
</ol>
<h2>That's all folks. <a href="<?php 
echo $controller->urlTo('home');
?>
">Head back to apps.</a></h2>
开发者ID:amitshukla30,项目名称:recess,代码行数:30,代码来源:uninstall.html.php

示例6: get_class

<?php

Layout::extend('layouts/apps');
$title = $app->name;
?>
<h1><?php 
echo $app->name;
?>
</h1>
<p>Class: 
	<a href="<?php 
echo Url::action('RecessToolsCodeController::classInfo', Library::getFullyQualifiedClassName(get_class($app)));
?>
"><?php 
echo get_class($app);
?>
</a></p>
<div class="span-6">
<h2 class="bottom">Models (<a href="<?php 
echo $controller->urlTo('createModel', get_class($app));
?>
">new</a>)</h2>
<p>Location: <?php 
echo Html::anchor(Url::action('RecessToolsCodeController::packageInfo', substr($app->modelsPrefix, 0, -1)), $app->modelsPrefix);
?>
 </p>
<?php 
function printClassesInNamespace($namespace)
{
    $classes = Library::findClassesIn($namespace);
    if (!empty($classes)) {
开发者ID:amitshukla30,项目名称:recess,代码行数:31,代码来源:app.html.php


注:本文中的Library::getFullyQualifiedClassName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。