public function __construct(\Slim\Mvc\App $app) { parent::__construct(); $pdo = new \PDO(sprintf('mysql:host=%s;dbname=%s', $app->config('database.host'), $app->config('database.shem')), $app->config('database.user'), $app->config('database.pass')); $this->db = new \FluentPDO($pdo); $this->events()->publish('core.database.init', [$this]); }
public function __construct() { /** * Create an instance of EntityManager through the slim mvc application. * This is an workaround due the ORM is not implemented well enough in this framework. */ App::modules()->models(); }
protected function initializeContainer() { $this->container = App::instance()->getDIContainer(); }
public function initialize(AbstractPlugin $plugin) { $plugin->setContainer($this->app->getDIContainer()); $plugin->initialize(); }
public function urlFunction($path = '') { return App::instance()->url($path); }