Download on GitHub

PHPZevelop

Adding classes

By default the "site/global.php" file contains a snippet that automatically includes all the class files in the "site/classes/" directory.

NOTE: You can include all from other directories by appending the directory name string to the SubLoader->RunIncludes() parameter array, you may wish to do this with something like "functions". like below:

	$SubLoader->RunIncludes(array("classes", "functions"));

After this you should instantiate your class in the "site/instantiate.php" file, something like below:

	/* MyClass
	------------------------------*/	
	$MyClass = new MyClass("Parameter1");
	$MyClass->AddParameter("Parameter2");

Here you should instantiate the object and configure it anyway that is necessary.



© PHPZevelop 2017 - @_Zephni (Craig Dennis)