Skip to content

Instantly share code, notes, and snippets.

@macnibblet
Created April 27, 2012 13:30
Show Gist options
  • Save macnibblet/2509223 to your computer and use it in GitHub Desktop.
Save macnibblet/2509223 to your computer and use it in GitHub Desktop.
<?php
/**
* @author Antoine Hedgecock <antoine@pmg.se>
*/
/**
* @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