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


PHP static::registered方法代码示例

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


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

示例1: register

 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         spl_autoload_register(array('\\Illuminate\\Support\\ClassLoader', 'load'));
         static::$registered = true;
     }
 }
开发者ID:defra91,项目名称:levecchiecredenze.it,代码行数:12,代码来源:ClassLoader.php

示例2: register

 public static function register()
 {
     if (!static::$registered) {
         spl_autoload_register([__CLASS__, "load"]);
     }
     static::$registered = true;
 }
开发者ID:cubex,项目名称:framework,代码行数:7,代码来源:FacadeLoader.php

示例3: registerFunctions

 /**
  * Register x(), set(), collection() and other functions for quick access to “future” variables.
  */
 public static function registerFunctions()
 {
     if (!static::$registered) {
         require_once __DIR__ . '/../functions.php';
         static::$registered = true;
     }
 }
开发者ID:alexeyshockov,项目名称:colada,代码行数:10,代码来源:Colada.php

示例4: register

 /**
  * Register ezote/Autoloader::autoload as autoloader
  */
 public static function register($extensionDir = false)
 {
     if (!static::$registered) {
         static::$extensionDir = $extensionDir ?: \eZExtension::baseDirectory();
         static::$registered = spl_autoload_register(array(new self(), 'autoload'));
     }
 }
开发者ID:keyteqlabs,项目名称:ezote,代码行数:10,代码来源:Autoloader.php

示例5: autoloadRegister

 public static function autoloadRegister()
 {
     if (static::$registered) {
         return false;
     }
     static::$registered = spl_autoload_register("\\App\\Lib\\Autoloader::loadClass");
     return self::$registered;
 }
开发者ID:jagan-pl,项目名称:PHP_assignment,代码行数:8,代码来源:Autoloader.php

示例6: register

 /**
  * Registers this autoloader and makes it active.  This method is called
  * automatically upon registering a namespace.
  *
  * @return boolean true if the autoloader was successfully registered;
  * 		false if it was not, or if it has already been registered in the
  * 		past.
  */
 protected static function register()
 {
     if (static::$registered) {
         return false;
     }
     static::$registered = spl_autoload_register('\\hydrogen\\autoloader\\Autoloader::loadClass');
     return static::$registered;
 }
开发者ID:TomFrost,项目名称:Hydrogen,代码行数:16,代码来源:Autoloader.php

示例7: register

 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @param null $composer
  * @return void
  */
 public static function register($composer = null)
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(array('\\Iyoworks\\Support\\ClassLoader', 'load'));
         if ($composer) {
             static::setComposer($composer);
         }
     }
 }
开发者ID:iyoworks,项目名称:support,代码行数:15,代码来源:ClassLoader.php

示例8: setUp

 public function setUp()
 {
     if (!static::$registered) {
         $guesser = MimeTypeGuesser::getInstance();
         $guesser->register(new FileBinaryMimeTypeGuesser());
         $guesser->register(new RawImageMimeTypeGuesser());
         $guesser->register(new PostScriptMimeTypeGuesser());
         $guesser->register(new AudioMimeTypeGuesser());
         $guesser->register(new VideoMimeTypeGuesser());
         static::$registered = true;
     }
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:12,代码来源:TestCase.php

示例9: __construct

	/**
	 * @param \Nette\DI\IContainer
	 */
	public function __construct(\Nette\DI\IContainer $container)
	{
		if (static::$registered) {
			 throw new \Nette\InvalidStateException("Callback panel is already registered");
		}

		$this->container = $container;

		$this->init();

		static::$registered = TRUE;

		\Nette\Diagnostics\Debugger::$bar->addPanel($this);
	}
开发者ID:norbe,项目名称:framework,代码行数:17,代码来源:Callback.php

示例10: register

 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register($prepend = true, $callback = null, $app = null)
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(array('\\Sbp\\Laravel\\ClassLoader', 'load'), true, $prepend);
         if (is_null($app)) {
             $app = __DIR__ . '/../../../../../../app';
         }
         if (!file_exists($app . '/storage') || !is_writable($app . '/storage')) {
             throw new SbpException("Laravel app and/or writable storage directory not found at {$app}, please specify the path with the following code:\nSbp\\Laravel\\ClassLoader::register(true, 'sha1', \$laravelAppPath)");
         }
         Sbp::writeIn(Sbp::SAME_DIR);
         Sbp::fileExists($app . '/routes');
         $storage = $app . '/storage/sbp';
         if (!file_exists($storage)) {
             if (mkdir($storage, 0777)) {
                 file_put_contents($storage . '/.gitignore', "*\n!.gitignore");
             }
         }
         Sbp::writeIn($storage, $callback);
     }
 }
开发者ID:kylekatarnls,项目名称:sbp,代码行数:26,代码来源:ClassLoader.php

示例11: unregister

 public static function unregister()
 {
     stream_wrapper_restore(static::$protocol);
     static::$registered = false;
 }
开发者ID:emersion,项目名称:php-wrappers,代码行数:5,代码来源:Stream.php

示例12: register

 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(['\\October\\Rain\\Support\\ClassLoader', 'load']);
     }
 }
开发者ID:jBOKA,项目名称:library,代码行数:11,代码来源:ClassLoader.php

示例13: register

 public static function register()
 {
     if (static::$registered) {
         throw new \Nette\InvalidStateException('DateInput control already registered.');
     }
     static::$registered = TRUE;
     $class = get_called_class();
     $callback = function (Container $container, $name, $label = NULL, $format = self::DEFAULT_FORMAT) use($class) {
         $control = new $class($format, $label);
         $container->addComponent($control, $name);
         return $control;
     };
     Container::extensionMethod('addDate', $callback);
 }
开发者ID:nella,项目名称:forms-datetime,代码行数:14,代码来源:DateInput.php

示例14: unregister

 public static function unregister()
 {
     static::$registered = false;
 }
开发者ID:kylekatarnls,项目名称:sbp,代码行数:4,代码来源:loadTest.php

示例15: register

 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(array('\\Nickfan\\AppBox\\Support\\ClassLoader', 'load'));
     }
 }
开发者ID:nickfan,项目名称:appbox,代码行数:11,代码来源:ClassLoader.php


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