mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 21:34:42 +03:00
Rename StyleInterface::filesPath method to "getFilesPath"
This commit is contained in:
parent
869ce50f31
commit
2b2139687a
@ -74,7 +74,7 @@ abstract class AbstractStyle
|
||||
*/
|
||||
public function configurations()
|
||||
{
|
||||
$config_file = MIBEW_FS_ROOT . '/' . $this->filesPath() . '/config.ini';
|
||||
$config_file = MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/config.ini';
|
||||
|
||||
// Check if configurations already loaded. Do not do the job twice.
|
||||
if (is_null($this->cachedConfigurations)) {
|
||||
@ -102,7 +102,7 @@ abstract class AbstractStyle
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
abstract public function filesPath();
|
||||
abstract public function getFilesPath();
|
||||
|
||||
/**
|
||||
* Gets names of styles which are located in the $root_dir.
|
||||
|
@ -43,7 +43,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
parent::__construct($style_name);
|
||||
|
||||
$templates_loader = new \Handlebars\Loader\FilesystemLoader(
|
||||
MIBEW_FS_ROOT . '/' . $this->filesPath() . '/templates_src/server_side/'
|
||||
MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/templates_src/server_side/'
|
||||
);
|
||||
|
||||
$this->templateEngine = new \Handlebars\Handlebars(array(
|
||||
@ -63,7 +63,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/dialogs/' . $this->name();
|
||||
}
|
||||
@ -85,7 +85,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = CURRENT_LOCALE;
|
||||
$data['rtl'] = (getlocal("localedirection") == 'rtl');
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->filesPath();
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['styleName'] = $this->name();
|
||||
|
||||
echo($this->templateEngine->render($template_name, $data));
|
||||
|
@ -31,7 +31,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/invitations/' . $this->name();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
parent::__construct($style_name);
|
||||
|
||||
$templates_loader = new \Handlebars\Loader\FilesystemLoader(
|
||||
MIBEW_FS_ROOT . '/' . $this->filesPath() . '/templates_src/server_side/'
|
||||
MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/templates_src/server_side/'
|
||||
);
|
||||
|
||||
$this->templateEngine = new \Handlebars\Handlebars(array(
|
||||
@ -63,7 +63,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/pages/' . $this->name();
|
||||
}
|
||||
@ -86,7 +86,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = CURRENT_LOCALE;
|
||||
$data['rtl'] = (getlocal("localedirection") == 'rtl');
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->filesPath();
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['styleName'] = $this->name();
|
||||
|
||||
echo($this->templateEngine->render($template_name, $data));
|
||||
|
@ -60,7 +60,7 @@ interface StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath();
|
||||
public function getFilesPath();
|
||||
|
||||
/**
|
||||
* Loads and returns configurations of the style.
|
||||
|
@ -85,7 +85,7 @@ function generate_button(
|
||||
|
||||
// URL of file with additional CSS rules for invitation popup
|
||||
$widget_data['inviteStyle'] = $app_location . '/' .
|
||||
$invitation_style->filesPath() .
|
||||
$invitation_style->getFilesPath() .
|
||||
'/invite.css';
|
||||
|
||||
// Time between requests to the server in milliseconds
|
||||
|
@ -40,7 +40,7 @@ $screenshots = array();
|
||||
foreach ($style_config['screenshots'] as $name => $desc) {
|
||||
$screenshots[] = array(
|
||||
'name' => $name,
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $preview_style->filesPath()
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $preview_style->getFilesPath()
|
||||
. '/screenshots/' . $name . '.png'),
|
||||
'description' => $desc,
|
||||
);
|
||||
|
@ -46,7 +46,7 @@ $screenshots = array();
|
||||
foreach ($style_config['screenshots'] as $name => $desc) {
|
||||
$screenshots[] = array(
|
||||
'name' => $name,
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $chat_style->filesPath()
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $chat_style->getFilesPath()
|
||||
. '/screenshots/' . $name . '.png'),
|
||||
'description' => $desc
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user