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


PHP Bundle::started方法代码示例

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


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

示例1: tearDown

 /**
  * Destroy the testing environment.
  */
 public function tearDown()
 {
     Bundle::$started = array();
     Bundle::$routed = array();
     Router::$names = array();
     Router::$routes = array();
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:10,代码来源:routing.test.php

示例2: overrideHTMLki

function overrideHTMLki($path, $overrides)
{
    $override = function () use($path, $overrides) {
        $overrides = arrize($overrides, 'ns');
        if (!empty($overrides['ns'])) {
            $overrides += array('compiledHeader' => "<?namespace {$overrides['ns']}?>\n", 'evalPrefix' => "namespace {$overrides['ns']};\n");
        }
        \overrideHTMLki($path, $overrides);
    };
    if (\Bundle::started('htmlki')) {
        $override();
    } else {
        \Event::listen('laravel.started: htmlki', $override);
    }
}
开发者ID:SerdarSanri,项目名称:VaneMart,代码行数:15,代码来源:core.php

示例3: load

 /**
  * Load the file corresponding to a given class.
  *
  * This method is registerd in the bootstrap file as an SPL auto-loader.
  *
  * @param  string  $class
  * @return void
  */
 public static function load($class)
 {
     // First, we will check to see if the class has been aliased. If it has,
     // we will register the alias, which may cause the auto-loader to be
     // called again for the "real" class name.
     if (isset(static::$aliases[$class])) {
         class_alias(static::$aliases[$class], $class);
     } elseif (isset(static::$mappings[$class])) {
         require static::$mappings[$class];
     }
     // If the class namespace is mapped to a directory, we will load the
     // class using the PSR-0 standards from that directory; however, we
     // will trim off the beginning of the namespace to account for
     // the root of the mapped directory.
     if (!is_null($info = static::namespaced($class))) {
         $class = substr($class, strlen($info['namespace']));
         return static::load_psr($class, $info['directory']);
     } elseif (($slash = strpos($class, '\\')) !== false) {
         $namespace = substr($class, 0, $slash);
         // If the class is namespaced to an existing bundle and the bundle has
         // not been started, we will start the bundle and attempt to load the
         // class file again. If that fails, an error will be thrown by PHP.
         //
         // This allows bundle classes to be loaded by the auto-loader before
         // their class mappings have actually been registered; however, it
         // is up to the bundle developer to namespace their classes to
         // match the name of their bundle.
         if (Bundle::exists($namespace) and !Bundle::started($namespace)) {
             Bundle::start(strtolower($namespace));
             static::load($class);
         }
     }
     // If the class is not maped and is not part of a bundle or a mapped
     // namespace, we'll make a last ditch effort to load the class via
     // the PSR-0 from one of the registered directories.
     static::load_psr($class);
 }
开发者ID:bamper,项目名称:laravel.com,代码行数:45,代码来源:autoloader.php

示例4: testStartActivated

 /**
  * Test if the activated bundle above is started.
  *
  * @return null
  */
 public function testStartActivated()
 {
     $this->assertFalse(count(iBundle::register()) <= 0);
     $this->assertTrue(Bundle::started('docs'));
 }
开发者ID:neoighodaro,项目名称:ibundle,代码行数:10,代码来源:ibundle.test.php

示例5: testStartedMethodIndicatesIfBundleIsStarted

 /**
  * Test the Bundle::started method.
  *
  * @group laravel
  */
 public function testStartedMethodIndicatesIfBundleIsStarted()
 {
     Bundle::register('dummy');
     Bundle::start('dummy');
     $this->assertTrue(Bundle::started('dummy'));
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:11,代码来源:bundle.test.php


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