Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » how does silverstripe find all the new files added ti a directory automaticaly?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 731 Views
  • vancouverWill
    Avatar
    Community Member
    121 Posts

    how does silverstripe find all the new files added ti a directory automaticaly? Link to this post

    how does silverstripe find all the new files added? other frameworks and cms's generally need to be passed xml files containing the details of new files. I know it's not like a compiled language where new files are automatically included but I can't see how it does recognize all new files without adding includes everywhere. Anyone know this offhand?

    thanks

    Will

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: how does silverstripe find all the new files added ti a directory automaticaly? Link to this post

    Yep - this is the dev/build thing - it creates a manifest (list of files where the class mathes the filename) and then it auto loads those requried

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: how does silverstripe find all the new files added ti a directory automaticaly? Link to this post

    thanks Swaiba for the quick reply, very much appreciated. It all makes a lot more sense now I searched for manifest.

    For anyone else who comes across this I'll explain what I found, for each class ManifestBuilder.php stores in cache a file name manifestClassParse-ExamplePage_php-66d4f5ee00b281254d01a3dc361b71f4 where ExamplePage.php is a class I created. Inside is an array showing how this class is related to another class for example I have pasted Page.php manifest file below. While this doesn't need to be known for daily SS running I find it really interesting how they have built the foundations. Props to the development team

    <?php
                $classes = array (
    0 =>
    array (
    'className' => 'Page',
    'extends' => 'SiteTree',
    ),
    1 =>
    array (
    'className' => 'Page_Controller',
    'extends' => 'ContentController',
    ),
    );
                $interfaces = array (
    );

    731 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.