Skip to content

Commit

Permalink
return $this in all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikbjorn committed Jul 28, 2014
1 parent 4394c19 commit 45f6b54
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/LoaderBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,31 @@ public function configureNormalizers(callable $callable)
$this->normalizerConfigured = true;

$callable($this->normalizer);

return $this;
}

public function configureLoaders(callable $callable)
{
$this->resolverConfigured = true;

$callable($this->resolver, $this->locator, $this->resources);

return $this;
}

public function setCacheDir($cacheDir)
{
$this->cacheDir = $cacheDir;

return $this;
}

public function setDebug($debug)
{
$this->debug = $debug;

return $this;
}

public function build()
Expand Down Expand Up @@ -98,6 +106,8 @@ public function addDefaultLoaders()
$this->resolver->addLoader(new JsonFileLoader($this->locator, $this->resources));
$this->resolver->addLoader(new PhpFileLoader($this->locator, $this->resources));
$this->resolver->addLoader(new IniFileLoader($this->locator, $this->resources));

return $this;
}

public function addDefaultNormalizers()
Expand All @@ -106,6 +116,8 @@ public function addDefaultNormalizers()

$this->normalizer->add(new EnvironmentNormalizer);
$this->normalizer->add(new EnvfileNormalizer($this->locator));

return $this;
}

private function createNormalizerLoader()
Expand Down

0 comments on commit 45f6b54

Please sign in to comment.