示例#1
0
 /**
  * @param   string  $views
  */
 public function __construct($views = null)
 {
     if ($views !== null) {
         $this->views = $views;
     }
     $this->fileExtension = Config::get('view.extension', '.php');
 }
示例#2
0
 /**
  * @param   null|string $name
  *
  * @return  void
  */
 public static function connect($name = null)
 {
     if (is_null($name)) {
         $name = 'default';
     }
     if (is_null(self::$connection)) {
         $config = Config::get('database');
         self::$connection = new Connection($config[$name]);
     }
 }
示例#3
0
 /**
  * @return  callable
  */
 public function getGuard()
 {
     // Add the namespace prefix for the guard classes to the classname
     $classname = '\\' . Config::get('app.name') . '\\Guard\\' . $this->guard[0];
     return $this->createCallable($classname, $this->guard[1]);
 }