I'm trying to expand my understanding of PHP by looking at some pre- built code modules. I don't fully understand the syntax "$site->Run ();" in the following code. Can someone offer a helpful explanation?

<?php

//define("PB_CRYPT_LINKS" , 1);
define("_LIBPATH","./lib/");
require_once _LIBPATH . "site.php";

$site = new CSite("./site.xml",true);
$site->Run();

?>

The $site variable is an object, specifically an instance of the CSite class. Run() is a method (i.e., a function) defined within this class, so the statement $site->Run() executes that function. This is basic object oriented stuff which you may not have run across before.

Hope that helps,
larry

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to