Note: If you have no idea what an 'Object' is, the next paragraph might not make sense. I added links at the end to learn more about 'objects' and what they are
This will access the method inside the class that has been assigned to HTML.
class html
{
function redirect($url)
{
// Do stuff
}
function foo()
{
echo "bar";
}
}
$html = new html;
$html->redirect("URL");
When you create a class and assign it to a variable, you use the '->' operator to access methods of that class. Methods are simply functions inside of a class.
Basically, 'html' is a type of object. You can create new objects in any variable, and then later use that variable to access things inside the object. Every time you assign the HTML class to a varaible like this:
$html = new html;
You can access any function inside of it like this
$html->redirect();
$html->foo(); // echos "bar"
To learn more you are going to want to find articles about Object Oriented Programming in PHP
First try the PHP Manual:
http://us2.php.net/manual/en/language.oop.php
http://us2.php.net/oop
More StackOverflow Knowledge:
http://stackoverflow.com/questions/1224789/php-classes-when-to-use-vs/
http://stackoverflow.com/questions/tagged/oop
http://stackoverflow.com/questions/249835/book-recommendation-for-learning-good-php-oop
http://stackoverflow.com/questions/716412/why-use-php-oop-over-basic-functions-and-when
http://stackoverflow.com/questions/135535/what-are-the-benefits-of-oo-programming-will-it-help-me-write-better-code