public function __construct(AbstractController $controller = null)
 {
     $this->config = Config::parseConfig(DEFAULT_CONFIG_PATH, CONFIG_PATH);
     $this->language = new Language();
     if (!empty($controller)) {
         $this->view = $controller->getView();
     } else {
         $this->setView();
     }
 }
 public function Consultar()
 {
     $_SESSION["url"] = "Pedido/consultar";
     $model = new PedidoModel();
     $this->params['pedido'] = $model->findPedido();
     parent::render();
 }
 public function Editar()
 {
     $_SESSION["url"] = "Cliente/editar";
     if (isset($_POST['id'])) {
         $model = new ClienteModel();
         if (isset($_POST['nome'])) {
             $model->updateCliente($_POST);
         }
         $this->params['cliente'] = $model->findClienteById($_POST['id']);
     }
     parent::render();
 }
Esempio n. 4
0
 public function Index()
 {
     $_SESSION["url"] = "Home/index";
     parent::render();
 }