Hi
I have put together a class IE a user class.
My class requires to use functionality from another class but i dont want to extend one from the other
Is this possible ( or do i have to extend or pass as parameter in construct ) and if so how do i code this in.
IE
Code:
$facebook = new Facebook(array(
'appId' => 'xxxxxxxx',
'secret' => 'yyyyyyyyyyyyyyy',
'cookie' => true,
));
class User {
private $friends=array();
function someFunction() {
// i want to execute $facebook->api
$this->friends=$facebook->api('/'.$uid.'/friends', 'get', array('access_token' => $signed_request['oauth_token']));
}
}
Cheers
Steve
|