Created
April 27, 2012 13:30
-
-
Save awartoft/2509223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace Facebook\Service; | |
use Facebook as FacebookClient; | |
/** | |
* @property integer $appId | |
* @property string $secret | |
* | |
* @category Facebook | |
* @package Service | |
*/ | |
class Facebook | |
{ | |
/** | |
* @var FacebookClient | |
*/ | |
protected $client; | |
public function __construct(array $config = array()) | |
{ | |
$this->client = new FacebookClient($config); | |
} | |
/** | |
* @throws Exception\LogicException | |
* @param string $property | |
* @return string | |
*/ | |
public function __get($property) | |
{ | |
switch($property) | |
{ | |
case 'appId': | |
return $this->client->getAppId(); | |
case 'secret': | |
return $this->client->getAppSecret(); | |
default: | |
throw new Exception\LogicException('Attempt to access unknown property %s on class %s'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment