PHP Class Wallabag\ImportBundle\Import\PocketImport

Inheritance: extends AbstractImport
显示文件 Open project: wallabag/wallabag Class Usage Examples

Public Methods

Method Description
__construct ( EntityManager $em, ContentProxy $contentProxy )
authorize ( string $code ) : boolean Usually called by the previous callback to authorize the client.
getAccessToken ( ) : string Only used for test purpose.
getDescription ( )
getName ( )
getRequestToken ( string $redirectUri ) : string | false Return the oauth url to authenticate the client.
getUrl ( )
import ( $offset )
parseEntry ( array $importedEntry )
setClient ( Client $client ) Set the Guzzle client.

Protected Methods

Method Description
setEntryAsRead ( array $importedEntry )

Method Details

__construct() public method

public __construct ( EntityManager $em, ContentProxy $contentProxy )
$em Doctrine\ORM\EntityManager
$contentProxy Wallabag\CoreBundle\Helper\ContentProxy

authorize() public method

Then it return a token that can be used for next requests.
public authorize ( string $code ) : boolean
$code string request_token from getRequestToken
return boolean

getAccessToken() public method

Only used for test purpose.
public getAccessToken ( ) : string
return string

getDescription() public method

public getDescription ( )

getName() public method

public getName ( )

getRequestToken() public method

Return the oauth url to authenticate the client.
public getRequestToken ( string $redirectUri ) : string | false
$redirectUri string Redirect url in case of error
return string | false request_token for callback method

getUrl() public method

public getUrl ( )

import() public method

public import ( $offset )

parseEntry() public method

See also: https://getpocket.com/developer/docs/v3/retrieve
public parseEntry ( array $importedEntry )
$importedEntry array

setClient() public method

Set the Guzzle client.
public setClient ( Client $client )
$client GuzzleHttp\Client

setEntryAsRead() protected method

protected setEntryAsRead ( array $importedEntry )
$importedEntry array