21304 Posts in 5736 Topics by 2603 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 342 Views |
-
how does silverstripe find all the new files added ti a directory automaticaly?

6 January 2012 at 3:28pm
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
-
Re: how does silverstripe find all the new files added ti a directory automaticaly?

7 January 2012 at 12:33am
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
-
Re: how does silverstripe find all the new files added ti a directory automaticaly?

13 January 2012 at 8:52am
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 (
);
| 342 Views | ||
|
Page:
1
|
Go to Top |


