/** * @return void */ public static function boot() { static::bootLearnAreas(); static::bootSortAreas(); static::bootValidationExpression(); static::$booted = true; }
public static function boot() { parent::boot(); if (!static::$observers) { static::$observers = array(); } if (!static::$booted) { static::$booted = array(); } }
/** * Boot Analogue * * @return Analogue */ public function boot() { if (static::$booted) { return $this; } $dispatcher = new Dispatcher(); $connectionProvider = new CapsuleConnectionProvider(static::$capsule); $illuminate = new IlluminateDriver($connectionProvider); $driverManager = new DriverManager(); $driverManager->addDriver($illuminate); static::$manager = new Manager($driverManager, $dispatcher); static::$instance = $this; static::$booted = true; return $this; }
/** * Clear the list of booted models so they will be re-booted. * * @return void */ public static function clearBootedModels() { static::$booted = []; static::$globalScopes = []; }
/** * Clear the list of booted models so they will be re-booted. * * @return void */ public static function clearBootedModels() { static::$booted = []; }
public static function clearBootedModels() { static::$booted = array(); static::$globalScopes = array(); }
public static function clearBootedModels() { static::$booted = array(); }
/** * @return $this */ public function setBooted() { static::$booted = get_called_class(); return $this; }
/** * **Make a new Application instance.** * * @param array $paths * * @return Application */ public static function make(array $paths) : Application { // The Application is, in effect, a singleton... // so if the application already exists then simply return it. if (NULL !== static::$instance and NULL !== Forge::getApplication()) { return Forge::getApplication(); } // cache AppFactory instance. static::$instance ?: new static($paths); // block anything else from making a new Application. static::$booted = TRUE; // make the application $application = static::$instance->makeApplication($paths); Forge::setApplication($application); return $application; }
/** * ONLY FOR TESTS! * Metod resets static::$booted */ public static function __resetBootedStaticProperty() { static::$booted = []; }