PHP 클래스 SocialShare\SocialShare

저자: Kévin Dunglas ([email protected])
파일 보기 프로젝트 열기: dunglas/php-socialshare 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Doctrine\Common\Cache\Cache $cache )
getLink ( string $providerName, string $url, array $options = [] ) : string Gets the sharing links for the given provider and url.
getShares ( string $providerName, string $url, boolean $delayUpdate = false ) : integer Gets the number of share of the given URL on the given provider.
getSharesTotal ( string $url ) : integer Gets the total number of share of the given URL for all providers.
registerProvider ( SocialShare\Provider\ProviderInterface $provider, integer | DateInterval $lifeTime = 3600 ) Registers a provider.
update ( ) Updates delayed URLs.

비공개 메소드들

메소드 설명
checkProvider ( string $providerName ) Checks if the provider is registered.
getId ( string $providerName, string $url ) : string Gets the ID corresponding to this provider name and URL.

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\Common\Cache\Cache $cache )
$cache Doctrine\Common\Cache\Cache

getShares() 공개 메소드

Gets the number of share of the given URL on the given provider.
public getShares ( string $providerName, string $url, boolean $delayUpdate = false ) : integer
$providerName string
$url string
$delayUpdate boolean
리턴 integer

getSharesTotal() 공개 메소드

Gets the total number of share of the given URL for all providers.
public getSharesTotal ( string $url ) : integer
$url string
리턴 integer

registerProvider() 공개 메소드

Registers a provider.
public registerProvider ( SocialShare\Provider\ProviderInterface $provider, integer | DateInterval $lifeTime = 3600 )
$provider SocialShare\Provider\ProviderInterface
$lifeTime integer | DateInterval Life time in seconds or a \DateInterval instance

update() 공개 메소드

Updates delayed URLs.
public update ( )