Получение экземпляра как это:
$coreBootstrap = new PEP_Application_BootstrapCore(array('bootstrap' => $this));
Получает этот объект:
PEP_Application_BootstrapCore Object ( [_bootstrap:protected] => Bootstrap Object ( [_appNamespace:protected] => [_resourceLoader:protected] => [_application:protected] => PEP_Application Object ( [_autoloader:protected] => PEP_Autoloader Object ( [_autoloaders:protected] => Array ( [0] => Zend_Application_Module_Autoloader Object ( [_basePath:protected] => C:\LodgingPhp\com-ui-php\target\packaged-application\application [_components:protected] => Array ( [Default_Controller_Action_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers [Default_Module] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules [Default_Model_DbTable] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable [Default_Model_Mapper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers [Default_Form] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms [Default_Model] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models [Default_Plugin] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins [Default_Service] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services [Default_View_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers [Default_View_Filter] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) [_defaultResourceType:protected] => model [_namespace:protected] => Default [_resourceTypes:protected] => Array ( [actionhelper] => Array ( [namespace] => Default_Controller_Action_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers ) [module] => Array ( [namespace] => Default_Module [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules ) [dbtable] => Array ( [namespace] => Default_Model_DbTable [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable ) [mappers] => Array ( [namespace] => Default_Model_Mapper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers ) [form] => Array ( [namespace] => Default_Form [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms ) [model] => Array ( [namespace] => Default_Model [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models ) [plugin] => Array ( [namespace] => Default_Plugin [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins ) [service] => Array ( [namespace] => Default_Service [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services ) [viewhelper] => Array ( [namespace] => Default_View_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers ) [viewfilter] => Array ( [namespace] => Default_View_Filter [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) ) ) ) [_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 ) [_namespaceAutoloaders:protected] => Array ( [Default_] => Array ( [0] => Zend_Application_Module_Autoloader Object ( [_basePath:protected] => C:\LodgingPhp\com-ui-php\target\packaged-application\application [_components:protected] => Array ( [Default_Controller_Action_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers [Default_Module] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules [Default_Model_DbTable] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable [Default_Model_Mapper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers [Default_Form] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms [Default_Model] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models [Default_Plugin] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins [Default_Service] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services [Default_View_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers [Default_View_Filter] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) [_defaultResourceType:protected] => model [_namespace:protected] => Default [_resourceTypes:protected] => Array ( [actionhelper] => Array ( [namespace] => Default_Controller_Action_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers ) [module] => Array ( [namespace] => Default_Module [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules ) [dbtable] => Array ( [namespace] => Default_Model_DbTable [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable ) [mappers] => Array ( [namespace] => Default_Model_Mapper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers ) [form] => Array ( [namespace] => Default_Form [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms ) [model] => Array ( [namespace] => Default_Model [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models ) [plugin] => Array ( [namespace] => Default_Plugin [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins ) [service] => Array ( [namespace] => Default_Service [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services ) [viewhelper] => Array ( [namespace] => Default_View_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers ) [viewfilter] => Array ( [namespace] => Default_View_Filter [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) ) ) ) ) [_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 ( [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] => ) [session] => Array ( [strict] => ) [modules] => Array ( [0] => api [1] => tickets [2] => events [3] => passes [4] => plan [5] => resortaddons [6] => debugutils [7] => 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 ) ) ) [_classResources:protected] => Array ( [autoload] => _initAutoload [core] => _initCore [router] => _initRouter [servicestub] => _initServiceStub [mediaengineconfig] => _initMediaEngineConfig [viewhelpers] => _initViewHelpers [configurablestoreplugin] => _initConfigurableStorePlugin [languagesetupplugin] => _initLanguageSetupPlugin [keywordrouterplugin] => _initKeywordRouterPlugin [tripconfig] => _initTripConfig [dclkeepalive] => _initDclKeepAlive [helpconfig] => _initHelpConfig [analyticsgenericplugin] => _initAnalyticsGenericPlugin [postdispatchstatsdplugin] => _initPostDispatchStatsDPlugin [curoauthplugin] => _initCUROAuthPlugin [sessionserviceshdrplugin] => _initSessionServiceShdrPlugin ) [_container:protected] => Zend_Registry Object ( [storage:ArrayObject:private] => Array ( [autoload] => Zend_Application_Module_Autoloader Object ( [_basePath:protected] => C:\LodgingPhp\com-ui-php\target\packaged-application\application [_components:protected] => Array ( [Default_Controller_Action_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers [Default_Module] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules [Default_Model_DbTable] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable [Default_Model_Mapper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers [Default_Form] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms [Default_Model] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models [Default_Plugin] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins [Default_Service] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services [Default_View_Helper] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers [Default_View_Filter] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) [_defaultResourceType:protected] => model [_namespace:protected] => Default [_resourceTypes:protected] => Array ( [actionhelper] => Array ( [namespace] => Default_Controller_Action_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/controllers/actions/helpers ) [module] => Array ( [namespace] => Default_Module [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/modules ) [dbtable] => Array ( [namespace] => Default_Model_DbTable [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/DbTable ) [mappers] => Array ( [namespace] => Default_Model_Mapper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models/mappers ) [form] => Array ( [namespace] => Default_Form [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/forms ) [model] => Array ( [namespace] => Default_Model [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/models ) [plugin] => Array ( [namespace] => Default_Plugin [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/plugins ) [service] => Array ( [namespace] => Default_Service [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/services ) [viewhelper] => Array ( [namespace] => Default_View_Helper [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/helpers ) [viewfilter] => Array ( [namespace] => Default_View_Filter [path] => C:\LodgingPhp\com-ui-php\target\packaged-application\application/views/filters ) ) ) ) ) [_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] => ) [session] => Array ( [strict] => ) [modules] => Array ( [0] => api [1] => tickets [2] => events [3] => passes [4] => plan [5] => resortaddons [6] => debugutils [7] => 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] => ) [session] => Array ( [strict] => ) [modules] => Array ( [0] => api [1] => tickets [2] => events [3] => passes [4] => plan [5] => resortaddons [6] => debugutils [7] => 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:protected] => Array ( ) [_skipOptions:protected] => Array ( [0] => options [1] => config ) )
Когда я пытаюсь:
$coreBootstrap = array_merge(array_diff($coreBootstrap, array('setsystemtime')));
Я получаю это сообщение:
«array_merge (): Аргумент # 1 не является массивом в ….» Мне нужно удалить setsystemtime, но я не могу достичь его, я пробовал также array_search, но я получаю похожую ошибку.
Это php 5.4.4
Получив помощь, я понял, что это объект. Мне нужно, чтобы часть объекта «setsystemtime» и их значения были удалены.
Есть идеи?
Благодарю вас!
Вы можете привести объект как массив:
$coreBootstrap = array_merge(array_diff((array) $coreBootstrap, array('setsystemtime')));
Других решений пока нет …