Exemplo n.º 1
0
 /**
  * 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;
     }
 }
Exemplo n.º 2
0
 public static function register()
 {
     if (!static::$registered) {
         spl_autoload_register([__CLASS__, "load"]);
     }
     static::$registered = true;
 }
Exemplo n.º 3
0
 /**
  * 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;
     }
 }
Exemplo n.º 4
0
 /**
  * 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'));
     }
 }
Exemplo n.º 5
0
 public static function autoloadRegister()
 {
     if (static::$registered) {
         return false;
     }
     static::$registered = spl_autoload_register("\\App\\Lib\\Autoloader::loadClass");
     return self::$registered;
 }
Exemplo n.º 6
0
 /**
  * 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;
 }
Exemplo n.º 7
0
 /**
  * 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);
         }
     }
 }
Exemplo n.º 8
0
 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;
     }
 }
Exemplo n.º 9
0
	/**
	 * @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);
	}
Exemplo n.º 10
0
 /**
  * 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);
     }
 }
Exemplo n.º 11
0
 public static function unregister()
 {
     stream_wrapper_restore(static::$protocol);
     static::$registered = false;
 }
Exemplo n.º 12
0
 /**
  * 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']);
     }
 }
Exemplo n.º 13
0
 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);
 }
Exemplo n.º 14
0
 public static function unregister()
 {
     static::$registered = false;
 }
Exemplo n.º 15
0
 /**
  * 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'));
     }
 }
Exemplo n.º 16
0
 /**
  * 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('\\MicroMuffin\\ClassLoader', 'load'));
     }
 }
Exemplo n.º 17
0
 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register([static::class, 'load']);
     }
 }
Exemplo n.º 18
0
 public static function reset()
 {
     static::$registered = [];
 }
Exemplo n.º 19
0
 static function on($url)
 {
     $route = new static($url);
     if ($route->registered()) {
         Log::warn_Route("Overwriting registration of [{$url}].");
     }
     return $route->register();
 }
Exemplo n.º 20
0
 /**
  * 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('\\Floxim\\Floxim\\System\\ClassLoader', 'load'));
     }
 }
Exemplo n.º 21
0
Arquivo: App.php Projeto: rezon/sugi
 /**
  * Unregisters application autoload function
  */
 public static function unregister()
 {
     static::$registered = false;
     spl_autoload_unregister(array("\\Sugi\\App", "autoload"));
 }
Exemplo n.º 22
0
 /**
  * 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('\\Arx\\classes\\ClassLoader', 'load'));
     }
 }
Exemplo n.º 23
0
 public static function register()
 {
     if (static::$registered) {
         throw new \Nette\InvalidStateException('PhoneNumber control already registered.');
     }
     static::$registered = TRUE;
     $class = get_called_class();
     $callback = function (\Nette\Forms\Container $_this, $name, $label = NULL) use($class) {
         $control = new $class($label);
         $_this->addComponent($control, $name);
         return $control;
     };
     \Nette\Forms\Container::extensionMethod('addPhone', $callback);
 }
Exemplo n.º 24
0
 /**
  * Unregister the SPL autoloader.
  * 
  * @return void
  */
 public static function unregister()
 {
     spl_autoload_unregister(get_called_class() . '::load');
     static::$registered = false;
 }
Exemplo n.º 25
0
 /**
  * Register a SPL autoload function.
  * 
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register([__CLASS__, 'load']);
     }
 }
Exemplo n.º 26
0
 /**
  * Register the given class loader on the auto-loader stack.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(['\\Illuminate\\Support\\ClassLoader', 'load']);
     }
 }
 /**
  * @param string $method
  * @throws \Nette\InvalidStateException
  */
 public static function register($method = 'addAttachment')
 {
     if (static::$registered) {
         throw new \Nette\InvalidStateException('Upload control already registered.');
     }
     static::$registered = TRUE;
     \Nette\Forms\Container::extensionMethod($method, function (\Nette\Forms\Container $form, $name, $label = NULL) {
         $component = new static($label);
         $form->addComponent($component, $name);
         return $component;
     });
 }
Exemplo n.º 28
0
 /**
  * Registra el cargador de clases en la pila de auto-loader.
  *
  * @return void
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(array('ForeverPHP\\Core\\ClassLoader', 'load'));
     }
 }
Exemplo n.º 29
0
 /**
  * Register the given class loader on the auto-loader stack.
  */
 public static function register()
 {
     if (!static::$registered) {
         static::$registered = spl_autoload_register(array('\\Docolight\\Support\\ClassLoader', 'load'));
     }
 }