protected function _addManagerDecorators( MShop_Common_Manager_Interface $manager, $managerpath, $domain )
	{
		$config = $this->_context->getConfig();

		$decorators = $config->get( 'mshop/common/manager/decorators/default', array() );
		$excludes = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/excludes', array() );

		foreach( $decorators as $key => $name )
		{
			if( in_array( $name, $excludes ) ) {
				unset( $decorators[ $key ] );
			}
		}

		$classprefix = 'MShop_Common_Manager_Decorator_';
		$manager =  $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );

		$classprefix = 'MShop_Common_Manager_Decorator_';
		$decorators = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/global', array() );
		$manager =  $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );

		$subpath = $this->_createSubNames( $managerpath );
		$classprefix = 'MShop_'. ucfirst( $domain ) . '_Manager_' . $subpath . '_Decorator_';
		$decorators = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/local', array() );

		return $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );
	}
protected function _addManagerDecorators( MShop_Common_Manager_Interface $manager, $managerpath, $domain )
	{
		$config = $this->_context->getConfig();

		$decorators = $config->get( 'mshop/common/manager/decorators/default', array() );
		$excludes = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/excludes', array() );

		foreach( $decorators as $key => $name )
		{
			if( in_array( $name, $excludes ) ) {
				unset( $decorators[ $key ] );
			}
		}

		$classprefix = 'MShop_Common_Manager_Decorator_';
		$manager =  $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );

		$classprefix = 'MShop_Common_Manager_Decorator_';
		$decorators = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/global', array() );
		$manager =  $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );

		$subpath = $this->_createSubNames( $managerpath );
		$classprefix = 'MShop_'. ucfirst( $domain ) . '_Manager_' . $subpath . '_Decorator_';
		$decorators = $config->get( 'mshop/' . $domain . '/manager/' . $managerpath . '/decorators/local', array() );

		return $this->_addDecorators( $this->_context, $manager, $decorators, $classprefix );
	}
protected function _addManagerDecorators ( MShop_Common_Manager_Interface $ manager , $ managerpath , $ domain ) { $ config = $ this -> _context -> getConfig ( ) ; $ decorators = $ config -> get ( 'mshop/common/manager/decorators/default' , array ( ) ) ; $ excludes = $ config -> get ( 'mshop/' . $ domain . '/manager/' . $ managerpath . '/decorators/excludes' , array ( ) ) ; foreach ( $ decorators as $ key => $ name ) { if ( in_array ( $ name , $ excludes ) ) { unset ( $ decorators [ $ key ] ) ; } } $ classprefix = 'MShop_Common_Manager_Decorator_' ; $ manager = $ this -> _addDecorators ( $ this -> _context , $ manager , $ decorators , $ classprefix ) ; $ classprefix = 'MShop_Common_Manager_Decorator_' ; $ decorators = $ config -> get ( 'mshop/' . $ domain . '/manager/' . $ managerpath . '/decorators/global' , array ( ) ) ; $ manager = $ this -> _addDecorators ( $ this -> _context , $ manager , $ decorators , $ classprefix ) ; $ subpath = $ this -> _createSubNames ( $ managerpath ) ; $ classprefix = 'MShop_' . ucfirst ( $ domain ) . '_Manager_' . $ subpath . '_Decorator_' ; $ decorators = $ config -> get ( 'mshop/' . $ domain . '/manager/' . $ managerpath . '/decorators/local' , array ( ) ) ; return $ this -> _addDecorators ( $ this -> _context , $ manager , $ decorators , $ classprefix ) ; }
Adds the configured decorators to the given manager object.

@param MShop_Common_Manager_Interface $manager Manager object
@param string $managerpath Manager sub-names separated by slashes, e.g. "list/type"
@param string $domain Domain name in lower case, e.g. "product"
Adds the configured decorators to the given manager object .