Services_Scribd
[ class tree: Services_Scribd ] [ index: Services_Scribd ] [ all elements ]

Class: Services_Scribd

Source Location: /Services_Scribd-0.2.0/Services/Scribd.php

Class Overview


The base class for the Scribd API interface. Takes care of defining common variables and loading the individual drivers.


Author(s):

Copyright:

  • 2009 Rich Schumacher <rich.schu@gmail.com>

Variables

Methods


Child classes:

Services_Scribd_Common
This class contains common logic needed for all the API endpoints. Handles tasks such as sending requests, signing the requests, etc.

Inherited Variables

Inherited Methods


Class Details

[line 54]
The base class for the Scribd API interface. Takes care of defining common variables and loading the individual drivers.

  1.  <?php
  2.  require_once 'Services/Scribd.php';
  3.  
  4.  $apiKey    'myAPIKey';
  5.  $apiSecret 'myAPISecret';
  6.  
  7.  $scribd = new Services_Scribd($apiKey$apiSecret);
  8.  
  9.  try {
  10.      $result $scribd->docs->search('vim');
  11.      var_dump($result);
  12.  catch (Services_Scribd_Exception $e{
  13.      var_dump($e);
  14.  }
  15.  ?>



[ Top ]


Class Variables

$account =  null

[line 75]

The Scribd account to use for requests
  • Access: protected



[ Top ]

$timeout =  10

[line 68]

Timeout to use when making the request
  • Access: public

Type:   integer


[ Top ]



Method Detail

__construct (Constructor)   [line 106]

void __construct( string|Services_Scribd_Account $spec, [string $apiSecret = null])

Sets the API key and optional API secret
  • Access: public

Overridden in child classes as:

Services_Scribd_Common::__construct()
Prevents calls from bubbling up to Serices_Scribd::_construct()

Parameters:

string|Services_Scribd_Account   $spec     The API key or an existing account object
string   $apiSecret     The API secret

[ Top ]

getAccount   [line 156]

Services_Scribd_Account getAccount( )

Returns the current account instance
  • Access: public

[ Top ]

setAccount   [line 145]

void setAccount( Services_Scribd_Account $account)

Sets the Scribd account to use
  • Access: public

Parameters:

Services_Scribd_Account   $account     The account to set

[ Top ]

__get   [line 123]

Services_Scribd_Common __get( string $driver)

Loads individual endpoint drivers
  • Throws: Services_Scribd_Exception
  • Access: public

Parameters:

string   $driver     The driver we want to load

[ Top ]


Documentation generated on Sat, 06 Apr 2013 14:30:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.