APICHANGE: Rename getExposedVariables to match coding conventions

This commit is contained in:
Hamish Friedlander 2012-02-20 11:55:32 +13:00
parent f8edc4bd13
commit fb246bdd08
9 changed files with 10 additions and 10 deletions

View File

@ -584,7 +584,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider {
return $result;
}
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'CurrentPage' => 'curr',
);

View File

@ -870,7 +870,7 @@ class Director implements TemplateGlobalProvider {
* @return array Returns an array of strings of the method names of methods on the call that should be exposed
* as global variables in the templates.
*/
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'absoluteBaseURL',
'baseURL',

View File

@ -1957,7 +1957,7 @@ class i18n extends Object implements TemplateGlobalProvider {
}
}
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'i18nLocale' => 'get_locale',
'get_locale',

View File

@ -1379,7 +1379,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
return $currentName ? $currentName : 'cms';
}
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'CurrentMember' => 'currentUser',
'currentUser'

View File

@ -622,7 +622,7 @@ class Permission extends DataObject implements TemplateGlobalProvider {
Permission::flush_permission_cache();
}
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'HasPerm' => 'check'
);

View File

@ -218,7 +218,7 @@ class SecurityToken extends Object implements TemplateGlobalProvider {
return $generator->generateHash('sha1');
}
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'getSecurityID',
'SecurityID' => 'getSecurityID'

View File

@ -134,7 +134,7 @@ class SSViewer_BasicIteratorSupport implements TemplateIteratorProvider {
protected $iteratorPos;
protected $iteratorTotalItems;
public static function getExposedVariables() {
public static function get_exposed_variables() {
return array(
'First',
'Last',
@ -325,7 +325,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
if ($implementers && count($implementers) > 0) {
foreach($implementers as $implementer) {
if ($createObject) $implementer = new $implementer(); //create a new instance of the object for method calls
$exposedVariables = $implementer::getExposedVariables(); //get the exposed variables
$exposedVariables = $implementer::get_exposed_variables(); //get the exposed variables
foreach($exposedVariables as $varName => $methodName) {
if (!$varName || is_numeric($varName)) $varName = $methodName; //array has just a single value, use it for both key and value

View File

@ -15,7 +15,7 @@ interface TemplateGlobalProvider {
* correspond to the actual method name in the relevant class.
* Note that the template renderer must be able to call these methods statically.
*/
public static function getExposedVariables();
public static function get_exposed_variables();
}
?>

View File

@ -15,7 +15,7 @@ interface TemplateIteratorProvider {
* correspond to the actual method name in the relevant class.
* Note that the template renderer must be able to call these methods statically.
*/
public static function getExposedVariables();
public static function get_exposed_variables();
/**
* Set the current iterator properties - where we are on the iterator.