@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | class Plugins { |
| 4 | 4 | private $globalPlugins; |
| 5 | 5 | |
| 6 | - public function __construct($globalPlugins=array()) { |
|
| 6 | + public function __construct($globalPlugins = array()) { |
|
| 7 | 7 | $this->globalPlugins = $globalPlugins; |
| 8 | 8 | } |
| 9 | 9 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @param array $names the plugin name strings (foldernames) in an array |
| 69 | 69 | * @return array |
| 70 | 70 | */ |
| 71 | - public function getPluginsJS($names=null) { |
|
| 71 | + public function getPluginsJS($names = null) { |
|
| 72 | 72 | if ($names) { |
| 73 | 73 | $names = array_merge($this->globalPlugins, $names); |
| 74 | 74 | return $this->filterPluginsByName('js', $names); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * @param array $names the plugin name strings (foldernames) in an array |
| 82 | 82 | * @return array |
| 83 | 83 | */ |
| 84 | - public function getPluginsCSS($names=null) { |
|
| 84 | + public function getPluginsCSS($names = null) { |
|
| 85 | 85 | if ($names) { |
| 86 | 86 | $names = array_merge($this->globalPlugins, $names); |
| 87 | 87 | return $this->filterPluginsByName('css', $names); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param array $names the plugin name strings (foldernames) in an array |
| 95 | 95 | * @return array |
| 96 | 96 | */ |
| 97 | - public function getPluginsTemplates($names=null) { |
|
| 97 | + public function getPluginsTemplates($names = null) { |
|
| 98 | 98 | if ($names) { |
| 99 | 99 | $names = array_merge($this->globalPlugins, $names); |
| 100 | 100 | return $this->filterPluginsByName('templates', $names); |
@@ -107,15 +107,15 @@ discard block |
||
| 107 | 107 | * @param array $names the plugin name strings (foldernames) in an array |
| 108 | 108 | * @return array |
| 109 | 109 | */ |
| 110 | - public function getTemplates($names=null) { |
|
| 110 | + public function getTemplates($names = null) { |
|
| 111 | 111 | $templateStrings = array(); |
| 112 | 112 | $plugins = $this->getPluginsTemplates($names); |
| 113 | 113 | foreach ($plugins as $folder => $templates) { |
| 114 | 114 | foreach ($templates as $path) { |
| 115 | 115 | if (file_exists($path)) { |
| 116 | 116 | $filename = explode('/', $path); |
| 117 | - $filename = $filename[$filename-1]; |
|
| 118 | - $id = $folder . '-' . substr($filename, 0 , (strrpos($filename, "."))); |
|
| 117 | + $filename = $filename[$filename - 1]; |
|
| 118 | + $id = $folder . '-' . substr($filename, 0, (strrpos($filename, "."))); |
|
| 119 | 119 | $templateStrings[$id] = file_get_contents($path); |
| 120 | 120 | } |
| 121 | 121 | } |