I am fairly new to OOP but not new to PHP. I am trying to initialize a class from within another class.
index.php
<?
error_reporting(E_ALL);
require("classes/memcache.php");
require("classes/video_test.php");
$videos = new video;
?>
video_test.php
<?php
class video {
private $mcache;
public function __construct() {
$this->mcache = new MCACHE();
}
public static function get_scene($scene_id) {
$info = $this->$mcache->get_item("mykey");
}
}
?>
Produces: PHP Fatal error: Using $this when not in object context in