protected static function _createManager( MShop_Context_Item_Interface $context, $classname, $interface )
	{
		if( isset( self::$_objects[$classname] ) ) {
			return self::$_objects[$classname];
		}

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

		$manager =  new $classname( $context );

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

		return $manager;
	}
protected static function _createManager( MShop_Context_Item_Interface $context, $classname, $interface )
	{
		if( isset( self::$_objects[$classname] ) ) {
			return self::$_objects[$classname];
		}

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

		$manager =  new $classname( $context );

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

		return $manager;
	}
protected static function _createManager ( MShop_Context_Item_Interface $ context , $ classname , $ interface ) { if ( isset ( self :: $ _objects [ $ classname ] ) ) { return self :: $ _objects [ $ classname ] ; } if ( class_exists ( $ classname ) === false ) { throw new MShop_Exception ( sprintf ( 'Class "%1$s" not available' , $ classname ) ) ; } $ manager = new $ classname ( $ context ) ; if ( ! ( $ manager instanceof $ interface ) ) { throw new MShop_Exception ( sprintf ( 'Class "%1$s" does not implement interface "%2$s"' , $ classname , $ interface ) ) ; } return $ manager ; }
Creates a manager object.

@param MShop_Context_Item_Interface $context Context instance with necessary objects
@param string $classname Name of the manager class
@param string $interface Name of the manager interface
@return MShop_Common_Manager_Interface Manager object
Creates a manager object .