protected function _getSubManager( $domain, $manager, $name )
	{
		$domain = strtolower( $domain );
		$manager = strtolower( $manager );
		$key = $domain . $manager . $name;

		if( !isset( $this->_subManagers[$key] ) )
		{
			if( empty( $domain ) || ctype_alnum( $domain ) === false ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in domain name "%1$s"', $domain ) );
			}

			if( preg_match( '/^[a-z0-9\/]+$/', $manager ) !== 1 ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in manager name "%1$s"', $manager ) );
			}

			if( $name === null ) {
				$path = 'classes/' . $domain . '/manager/' . $manager . '/name';
				$name = $this->_context->getConfig()->get( $path, 'Default' );
			}

			if( empty( $name ) || ctype_alnum( $name ) === false ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in manager name "%1$s"', $name ) );
			}

			$domainname = ucfirst( $domain );
			$subnames = $this->_createSubNames( $manager );

			$classname = 'MShop_'. $domainname . '_Manager_' . $subnames . '_' . $name;
			$interface = 'MShop_'. $domainname . '_Manager_' . $subnames . '_Interface';

			if( class_exists( $classname ) === false ) {
				throw new MShop_Exception( sprintf( 'Class "%1$s" not available', $classname ) );
			}

			$subManager = new $classname( $this->_context );

			if( ( $subManager instanceof $interface ) === false ) {
				throw new MShop_Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
			}

			$this->_subManagers[$key] = $this->_addManagerDecorators( $subManager, $manager, $domain );
		}

		return $this->_subManagers[$key];
	}
protected function _getSubManager( $domain, $manager, $name )
	{
		$domain = strtolower( $domain );
		$manager = strtolower( $manager );
		$key = $domain . $manager . $name;

		if( !isset( $this->_subManagers[$key] ) )
		{
			if( empty( $domain ) || ctype_alnum( $domain ) === false ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in domain name "%1$s"', $domain ) );
			}

			if( preg_match( '/^[a-z0-9\/]+$/', $manager ) !== 1 ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in manager name "%1$s"', $manager ) );
			}

			if( $name === null ) {
				$path = 'classes/' . $domain . '/manager/' . $manager . '/name';
				$name = $this->_context->getConfig()->get( $path, 'Default' );
			}

			if( empty( $name ) || ctype_alnum( $name ) === false ) {
				throw new MShop_Exception( sprintf( 'Invalid characters in manager name "%1$s"', $name ) );
			}

			$domainname = ucfirst( $domain );
			$subnames = $this->_createSubNames( $manager );

			$classname = 'MShop_'. $domainname . '_Manager_' . $subnames . '_' . $name;
			$interface = 'MShop_'. $domainname . '_Manager_' . $subnames . '_Interface';

			if( class_exists( $classname ) === false ) {
				throw new MShop_Exception( sprintf( 'Class "%1$s" not available', $classname ) );
			}

			$subManager = new $classname( $this->_context );

			if( ( $subManager instanceof $interface ) === false ) {
				throw new MShop_Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
			}

			$this->_subManagers[$key] = $this->_addManagerDecorators( $subManager, $manager, $domain );
		}

		return $this->_subManagers[$key];
	}
protected function _getSubManager ( $ domain , $ manager , $ name ) { $ domain = strtolower ( $ domain ) ; $ manager = strtolower ( $ manager ) ; $ key = $ domain . $ manager . $ name ; if ( ! isset ( $ this -> _subManagers [ $ key ] ) ) { if ( empty ( $ domain ) || ctype_alnum ( $ domain ) === false ) { throw new MShop_Exception ( sprintf ( 'Invalid characters in domain name "%1$s"' , $ domain ) ) ; } if ( preg_match ( '/^[a-z0-9\/]+$/' , $ manager ) !== 1 ) { throw new MShop_Exception ( sprintf ( 'Invalid characters in manager name "%1$s"' , $ manager ) ) ; } if ( $ name === null ) { $ path = 'classes/' . $ domain . '/manager/' . $ manager . '/name' ; $ name = $ this -> _context -> getConfig ( ) -> get ( $ path , 'Default' ) ; } if ( empty ( $ name ) || ctype_alnum ( $ name ) === false ) { throw new MShop_Exception ( sprintf ( 'Invalid characters in manager name "%1$s"' , $ name ) ) ; } $ domainname = ucfirst ( $ domain ) ; $ subnames = $ this -> _createSubNames ( $ manager ) ; $ classname = 'MShop_' . $ domainname . '_Manager_' . $ subnames . '_' . $ name ; $ interface = 'MShop_' . $ domainname . '_Manager_' . $ subnames . '_Interface' ; if ( class_exists ( $ classname ) === false ) { throw new MShop_Exception ( sprintf ( 'Class "%1$s" not available' , $ classname ) ) ; } $ subManager = new $ classname ( $ this -> _context ) ; if ( ( $ subManager instanceof $ interface ) === false ) { throw new MShop_Exception ( sprintf ( 'Class "%1$s" does not implement interface "%2$s"' , $ classname , $ interface ) ) ; } $ this -> _subManagers [ $ key ] = $ this -> _addManagerDecorators ( $ subManager , $ manager , $ domain ) ; } return $ this -> _subManagers [ $ key ] ; }
Returns a new manager the given extension name.

@param string $domain Name of the domain (product, text, media, etc.)
@param string $manager Name of the sub manager type in lower case (can contain a path like base/product)
@param string|null $name Name of the implementation, will be from configuration (or Default) if null
@return MShop_Common_Manager_Interface Manager for different extensions
Returns a new manager the given extension name .