Rename "StyleInterface::name" method to "getName"

This commit is contained in:
Dmitriy Simushev 2014-03-04 13:53:10 +00:00
parent 2b2139687a
commit 75703ecadd
5 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ abstract class AbstractStyle
* *
* @return string Name of the style * @return string Name of the style
*/ */
public function name() public function getName()
{ {
return $this->styleName; return $this->styleName;
} }

View File

@ -65,7 +65,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
*/ */
public function getFilesPath() public function getFilesPath()
{ {
return 'styles/dialogs/' . $this->name(); return 'styles/dialogs/' . $this->getName();
} }
/** /**
@ -86,7 +86,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
$data['currentLocale'] = CURRENT_LOCALE; $data['currentLocale'] = CURRENT_LOCALE;
$data['rtl'] = (getlocal("localedirection") == 'rtl'); $data['rtl'] = (getlocal("localedirection") == 'rtl');
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath(); $data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
$data['styleName'] = $this->name(); $data['styleName'] = $this->getName();
echo($this->templateEngine->render($template_name, $data)); echo($this->templateEngine->render($template_name, $data));
} }

View File

@ -33,7 +33,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
*/ */
public function getFilesPath() public function getFilesPath()
{ {
return 'styles/invitations/' . $this->name(); return 'styles/invitations/' . $this->getName();
} }
/** /**

View File

@ -65,7 +65,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
*/ */
public function getFilesPath() public function getFilesPath()
{ {
return 'styles/pages/' . $this->name(); return 'styles/pages/' . $this->getName();
} }
/** /**
@ -87,7 +87,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
$data['currentLocale'] = CURRENT_LOCALE; $data['currentLocale'] = CURRENT_LOCALE;
$data['rtl'] = (getlocal("localedirection") == 'rtl'); $data['rtl'] = (getlocal("localedirection") == 'rtl');
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath(); $data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
$data['styleName'] = $this->name(); $data['styleName'] = $this->getName();
echo($this->templateEngine->render($template_name, $data)); echo($this->templateEngine->render($template_name, $data));
} }

View File

@ -74,7 +74,7 @@ interface StyleInterface
* *
* @return string Name of the style * @return string Name of the style
*/ */
public function name(); public function getName();
/** /**
* Renders template file to HTML and send it to the output * Renders template file to HTML and send it to the output