$this->app->route('GET /json/item/@key/@operator/@value', 'ItemController->getItemsByKey'); $this->app->route('POST /json/item/new', 'ItemController->postNewItem'); $this->app->route('POST /json/item/@id/edit', 'ItemController->postEditItem'); } private function initItemTransactionController() { $this->app->route('GET /json/itemtransaction', 'ItemTransactionController->getAll'); $this->app->route('GET /json/itemtransaction/@id', 'ItemTransactionController->getItemTransactionById'); $this->app->route('GET /json/itemtransaction/date/@date', 'ItemTransactionController->getItemsTransactionsByDate'); $this->app->route('GET /json/itemtransaction/time/@time', 'ItemTransactionController->getItemsTransactionsByTime'); $this->app->route('GET /json/itemtransaction/datetime/@date/@time', 'ItemTransactionController->getItemsTransactionsByDateTime'); $this->app->route('GET /json/itemtransaction/datetime/@operator/@date/@time', 'ItemTransactionController->getItemsTransactionsByDateTime'); $this->app->route('POST /json/itemtransaction/new', 'ItemTransactionController->postNewItemTransaction'); } private function initAppController() { $this->app->route('GET @get_home:/', 'AppController->getHome'); $this->app->route('GET @get_login:/login', 'AppController->getLogin'); $this->app->route('GET /logout', 'AppController->getLogout'); $this->app->route('POST /login', 'AppController->postLogin'); $this->app->route('GET @get_inventory:/inventory', 'AppController->getInventory'); $this->app->route('GET @get_cashier:/cashier', 'AppController->getCashier'); } public function start() { $this->app->run(); } } $boot = new Boot(); $boot->start();