3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1292 Views |
-
how to autoload class

4 April 2009 at 5:10am Last edited: 4 April 2009 5:16am
hi
i want to extends class on 3 another
i want to get this:
*********************HomePage_Controller
**************************extends*************//*************||*****************\\
************//**************||******************\\
*******WycieczkaHolder****ApartamenyHolder**InneHolder
************||**************||*********************||
************||**************||*********************||
*********WycieczkaPage****ApartamentyPage***InnePagei tried __autoload() but something wrog
class PlHomePage_Controller extends PlPage_Controller {
function __autoload('WycieczkaHolder_Controller') {
require_once("WycieczkaHolder.php");
}}
-
Re: how to autoload class

4 April 2009 at 6:27pm
If all your code files are in /mysite/ or in a folder/ with a _config file (and no _manifest_exclude) in them SilverStripe will automatically include them for you, without you having to do any auto loading
| 1292 Views | ||
|
Page:
1
|
Go to Top |


