/**
  * @return void
  */
 public static function boot()
 {
     static::bootLearnAreas();
     static::bootSortAreas();
     static::bootValidationExpression();
     static::$booted = true;
 }
Example #2
0
 public static function boot()
 {
     parent::boot();
     if (!static::$observers) {
         static::$observers = array();
     }
     if (!static::$booted) {
         static::$booted = array();
     }
 }
Example #3
0
 /**
  * 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;
 }
Example #4
0
 /**
  * Clear the list of booted models so they will be re-booted.
  *
  * @return void
  */
 public static function clearBootedModels()
 {
     static::$booted = [];
     static::$globalScopes = [];
 }
Example #5
0
 /**
  * Clear the list of booted models so they will be re-booted.
  *
  * @return void
  */
 public static function clearBootedModels()
 {
     static::$booted = [];
 }
Example #6
0
 public static function clearBootedModels()
 {
     static::$booted = array();
     static::$globalScopes = array();
 }
Example #7
0
 public static function clearBootedModels()
 {
     static::$booted = array();
 }
 /**
  * @return $this
  */
 public function setBooted()
 {
     static::$booted = get_called_class();
     return $this;
 }
Example #9
0
 /**
  * **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;
 }
Example #10
0
 /**
  * ONLY FOR TESTS!
  * Metod resets static::$booted
  */
 public static function __resetBootedStaticProperty()
 {
     static::$booted = [];
 }