PHP 클래스 Tebru\Retrofit\Adapter\Rest\RestAdapterBuilder

Builds a rest adapter
저자: Nate Brunette ([email protected])
파일 보기 프로젝트 열기: tebru/retrofit-php

공개 메소드들

메소드 설명
__construct ( Tebru\Retrofit\HttpClient\ClientProvider $clientProvider ) Constructor
addSubscriber ( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber ) Add a subscriber
build ( ) : RestAdapter Build the rest adapter
ignoreLogSubscriber ( ) Do not use the default log subscriber;
setBaseUrl ( string $baseUrl ) Sets the base url for the rest client
setClientAdapter ( Tebru\Retrofit\Adapter\HttpClientAdapter $clientAdapter ) Set the http client adapter to make requests
setDeserializerAdapter ( Tebru\Retrofit\Adapter\DeserializerAdapter $deserializerAdapter ) Set the deserializer adapter
setEventDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher ) : RestAdapterBuilder Set the event dispatcher
setHttpClient ( mixed $httpClient ) Sets the http client used with rest client
setLogger ( Psr\Log\LoggerInterface $logger )
setSerializer ( JMS\Serializer\Serializer $serializer ) Set the serializer used with rest client
setSerializerAdapter ( Tebru\Retrofit\Adapter\SerializerAdapter $serializerAdapter ) Set the serializer adapter

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Tebru\Retrofit\HttpClient\ClientProvider $clientProvider )
$clientProvider Tebru\Retrofit\HttpClient\ClientProvider

addSubscriber() 공개 메소드

Add a subscriber
public addSubscriber ( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber )
$subscriber Symfony\Component\EventDispatcher\EventSubscriberInterface

build() 공개 메소드

Build the rest adapter
public build ( ) : RestAdapter
리턴 RestAdapter

ignoreLogSubscriber() 공개 메소드

Do not use the default log subscriber;
public ignoreLogSubscriber ( )

setBaseUrl() 공개 메소드

Sets the base url for the rest client
public setBaseUrl ( string $baseUrl )
$baseUrl string

setClientAdapter() 공개 메소드

Set the http client adapter to make requests
public setClientAdapter ( Tebru\Retrofit\Adapter\HttpClientAdapter $clientAdapter )
$clientAdapter Tebru\Retrofit\Adapter\HttpClientAdapter

setDeserializerAdapter() 공개 메소드

Set the deserializer adapter
public setDeserializerAdapter ( Tebru\Retrofit\Adapter\DeserializerAdapter $deserializerAdapter )
$deserializerAdapter Tebru\Retrofit\Adapter\DeserializerAdapter

setEventDispatcher() 공개 메소드

Set the event dispatcher
public setEventDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher ) : RestAdapterBuilder
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
리턴 RestAdapterBuilder

setHttpClient() 공개 메소드

Currently only supports guzzle clients
사용 중단: Will be removed in v3. Use setClientAdapter() instead.
public setHttpClient ( mixed $httpClient )
$httpClient mixed

setLogger() 공개 메소드

public setLogger ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

setSerializer() 공개 메소드

Set the serializer used with rest client
public setSerializer ( JMS\Serializer\Serializer $serializer )
$serializer JMS\Serializer\Serializer

setSerializerAdapter() 공개 메소드

Set the serializer adapter
public setSerializerAdapter ( Tebru\Retrofit\Adapter\SerializerAdapter $serializerAdapter )
$serializerAdapter Tebru\Retrofit\Adapter\SerializerAdapter