*/ class Mage_Connect_Rest_Builder { /** * Rest adapter factory * * @var Mage_Connect_Rest_Factory */ protected static $_adapterFactory; /** * Retrieve adapter factory * * @return Mage_Connect_Rest_Factory */ protected static function _getAdapterFactory() { if (self::$_adapterFactory === null) { self::$_adapterFactory = new Mage_Connect_Rest_Factory(); } return self::$_adapterFactory; } /** * Define rest adapter factory * * @param Mage_Connect_Rest_Factory $adapterFactory */ public static function setAdapterFactory(Mage_Connect_Rest_Factory $adapterFactory) { self::$_adapterFactory = $adapterFactory; } /** * Retrieve rest adapter * * @param string $protocol * @return Mage_Connect_Rest */ public static function getAdapter($protocol = "https") { return self::_getAdapterFactory()->getAdapter($protocol); } }