本文整理汇总了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;
}
}
示例2: register
public static function register()
{
if (!static::$registered) {
spl_autoload_register([__CLASS__, "load"]);
}
static::$registered = true;
}
示例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;
}
}
示例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'));
}
}
示例5: autoloadRegister
public static function autoloadRegister()
{
if (static::$registered) {
return false;
}
static::$registered = spl_autoload_register("\\App\\Lib\\Autoloader::loadClass");
return self::$registered;
}
示例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;
}
示例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);
}
}
}
示例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;
}
}
示例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);
}
示例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);
}
}
示例11: unregister
public static function unregister()
{
stream_wrapper_restore(static::$protocol);
static::$registered = false;
}
示例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']);
}
}
示例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);
}
示例14: unregister
public static function unregister()
{
static::$registered = false;
}
示例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'));
}
}