ragtek
02-22-2009, 09:59 AM
I'd like to call a Class inside a Class
require_once(DIR . '/includes/twitter.php');
class vbtwitter{
/**
* Twitter object
*
* @var twitter object
*/
private $twitterconnection;
function __construct()
{
}
function init()
{
global $vbulletin;
$this->twitterconnection = new Twitter($vbulletin->userinfo['twitter_username'], $vbulletin->userinfo['twitter_password'], 'vbtwitter');
}
public function sendthread(&$threadid)
{
// and here now do things with $this->twitterconnection like $this->twitterconnection->method('foo');
}
Is something like this possible?
require_once(DIR . '/includes/twitter.php');
class vbtwitter{
/**
* Twitter object
*
* @var twitter object
*/
private $twitterconnection;
function __construct()
{
}
function init()
{
global $vbulletin;
$this->twitterconnection = new Twitter($vbulletin->userinfo['twitter_username'], $vbulletin->userinfo['twitter_password'], 'vbtwitter');
}
public function sendthread(&$threadid)
{
// and here now do things with $this->twitterconnection like $this->twitterconnection->method('foo');
}
Is something like this possible?