Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed some UniversalClassLoader for better consistency

  • Loading branch information...
commit fc449bc6c9b59a075c01cc21ce38f54f1c5b1a21 1 parent 86fed40
@fabpot fabpot authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 UniversalClassLoader.php
View
28 UniversalClassLoader.php
@@ -58,8 +58,8 @@ class UniversalClassLoader
{
private $namespaces = array();
private $prefixes = array();
- private $namespaceFallback = array();
- private $prefixFallback = array();
+ private $namespaceFallbacks = array();
+ private $prefixFallbacks = array();
/**
* Gets the configured namespaces.
@@ -86,9 +86,9 @@ public function getPrefixes()
*
* @return array An array of directories
*/
- public function getNamespaceFallback()
+ public function getNamespaceFallbacks()
{
- return $this->namespaceFallback;
+ return $this->namespaceFallbacks;
}
/**
@@ -96,33 +96,33 @@ public function getNamespaceFallback()
*
* @return array An array of directories
*/
- public function getPrefixFallback()
+ public function getPrefixFallbacks()
{
- return $this->prefixFallback;
+ return $this->prefixFallbacks;
}
/**
* Registers the directory to use as a fallback for namespaces.
*
- * @param string|array $dirs A directory path or an array of directories
+ * @param array $dirs An array of directories
*
* @api
*/
- public function registerNamespaceFallback($dirs)
+ public function registerNamespaceFallbacks(array $dirs)
{
- $this->namespaceFallback = (array) $dirs;
+ $this->namespaceFallbacks = $dirs;
}
/**
* Registers the directory to use as a fallback for class prefixes.
*
- * @param string|array $dirs A directory path or an array of directories
+ * @param array $dirs An array of directories
*
* @api
*/
- public function registerPrefixFallback($dirs)
+ public function registerPrefixFallbacks(array $dirs)
{
- $this->prefixFallback = (array) $dirs;
+ $this->prefixFallbacks = $dirs;
}
/**
@@ -231,7 +231,7 @@ public function findFile($class)
}
}
- foreach ($this->namespaceFallback as $dir) {
+ foreach ($this->namespaceFallbacks as $dir) {
$file = $dir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
if (file_exists($file)) {
return $file;
@@ -250,7 +250,7 @@ public function findFile($class)
}
}
- foreach ($this->prefixFallback as $dir) {
+ foreach ($this->prefixFallbacks as $dir) {
$file = $dir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php';
if (file_exists($file)) {
return $file;
Please sign in to comment.
Something went wrong with that request. Please try again.