/**
  * @param ContainerInterface|array $container
  */
 public function __construct($container = [])
 {
     parent::__construct($container);
     $this->getContainer()['app'] = function () {
         return $this;
     };
     $this->setupServices();
     $this->setupEnvData();
     $this->loadRoutes();
     $this->setupNotFound();
     $this->setupErrorHandler();
     Model::setApp($this);
 }
Example #2
0
 public function setModel(Model $model)
 {
     $this->model = $model;
     $this->from($model->getTable());
     return $this;
 }