/** * 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; } }
public static function register() { if (!static::$registered) { spl_autoload_register([__CLASS__, "load"]); } static::$registered = true; }
/** * 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; } }
/** * 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')); } }
public static function autoloadRegister() { if (static::$registered) { return false; } static::$registered = spl_autoload_register("\\App\\Lib\\Autoloader::loadClass"); return self::$registered; }
/** * 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; }
/** * 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); } } }
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; } }
/** * @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); }
/** * 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); } }
public static function unregister() { stream_wrapper_restore(static::$protocol); static::$registered = false; }
/** * 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']); } }
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); }
public static function unregister() { static::$registered = false; }
/** * 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')); } }
/** * 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')); } }
/** * 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']); } }
public static function reset() { static::$registered = []; }
static function on($url) { $route = new static($url); if ($route->registered()) { Log::warn_Route("Overwriting registration of [{$url}]."); } return $route->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('\\Floxim\\Floxim\\System\\ClassLoader', 'load')); } }
/** * Unregisters application autoload function */ public static function unregister() { static::$registered = false; spl_autoload_unregister(array("\\Sugi\\App", "autoload")); }
/** * 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')); } }
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); }
/** * Unregister the SPL autoloader. * * @return void */ public static function unregister() { spl_autoload_unregister(get_called_class() . '::load'); static::$registered = false; }
/** * Register a SPL autoload function. * * @return void */ public static function register() { if (!static::$registered) { static::$registered = spl_autoload_register([__CLASS__, 'load']); } }
/** * 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; }); }
/** * 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')); } }
/** * 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')); } }