Ok just a few basics.
A class is a blueprint of an object. It defines the attributes and methods of an object. An instance of a class is when you take that class and build an object from it.
e.g.
PHP Code:
$alan = new Person();
The $this variable is a reference to the object you are working with. Because it references an object, you need to instanciate the class first. The "->" operator is an identifier that links an object to it's classes' properties.
e.g.
PHP Code:
$alan->name = "Alan";
if($alan->is_cool())
echo "Alan is a very cool guy!";
class Person
{
public $name;
public $cool;
// Other code in here. This is only an example
public function is_cool()
{
if($this->cool)
return true;
else
{
$this->cool = true;
$this->is_cool();
}
}
}
Now that that is out of the way, I believe your problem is line 13 (as you said).
Code:
echo $this->ui->navBar('profile','profile',$navInfo); // THIS IS LINE 13
So in this line you are saying that the current object ($this), has an object attribute called $ui, which has a function in it's class called navBar.
I'm not really sure what your class names are so, ill just give you another example.
PHP Code:
class Page
{
private $database; // Stores a database object
public $title;
public $content;
public class __construct($title)
{
global $database;
$this->database = $database;
$this->title = $title;
$this->get_content(); // Get the page content from the database
}
private function get_content()
{
$title = $this->database->make_safe($title);
$query = "Select content From pages Where title='$title'";
if($result = $this->database->query($query))
{
$result->fetch_assoc();
$this->content = $result['content'];
}
else
return false;
}
}
// Global Scope
$database = new Database($host,$user,$pass,$name);
$mypage = new Page('Home');
I'm probably going into too much depth here, but as you can see the database object is stored in the page class. The $this variable references the class in the current scope.
I'm not sure of your class names and such but I think the proper line of code is this:
PHP Code:
echo $this->navBar('profile','profile',$navInfo); // THIS IS LINE 13
If you have any questions, ask away.