Hi,
I guess I'm just curious about what goes on in the background. I'm continually amazed at what you can do and how you can do things with SilverStripe...
One of those things is when a 'getter' function is declared such as:
<?php
class MySomethingController extends Controller{
function index($url) {
return array();
}
function getMySomething() {
return "Some Random Text";
}
function GetMySomethings() {
return "Some More Random Text";
}
}
?>
... it translates to a template variable/control which can be used like...
Here is the output of getMySomething: $MySomething...
And a little bit more of GetMySomethings: $MySomethings...
And even these work: $getMySomething and $GetMySomethings...
So what exactly gets exposed to templates? Every public function in a controller? And are getters ("getXXXX()" and "GetXXXX()") the only functions that can be used with the prefixes (ie "get" | "Get") stripped?
Thanks...
VWD.