/** * Enter description here... * * @see Inspekt_Supercage::Factory() * @param string $config_file * @param boolean $strict */ function _makeCages($config_file = NULL, $strict = TRUE) { $this->get = Inspekt::makeGetCage($config_file, $strict); $this->post = Inspekt::makePostCage($config_file, $strict); $this->cookie = Inspekt::makeCookieCage($config_file, $strict); $this->env = Inspekt::makeEnvCage($config_file, $strict); $this->files = Inspekt::makeFilesCage($config_file, $strict); // $this->session = Inspekt::makeSessionCage($config_file, $strict); $this->server = Inspekt::makeServerCage($config_file, $strict); }
/** * Enter description here... * * @see Inspekt\Supercage::Factory() * @param string $config_file * @param boolean $strict */ protected function makeCages($config_file = null, $strict = true) { $this->get = Inspekt::makeGetCage($config_file, $strict); $this->post = Inspekt::makePostCage($config_file, $strict); $this->cookie = Inspekt::makeCookieCage($config_file, $strict); $this->env = Inspekt::makeEnvCage($config_file, $strict); $this->files = Inspekt::makeFilesCage($config_file, $strict); $this->server = Inspekt::makeServerCage($config_file, $strict); }
/** * */ public function testMakeGetCage() { $cage = Inspekt::makeGetCage(); $this->assertTrue($cage instanceof Inspekt_Cage); }
<?php /** * Demonstration of: * - use of static filter methods on arrays * - creating a cage on an arbitrary array * - Accessing cage param via array syntax */ require_once '../Inspekt.php'; $_GET['locale'] = "en_US"; $_GET['new'] = 1; $_GET['time'] = 1246233204.5486; $_GET['id'] = 7444632820.0; $_GET['key'] = "2.Hhun0mQ4KF1BfJ_WfeBB3Q__.86400.1246320000-714446282"; $_GET['ss'] = "un4SUm022i5sZ5iIZeNYWQ__"; $_GET['somestuff'] = "i, would, like, some, milk, and__cookies--please!"; $getCage = Inspekt::makeGetCage(); echo "\n<pre>All the cage params:\n\n"; foreach ($getCage as $key => $value) { var_dump($key); var_dump($value); var_dump($getCage->getAlpha($key)); echo "\n"; } echo 'Accessing cage param via array syntax "$getCage[\'locale\']" :: ' . Inspekt::getAlnum($getCage['locale']); echo "\n</pre>\n";
/** * Enter description here... * * @see Inspekt_Supercage::Factory() * @param boolean $strict */ function _makeCages($strict = TRUE) { $this->get = Inspekt::makeGetCage($strict); $this->post = Inspekt::makePostCage($strict); $this->cookie = Inspekt::makeCookieCage($strict); $this->env = Inspekt::makeEnvCage($strict); $this->files = Inspekt::makeFilesCage($strict); /** * Don't put session in cage as it will nullify $_SESSION and we will loose the session completely. * TODO: Find a way to put the session data in cage and still retain the session correctly */ //$this->session= Inspekt::makeSessionCage($strict); $this->server = Inspekt::makeServerCage($strict); }