/** * Constructor */ public function __construct() { // Use ASCII 0 as a nest separator; otherwise some of the unusual key names // we have (i.e. in WorldCat.ini search options) will get parsed in // unexpected ways. $this->iniReader = new IniReader(); $this->iniReader->setNestSeparator(chr(0)); }
public function onAdministratorPreDispatch(MvcEvent $e) { /** * @access Initialize the Paramters * @return array */ $cacheFileSystem = $e->getApplication()->getServiceManager()->get('Zend\\Cache\\Storage\\Adapter\\Filesystem'); if ($cacheFileSystem == false) { $e->getApplication()->getServiceManager()->get('ControllerPluginManager')->get('CoreCPlugin')->setLog('Administrator|Module', 'onAdministratorPreDispatch', 'Fatal Error :: Administrator|Module Line 51 - Cache Adapter FileSystem Callback False'); exit('Fatal Error : Administrator|Module'); } $cacheFileSystem->getOptions()->setNamespace(__NAMESPACE__); $cacheFileSystem->getOptions()->setTtl(864000); if (!$cacheFileSystem->hasItem('StaticParameters')) { $ini = new Ini(); $iniParameters = $ini->setNestSeparator('::')->fromFile(__DIR__ . '/config/p.ini'); $cacheFileSystem->setItem('StaticParameters', serialize($iniParameters)); } }
/** * Get the Ini Reader. * * @return \Zend\Config\Reader\Ini */ protected static function getIniReader() { static $iniReader = false; // Set up reader if it is not already present in the static variable: if (!$iniReader) { // Use ASCII 0 as a nest separator; otherwise some of the unusual // key names we have (i.e. in WorldCat.ini search options) will get // parsed in unexpected ways. $iniReader = new IniReader(); $iniReader->setNestSeparator(chr(0)); } return $iniReader; }