Пример #1
0
 public function __construct()
 {
     if (GRAFT_CONFIG['DBHost'] == '' || GRAFT_CONFIG['DBName'] == '' || GRAFT_CONFIG['DBUser'] == '') {
         die('A database connection is required to run clout.');
     }
     // instance everything so the db gets setup
     // probably need a better way to do this
     // in the future #TODO
     \GraftPHP\Clout\Data::build();
     \GraftPHP\Clout\Field::build();
     \GraftPHP\Clout\FieldType::build();
     \GraftPHP\Clout\Record::build();
     \GraftPHP\Clout\Section::build();
     \GraftPHP\Clout\User::build();
     $this->data['sections'] = Section::all();
 }