Jump to:

3431 Posts in 1058 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » how to autoload class

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1555 Views
  • snaip
    Avatar
    Community Member
    180 Posts

    how to autoload class Link to this post

    hi

    i want to extends class on 3 another

    i want to get this:

    *********************HomePage_Controller
    **************************extends

    *************//*************||*****************\\
    ************//**************||******************\\
    *******WycieczkaHolder****ApartamenyHolder**InneHolder
    ************||**************||*********************||
    ************||**************||*********************||
    *********WycieczkaPage****ApartamentyPage***InnePage

    i tried __autoload() but something wrog

    class PlHomePage_Controller extends PlPage_Controller {

    function __autoload('WycieczkaHolder_Controller') {
    require_once("WycieczkaHolder.php");
    }

    }

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: how to autoload class Link to this post

    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

    1555 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.