Как я могу удалить все элементы setsystemtime из этого массива?
Это php версия 4.4
Это вывод экземпляра внутри моего кода:
2016-10-19T00:54:41-04:00 INFO (6): Array
(
[ * _bootstrap] => Bootstrap Object
(
[_appNamespace:protected] =>
[_resourceLoader:protected] =>
[_application:protected] => PEP_Application Object
(
[_autoloader:protected] => PEP_Autoloader Object
([_defaultAutoloader:protected] => Array
(
[0] => PEP_Loader
[1] => loadClass
)
[_fallbackAutoloader:protected] =>
[_internalAutoloader:protected] => Array
(
[0] => PEP_Autoloader Object
*RECURSION*
[1] => _autoload
)
[_namespaces:protected] => Array
(
[Zend_] => 1
[ZendX_] => 1
[WDPRO_] => 1
[PEP_] => 1
[controllers_helpers_] => 1
[Guzzle] => 1
[Symfony] => 1
)
[_suppressNotFoundWarnings:protected] =>
[_zfPath:protected] =>
)
[_bootstrap:protected] => Bootstrap Object
*RECURSION*
[_environment:protected] => local
[_optionKeys:protected] => Array
(
[0] => phpsettings
[1] => includepaths
[2] => bootstrap
[3] => resources
[4] => deviceprofiling
[5] => pluginpaths
[6] => autoloadernamespaces
)
[_options:protected] => Array
(
[resources] => Array
(
[frontController] => Array
(
[controllerDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers
[moduleDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules
)
[layout] => Array
(
[layoutPath] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/layouts/scripts
)
[setsystemtime] => Array
(
[load] => 1
)
[session] => Array
(
[strict] => 1
)
[modules] => Array
(
[0] => api
[1] => trip
[2] => tickets
[3] => events
[4] => passes
[5] => plan
[6] => resortaddons
[7] => debugutils
[8] => visa-instant-credit
)
[view] =>
[log] => Array
(
[logConfig] => /configs/log.ini
)
[stats] => Array
(
[serviceLogLevel] => INFO
[requestResponseLogLevel] => DEBUG
[viewLogLevel] => INFO
[actionLogLevel] => INFO
[appLogLevel] => INFO
[memoryLogLevel] => DEBUG
)
[serviceSuccessLog] => Array
(
[logConfig] => /configs/serviceSuccessLog.ini
)
)
[deviceprofiling] => Array
(
[cookieName] => WDPROView
[timeToLive] => 604800
[cookiePath] => /
[enabled] => 1
[routeBlackList] => Array
(
[0] => /api
[1] => /utils
)
)
[pluginpaths] => Array
(
[PEP_Stats_Resource_] => PEP/Stats/Resource
[PEP_Application_Resource_] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/../library/PEP/Application/Resource
[Default_Resource_] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/resource
)
[autoloadernamespaces] => Array
(
[0] => WDPRO_
[1] => Zend_
[2] => PEP_
[3] => controllers_helpers_
[4] => Guzzle
[5] => Symfony
)
)
)
[_environment:protected] =>
[_optionKeys:protected] => Array
(
[0] => phpsettings
[1] => includepaths
[2] => bootstrap
[3] => resources
[4] => deviceprofiling
[5] => pluginpaths
[6] => autoloadernamespaces
)
[_options:protected] => Array
(
[phpSettings] => Array
(
[log_errors] => 1
[date] => Array
(
[timezone] => America/New_York
)
[display_startup_errors] => 0
[display_errors] => 1
[error_reporting] => 32767
[error_log] => C:\LodgingPhp\com-ui-php\target/logs/php_error.log
)
[includePaths] => Array
(
[library] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/../library
)
[bootstrap] => Array
(
[path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/Bootstrap.php
[class] => Bootstrap
)
[resources] => Array
(
[frontController] => Array
(
[controllerDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers
[moduleDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules
)
[layout] => Array
(
[layoutPath] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/layouts/scripts
)
[setsystemtime] => Array
(
[load] => 1
)
[session] => Array
(
[strict] => 1
)
[modules] => Array
(
[0] => api
[1] => trip
[2] => tickets
[3] => events
[4] => passes
[5] => plan
[6] => resortaddons
[7] => debugutils
[8] => visa-instant-credit
)
[view] =>
[log] => Array
(
[logConfig] => /configs/log.ini
)
[stats] => Array
(
[serviceLogLevel] => INFO
[requestResponseLogLevel] => DEBUG
[viewLogLevel] => INFO
[actionLogLevel] => INFO
[appLogLevel] => INFO
[memoryLogLevel] => DEBUG
)
[serviceSuccessLog] => Array
(
[logConfig] => /configs/serviceSuccessLog.ini
)
)
[deviceprofiling] => Array
(
[cookieName] => WDPROView
[timeToLive] => 604800
[cookiePath] => /
[enabled] => 1
[routeBlackList] => Array
(
[0] => /api
[1] => /utils
)
)
[pluginpaths] => Array
(
[PEP_Stats_Resource_] => PEP/Stats/Resource
[PEP_Application_Resource_] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/../library/PEP/Application/Resource
[Default_Resource_] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/resource
)
[autoloadernamespaces] => Array
(
[0] => WDPRO_
[1] => Zend_
[2] => PEP_
[3] => controllers_helpers_
[4] => Guzzle
[5] => Symfony
)
)
[_pluginLoader:protected] =>
[_pluginResources:protected] => Array
(
[layout] => Array
(
[layoutPath] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/layouts/scripts
)
[setsystemtime] => Array
(
[load] => 1
)
[session] => Array
(
[strict] => 1
)
[modules] => Array
(
[0] => api
[1] => trip
[2] => tickets
[3] => events
[4] => passes
[5] => plan
[6] => resortaddons
[7] => debugutils
[8] => visa-instant-credit
)
[view] =>
[log] => Array
(
[logConfig] => /configs/log.ini
)
[stats] => Array
(
[serviceLogLevel] => INFO
[requestResponseLogLevel] => DEBUG
[viewLogLevel] => INFO
[actionLogLevel] => INFO
[appLogLevel] => INFO
[memoryLogLevel] => DEBUG
)
[serviceSuccessLog] => Array
(
[logConfig] => /configs/serviceSuccessLog.ini
)
[frontcontroller] => Zend_Application_Resource_Frontcontroller Object
(
[_front:protected] =>
[_bootstrap:protected] => Bootstrap Object
*RECURSION*
[_options:protected] => Array
(
[controllerDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers
[moduleDirectory] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules
)
[_skipOptions:protected] => Array
(
[0] => options
[1] => config
)
)
)
[_run:protected] => Array
(
[0] => autoload
)
[_started:protected] => Array
(
[core] => 1
)
)
[ * _options] => Array
(
)
[ * _skipOptions] => Array
(
[0] => options
[1] => config
)
)
Я пробовал что-то вроде этого, и некоторые варианты для unset не делают работу … Есть идеи?
foreach($a as $key => $b)
{
if($b == 'setsystemtime')
{
unset($a[$key]);
}
}
Ища другие ответы, я также пытаюсь это
foreach (array_keys($a, 'setsystemtime' , true) as $key) {
$logger->info('encontro a setsystem time!!!!!');
unset($a[$key]);
}
Но никогда не входит на это.
Спасибо всем!!
Задача ещё не решена.
Других решений пока нет …