Help migration 3x to 4x |
My ControllerBase:
<?php namespace App\Controllers; use CodeIgniter\Controller; use App\Libraries\My_parser; use App\Libraries\Preferencia; use App\Models\index_model; use App\Libraries\Traducao; use App\Libraries\Menus; class BaseController extends Controller { protected $helpers = []; public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) { // Do Not Edit This Line parent::initController($request, $response, $logger); $this->_db = \Config\Database::connect(); $this->My_parser = new My_Parser(); $this->preferencia = new Preferencia(); $this->_model = new \App\Models\index_model(); $this->traducao = new Traducao(); $this->menus = new \App\Libraries\Menus(); //$this->$session = \Config\Services:ession($config); } public function output($data, $status){ $this->output ->set_status_header(200) ->set_content_type('application/json', 'utf-8') ->set_output( json_encode( array( 'status'=> $status, 'response'=> $data ), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) )->_display(); exit; } } class Usuario extends BaseController{ public $usuario = array(); public function __construct(){ parent::__construct(); // verifica se existe sessão if(!$this->session->has_userdata('id')){ $this->session->sess_destroy(); redirect("app-admin/logout"); } } public function getUsuario(){ return $this->usuario; } } My Erro: please help-me, and sorry my bad english Good day Guys |
Messages In This Thread |
Help migration 3x to 4x - by guilhermepalange - 10-07-2020, 07:11 AM
RE: Help migration 3x to 4x - by guilhermepalange - 10-07-2020, 07:12 AM
RE: Help migration 3x to 4x - by InsiteFX - 10-07-2020, 01:44 PM
RE: Help migration 3x to 4x - by guilhermepalange - 10-07-2020, 05:16 PM
RE: Help migration 3x to 4x - by InsiteFX - 10-08-2020, 03:36 AM
|