Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

generated service names are in camel case

  • Loading branch information...
commit be6ad15276fef80ed107e1881de25295457d9c88 1 parent c3c5941
@janmarek authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 WebLoader/Nette/Extension.php
  2. +2 −2 readme.txt
View
6 WebLoader/Nette/Extension.php
@@ -58,14 +58,14 @@ public function loadConfiguration()
foreach (array('css', 'js') as $type) {
foreach ($config[$type] as $name => $wlConfig) {
$configDefault = $config[$type . 'Defaults'];
- $this->addWebLoader($builder, $type . '_' . $name, array_merge($configDefault, $wlConfig));
+ $this->addWebLoader($builder, $type . ucfirst($name), array_merge($configDefault, $wlConfig));
}
}
}
private function addWebLoader(\Nette\DI\ContainerBuilder $builder, $name, $config)
{
- $filesServiceName = $this->prefix($name . '_files');
+ $filesServiceName = $this->prefix($name . 'Files');
$files = $builder->addDefinition($filesServiceName)
->setClass('WebLoader\FileCollection')
@@ -92,7 +92,7 @@ private function addWebLoader(\Nette\DI\ContainerBuilder $builder, $name, $confi
$files->addSetup('addRemoteFiles', array($config['remoteFiles']));
- $compiler = $builder->addDefinition($this->prefix($name . '_compiler'))
+ $compiler = $builder->addDefinition($this->prefix($name . 'Compiler'))
->setClass('WebLoader\Compiler')
->setArguments(array(
'@' . $filesServiceName,
View
4 readme.txt
@@ -79,7 +79,7 @@ BasePresenter.php:
public function createComponentCss()
{
return new \WebLoader\Nette\CssLoader(
- $this->context->webloader->css_default_compiler, // service generated by extension
+ $this->context->webloader->cssDefaultCompiler, // service generated by extension
$this->template->basePath . '/webtemp'
);
}
@@ -87,7 +87,7 @@ BasePresenter.php:
public function createComponentJs()
{
return new \WebLoader\Nette\JavaScriptLoader(
- $this->context->webloader->js_default_compiler, // service generated by extension
+ $this->context->webloader->jsDefaultCompiler, // service generated by extension
$this->template->basePath . '/webtemp'
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.