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; return $result;
} }
public static function getExposedVariables() { public static function get_exposed_variables() {
return array( return array(
'CurrentPage' => 'curr', '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 * @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. * as global variables in the templates.
*/ */
public static function getExposedVariables() { public static function get_exposed_variables() {
return array( return array(
'absoluteBaseURL', 'absoluteBaseURL',
'baseURL', '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( return array(
'i18nLocale' => 'get_locale', 'i18nLocale' => 'get_locale',
'get_locale', 'get_locale',

View File

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

View File

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

View File

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

View File

@ -134,7 +134,7 @@ class SSViewer_BasicIteratorSupport implements TemplateIteratorProvider {
protected $iteratorPos; protected $iteratorPos;
protected $iteratorTotalItems; protected $iteratorTotalItems;
public static function getExposedVariables() { public static function get_exposed_variables() {
return array( return array(
'First', 'First',
'Last', 'Last',
@ -325,7 +325,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
if ($implementers && count($implementers) > 0) { if ($implementers && count($implementers) > 0) {
foreach($implementers as $implementer) { foreach($implementers as $implementer) {
if ($createObject) $implementer = new $implementer(); //create a new instance of the object for method calls 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) { 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 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. * correspond to the actual method name in the relevant class.
* Note that the template renderer must be able to call these methods statically. * 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. * correspond to the actual method name in the relevant class.
* Note that the template renderer must be able to call these methods statically. * 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. * Set the current iterator properties - where we are on the iterator.