PHP Класс Larabros\Elogram\Client

Автор: Hassan Khan ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$container League\Container\ContainerInterface The application IoC container.

Открытые методы

Метод Описание
__construct ( string $clientId, string $clientSecret, string | null $accessToken = null, string $redirectUrl = '', array $options = [] ) Create an instance of :php:class:Client.
comments ( ) : CommentsRepository Returns the current instance of :php:class:CommentsRepository.
getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken Sets and returns the access token.
getLoginUrl ( array $options = [] ) : string Gets the login URL.
likes ( ) : LikesRepository Returns the current instance of :php:class:LikesRepository.
locations ( ) : LocationsRepository Returns the current instance of :php:class:LocationsRepository.
media ( ) : MediaRepository Returns the current instance of :php:class:MediaRepository.
paginate ( Response $response, integer | null $limit = null ) : Response Paginates a :php:class:Response.
request ( string $method, string $uri, array $parameters = [] ) : Response Sends a request.
secureRequests ( boolean $enable = true ) : void Enables or disables secure requests by adding or removing SecureRequestMiddleware.
setAccessToken ( League\OAuth2\Client\Token\AccessToken $token ) : void Sets an access token and adds it to AuthMiddleware so the application can make authenticated requests.
tags ( ) : TagsRepository Returns the current instance of :php:class:TagsRepository.
users ( ) : UsersRepository Returns the current instance of :php:class:UsersRepository.

Защищенные методы

Метод Описание
buildContainer ( array $options ) : League\Container\ContainerInterface Takes the constructor parameters and uses them to instantiate and build a Container object.

Описание методов

__construct() публичный Метод

Create an instance of :php:class:Client.
public __construct ( string $clientId, string $clientSecret, string | null $accessToken = null, string $redirectUrl = '', array $options = [] )
$clientId string
$clientSecret string
$accessToken string | null
$redirectUrl string
$options array

buildContainer() защищенный Метод

Takes the constructor parameters and uses them to instantiate and build a Container object.
protected buildContainer ( array $options ) : League\Container\ContainerInterface
$options array
Результат League\Container\ContainerInterface

comments() публичный Метод

Returns the current instance of :php:class:CommentsRepository.
public comments ( ) : CommentsRepository
Результат Larabros\Elogram\Repositories\CommentsRepository

getAccessToken() публичный Метод

Sets and returns the access token.
См. также: Elogram\Helpers\RedirectLoginHelper::getAccessToken()
public getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken
$code string
$grant string
Результат League\OAuth2\Client\Token\AccessToken

getLoginUrl() публичный Метод

Gets the login URL.
См. также: Elogram\Helpers\RedirectLoginHelper::getLoginUrl()
public getLoginUrl ( array $options = [] ) : string
$options array
Результат string

likes() публичный Метод

Returns the current instance of :php:class:LikesRepository.
public likes ( ) : LikesRepository
Результат Larabros\Elogram\Repositories\LikesRepository

locations() публичный Метод

Returns the current instance of :php:class:LocationsRepository.
public locations ( ) : LocationsRepository
Результат Larabros\Elogram\Repositories\LocationsRepository

media() публичный Метод

Returns the current instance of :php:class:MediaRepository.
public media ( ) : MediaRepository
Результат Larabros\Elogram\Repositories\MediaRepository

paginate() публичный Метод

Paginates a :php:class:Response.
См. также: Elogram\Http\Clients\AdapterInterface::paginate()
public paginate ( Response $response, integer | null $limit = null ) : Response
$response Larabros\Elogram\Http\Response
$limit integer | null
Результат Larabros\Elogram\Http\Response

request() публичный Метод

Sends a request.
См. также: Elogram\Http\Clients\AdapterInterface::request()
public request ( string $method, string $uri, array $parameters = [] ) : Response
$method string
$uri string
$parameters array
Результат Larabros\Elogram\Http\Response

secureRequests() публичный Метод

Enables or disables secure requests by adding or removing SecureRequestMiddleware.
public secureRequests ( boolean $enable = true ) : void
$enable boolean
Результат void

setAccessToken() публичный Метод

Sets an access token and adds it to AuthMiddleware so the application can make authenticated requests.
public setAccessToken ( League\OAuth2\Client\Token\AccessToken $token ) : void
$token League\OAuth2\Client\Token\AccessToken
Результат void

tags() публичный Метод

Returns the current instance of :php:class:TagsRepository.
public tags ( ) : TagsRepository
Результат Larabros\Elogram\Repositories\TagsRepository

users() публичный Метод

Returns the current instance of :php:class:UsersRepository.
public users ( ) : UsersRepository
Результат Larabros\Elogram\Repositories\UsersRepository

Описание свойств

$container защищенное свойство

The application IoC container.
protected ContainerInterface,League\Container $container
Результат League\Container\ContainerInterface