src/Foundation/Kernel.php
/**
	 * Runs boot scripts with the specified priority (0 to 2).
	 *
	 * @param int $priority
	 */
Runs boot scripts with the specified priority (0 to 2).
@param int $priority
Runs boot scripts with the specified priority ( 0 to 2 ) . @param int $priority
private function invokeBootScripts($priority) {
		$classes = config('app.bootstrap', config('app.boot', array()));
		foreach ($classes as $action => $p) {
			if ($p == $priority) {
				if (is_string($action)) {
					if (strpos($action, '::') !== false) {
						list($className, $methodName) = explode('::', $action, 2);
						$class = new \ReflectionClass($className);
						$method = $class->getMethod($methodName);
						if ($method->isStatic()) {
							forward_static_call(array($className, $methodName));
							continue;
						}
						$action = array(new $className(), $methodName);
					}
					else {
						$action = array(new $action(), '__invoke');
					}
				}
				call_user_func_array($action, array());
			}
		}
	}
private function invokeBootScripts ( $ priority ) { $ classes = config ( 'app.bootstrap' , config ( 'app.boot' , array ( ) ) ) ; foreach ( $ classes as $ action => $ p ) { if ( $ p == $ priority ) { if ( is_string ( $ action ) ) { if ( strpos ( $ action , '::' ) !== false ) { list ( $ className , $ methodName ) = explode ( '::' , $ action , 2 ) ; $ class = new \ ReflectionClass ( $ className ) ; $ method = $ class -> getMethod ( $ methodName ) ; if ( $ method -> isStatic ( ) ) { forward_static_call ( array ( $ className , $ methodName ) ) ; continue ; } $ action = array ( new $ className ( ) , $ methodName ) ; } else { $ action = array ( new $ action ( ) , '__invoke' ) ; } } call_user_func_array ( $ action , array ( ) ) ; } } }
Runs boot scripts with the specified priority (0 to 2).
Runs boot scripts with the specified priority ( 0 to 2 ) .