Welcome Guest, Not a member yet? Register   Sign In
Dump of the Controllers $params
#1

I though that some of you may find this interesting.

PHP Code:
C:\xampp\htdocs\ci4\application\Controllers\Home.php @line62
Debug 
#1 of 1: 
array(2) {
 
 [0]=>
 
 object(CodeIgniter\HTTP\IncomingRequest)#9 (17) {
 
   ["enableCSRF":protected]=>
 
   bool(false)
 
   ["uri"]=>
 
   object(CodeIgniter\HTTP\URI)#10 (12) {
 
     ["uriString":protected]=>
 
     NULL
      
["segments":protected]=>
 
     array(2) {
 
       [0]=>
 
       string(0""
 
       [1]=>
 
       string(0""
 
     }
 
     ["scheme":protected]=>
 
     string(4"http"
 
     ["user":protected]=>
 
     NULL
      
["password":protected]=>
 
     NULL
      
["host":protected]=>
 
     string(7"ci4.dev"
 
     ["port":protected]=>
 
     NULL
      
["path":protected]=>
 
     string(1"/"
 
     ["fragment":protected]=>
 
     string(0""
 
     ["query":protected]=>
 
     array(0) {
 
     }
 
     ["defaultPorts":protected]=>
 
     array(4) {
 
       ["http"]=>
 
       int(80)
 
       ["https"]=>
 
       int(443)
 
       ["ftp"]=>
 
       int(21)
 
       ["sftp"]=>
 
       int(22)
 
     }
 
     ["showPassword":protected]=>
 
     bool(false)
 
   }
 
   ["files":protected]=>
 
   NULL
    
["negotiate":protected]=>
 
   NULL
    
["defaultLocale":protected]=>
 
   string(2"en"
 
   ["locale":protected]=>
 
   string(2"en"
 
   ["validLocales":protected]=>
 
   array(1) {
 
     [0]=>
 
     string(2"en"
 
   }
 
   ["config"]=>
 
   object(Config\App)#6 (31) {
 
     ["baseURL"]=>
 
     string(15"http://ci4.dev/"
 
     ["indexPage"]=>
 
     string(0""
 
     ["uriProtocol"]=>
 
     string(11"REQUEST_URI"
 
     ["defaultLocale"]=>
 
     string(2"en"
 
     ["negotiateLocale"]=>
 
     bool(false)
 
     ["supportedLocales"]=>
 
     array(1) {
 
       [0]=>
 
       string(2"en"
 
     }
 
     ["appTimezone"]=>
 
     string(16"America/New_York"
 
     ["charset"]=>
 
     string(5"UTF-8"
 
     ["forceGlobalSecureRequests"]=>
 
     bool(false)
 
     ["sessionDriver"]=>
 
     string(40"CodeIgniter\Session\Handlers\FileHandler"
 
     ["sessionCookieName"]=>
 
     string(10"ci_session"
 
     ["sessionExpiration"]=>
 
     int(7200)
 
     ["sessionSavePath"]=>
 
     NULL
      
["sessionMatchIP"]=>
 
     bool(false)
 
     ["sessionTimeToUpdate"]=>
 
     int(300)
 
     ["sessionRegenerateDestroy"]=>
 
     bool(false)
 
     ["cookiePrefix"]=>
 
     string(0""
 
     ["cookieDomain"]=>
 
     string(0""
 
     ["cookiePath"]=>
 
     string(1"/"
 
     ["cookieSecure"]=>
 
     bool(false)
 
     ["cookieHTTPOnly"]=>
 
     bool(false)
 
     ["proxyIPs"]=>
 
     string(0""
 
     ["CSRFTokenName"]=>
 
     string(14"csrf_test_name"
 
     ["CSRFCookieName"]=>
 
     string(16"csrf_cookie_name"
 
     ["CSRFExpire"]=>
 
     int(7200)
 
     ["CSRFRegenerate"]=>
 
     bool(true)
 
     ["CSPEnabled"]=>
 
     bool(false)
 
     ["toolbarCollectors"]=>
 
     array(6) {
 
       [0]=>
 
       string(43"CodeIgniter\Debug\Toolbar\Collectors\Timers"
 
       [1]=>
 
       string(45"CodeIgniter\Debug\Toolbar\Collectors\Database"
 
       [2]=>
 
       string(41"CodeIgniter\Debug\Toolbar\Collectors\Logs"
 
       [3]=>
 
       string(42"CodeIgniter\Debug\Toolbar\Collectors\Views"
 
       [4]=>
 
       string(42"CodeIgniter\Debug\Toolbar\Collectors\Files"
 
       [5]=>
 
       string(43"CodeIgniter\Debug\Toolbar\Collectors\Routes"
 
     }
 
     ["errorViewPath"]=>
 
     string(44"C:\xampp\htdocs\ci4\application\Views/errors"
 
     ["salt"]=>
 
     string(0""
 
     ["registrars":protected]=>
 
     NULL
    
}
 
   ["oldInput":protected]=>
 
   array(0) {
 
   }
 
   ["ipAddress":protected]=>
 
   string(0""
 
   ["proxyIPs":protected]=>
 
   string(0""
 
   ["method":protected]=>
 
   string(3"GET"
 
   ["headers":protected]=>
 
   array(8) {
 
     ["Host"]=>
 
     object(CodeIgniter\HTTP\Header)#11 (2) {
 
       ["name":protected]=>
 
       string(4"Host"
 
       ["value":protected]=>
 
       string(7"ci4.dev"
 
     }
 
     ["Connection"]=>
 
     object(CodeIgniter\HTTP\Header)#12 (2) {
 
       ["name":protected]=>
 
       string(10"Connection"
 
       ["value":protected]=>
 
       string(10"keep-alive"
 
     }
 
     ["Upgrade-Insecure-Requests"]=>
 
     object(CodeIgniter\HTTP\Header)#13 (2) {
 
       ["name":protected]=>
 
       string(25"Upgrade-Insecure-Requests"
 
       ["value":protected]=>
 
       string(1"1"
 
     }
 
     ["User-Agent"]=>
 
     object(CodeIgniter\HTTP\Header)#14 (2) {
 
       ["name":protected]=>
 
       string(10"User-Agent"
 
       ["value":protected]=>
 
       string(114"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
 
     }
 
     ["Accept"]=>
 
     object(CodeIgniter\HTTP\Header)#15 (2) {
 
       ["name":protected]=>
 
       string(6"Accept"
 
       ["value":protected]=>
 
       string(85"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
 
     }
 
     ["Accept-Encoding"]=>
 
     object(CodeIgniter\HTTP\Header)#16 (2) {
 
       ["name":protected]=>
 
       string(15"Accept-Encoding"
 
       ["value":protected]=>
 
       string(13"gzip, deflate"
 
     }
 
     ["Accept-Language"]=>
 
     object(CodeIgniter\HTTP\Header)#17 (2) {
 
       ["name":protected]=>
 
       string(15"Accept-Language"
 
       ["value":protected]=>
 
       string(14"en-US,en;q=0.8"
 
     }
 
     ["Cookie"]=>
 
     object(CodeIgniter\HTTP\Header)#18 (2) {
 
       ["name":protected]=>
 
       string(6"Cookie"
 
       ["value":protected]=>
 
       string(43"ci_session=rrb06hhec9vdhpfnd1gircagu9l1ngkt"
 
     }
 
   }
 
   ["headerMap":protected]=>
 
   array(8) {
 
     ["host"]=>
 
     string(4"Host"
 
     ["connection"]=>
 
     string(10"Connection"
 
     ["upgrade-insecure-requests"]=>
 
     string(25"Upgrade-Insecure-Requests"
 
     ["user-agent"]=>
 
     string(10"User-Agent"
 
     ["accept"]=>
 
     string(6"Accept"
 
     ["accept-encoding"]=>
 
     string(15"Accept-Encoding"
 
     ["accept-language"]=>
 
     string(15"Accept-Language"
 
     ["cookie"]=>
 
     string(6"Cookie"
 
   }
 
   ["protocolVersion":protected]=>
 
   string(3"1.1"
 
   ["validProtocolVersions":protected]=>
 
   array(3) {
 
     [0]=>
 
     string(3"1.0"
 
     [1]=>
 
     string(3"1.1"
 
     [2]=>
 
     string(1"2"
 
   }
 
   ["body":protected]=>
 
   string(0""
 
 }
 
 [1]=>
 
 object(CodeIgniter\HTTP\Response)#20 (14) {
 
   ["reason":protected]=>
 
   string(2"OK"
 
   ["statusCode":protected]=>
 
   int(200)
 
   ["CSPEnabled":protected]=>
 
   bool(false)
 
   ["CSP"]=>
 
   NULL
    
["cookiePrefix":protected]=>
 
   string(0""
 
   ["cookieDomain":protected]=>
 
   string(0""
 
   ["cookiePath":protected]=>
 
   string(1"/"
 
   ["cookieSecure":protected]=>
 
   bool(false)
 
   ["cookieHTTPOnly":protected]=>
 
   bool(false)
 
   ["headers":protected]=>
 
   array(2) {
 
     ["Cache-control"]=>
 
     object(CodeIgniter\HTTP\Header)#19 (2) {
 
       ["name":protected]=>
 
       string(13"Cache-control"
 
       ["value":protected]=>
 
       array(3) {
 
         [0]=>
 
         string(8"no-store"
 
         [1]=>
 
         string(9"max-age=0"
 
         [2]=>
 
         string(8"no-cache"
 
       }
 
     }
 
     ["Content-Type"]=>
 
     object(CodeIgniter\HTTP\Header)#21 (2) {
 
       ["name":protected]=>
 
       string(12"Content-Type"
 
       ["value":protected]=>
 
       string(24"text/html; charset=UTF-8"
 
     }
 
   }
 
   ["headerMap":protected]=>
 
   array(2) {
 
     ["cache-control"]=>
 
     string(13"Cache-control"
 
     ["content-type"]=>
 
     string(12"Content-Type"
 
   }
 
   ["protocolVersion":protected]=>
 
   string(3"1.1"
 
   ["validProtocolVersions":protected]=>
 
   array(3) {
 
     [0]=>
 
     string(3"1.0"
 
     [1]=>
 
     string(3"1.1"
 
     [2]=>
 
     string(1"2"
 
   }
 
   ["body":protected]=>
 
   NULL
  
}


So as you see this is a formatted view dump of the controllers $params that are passed in the constructor.

NOTE: I am using the Base PublicController here to show that it works.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB