Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
c85d62c6
Commit
c85d62c6
authored
Oct 24, 2011
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#1178246
by Crell: added Symfony2 HttpFoundation library to core.
parent
d57f6e19
Changes
43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
6908 additions
and
0 deletions
+6908
-0
COPYRIGHT.txt
COPYRIGHT.txt
+1
-0
includes/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php
...Symfony/Component/ClassLoader/ApcUniversalClassLoader.php
+96
-0
includes/Symfony/Component/ClassLoader/ClassCollectionLoader.php
...s/Symfony/Component/ClassLoader/ClassCollectionLoader.php
+222
-0
includes/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php
...mfony/Component/ClassLoader/DebugUniversalClassLoader.php
+62
-0
includes/Symfony/Component/ClassLoader/LICENSE
includes/Symfony/Component/ClassLoader/LICENSE
+19
-0
includes/Symfony/Component/ClassLoader/MapClassLoader.php
includes/Symfony/Component/ClassLoader/MapClassLoader.php
+76
-0
includes/Symfony/Component/ClassLoader/UniversalClassLoader.php
...es/Symfony/Component/ClassLoader/UniversalClassLoader.php
+265
-0
includes/Symfony/Component/ClassLoader/composer.json
includes/Symfony/Component/ClassLoader/composer.json
+22
-0
includes/Symfony/Component/HttpFoundation/ApacheRequest.php
includes/Symfony/Component/HttpFoundation/ApacheRequest.php
+51
-0
includes/Symfony/Component/HttpFoundation/Cookie.php
includes/Symfony/Component/HttpFoundation/Cookie.php
+207
-0
includes/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php
...t/HttpFoundation/File/Exception/AccessDeniedException.php
+30
-0
includes/Symfony/Component/HttpFoundation/File/Exception/FileException.php
...Component/HttpFoundation/File/Exception/FileException.php
+21
-0
includes/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php
...t/HttpFoundation/File/Exception/FileNotFoundException.php
+30
-0
includes/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php
...HttpFoundation/File/Exception/UnexpectedTypeException.php
+20
-0
includes/Symfony/Component/HttpFoundation/File/Exception/UploadException.php
...mponent/HttpFoundation/File/Exception/UploadException.php
+21
-0
includes/Symfony/Component/HttpFoundation/File/File.php
includes/Symfony/Component/HttpFoundation/File/File.php
+544
-0
includes/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php
...tpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php
+62
-0
includes/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
...ttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
+71
-0
includes/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php
.../HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php
+59
-0
includes/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php
...omponent/HttpFoundation/File/MimeType/MimeTypeGuesser.php
+125
-0
includes/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php
...HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php
+30
-0
includes/Symfony/Component/HttpFoundation/File/UploadedFile.php
...es/Symfony/Component/HttpFoundation/File/UploadedFile.php
+225
-0
includes/Symfony/Component/HttpFoundation/FileBag.php
includes/Symfony/Component/HttpFoundation/FileBag.php
+157
-0
includes/Symfony/Component/HttpFoundation/HeaderBag.php
includes/Symfony/Component/HttpFoundation/HeaderBag.php
+306
-0
includes/Symfony/Component/HttpFoundation/LICENSE
includes/Symfony/Component/HttpFoundation/LICENSE
+19
-0
includes/Symfony/Component/HttpFoundation/ParameterBag.php
includes/Symfony/Component/HttpFoundation/ParameterBag.php
+245
-0
includes/Symfony/Component/HttpFoundation/RedirectResponse.php
...des/Symfony/Component/HttpFoundation/RedirectResponse.php
+60
-0
includes/Symfony/Component/HttpFoundation/Request.php
includes/Symfony/Component/HttpFoundation/Request.php
+1217
-0
includes/Symfony/Component/HttpFoundation/RequestMatcher.php
includes/Symfony/Component/HttpFoundation/RequestMatcher.php
+177
-0
includes/Symfony/Component/HttpFoundation/RequestMatcherInterface.php
...fony/Component/HttpFoundation/RequestMatcherInterface.php
+33
-0
includes/Symfony/Component/HttpFoundation/Response.php
includes/Symfony/Component/HttpFoundation/Response.php
+891
-0
includes/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
...es/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
+238
-0
includes/Symfony/Component/HttpFoundation/ServerBag.php
includes/Symfony/Component/HttpFoundation/ServerBag.php
+43
-0
includes/Symfony/Component/HttpFoundation/Session.php
includes/Symfony/Component/HttpFoundation/Session.php
+405
-0
includes/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php
...ent/HttpFoundation/SessionStorage/ArraySessionStorage.php
+58
-0
includes/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php
...ttpFoundation/SessionStorage/FilesystemSessionStorage.php
+174
-0
includes/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php
...nt/HttpFoundation/SessionStorage/NativeSessionStorage.php
+180
-0
includes/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
...onent/HttpFoundation/SessionStorage/PdoSessionStorage.php
+263
-0
includes/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php
...HttpFoundation/SessionStorage/SessionStorageInterface.php
+97
-0
includes/Symfony/Component/HttpFoundation/composer.json
includes/Symfony/Component/HttpFoundation/composer.json
+22
-0
includes/bootstrap.inc
includes/bootstrap.inc
+32
-0
modules/simpletest/simpletest.info
modules/simpletest/simpletest.info
+1
-0
modules/simpletest/tests/symfony.test
modules/simpletest/tests/symfony.test
+31
-0
No files found.
COPYRIGHT.txt
View file @
c85d62c6
...
...
@@ -23,3 +23,4 @@ license, including:
jQuery - Copyright (c) 2008 - 2009 John Resig
Symfony2 - Copyright (c) 2004 - 2011 Fabien Potencier
includes/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php
0 → 100644
View file @
c85d62c6
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Component\ClassLoader
;
/**
* ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.
*
* It is able to load classes that use either:
*
* * The technical interoperability standards for PHP 5.3 namespaces and
* class names (http://groups.google.com/group/php-standards/web/psr-0-final-proposal);
*
* * The PEAR naming convention for classes (http://pear.php.net/).
*
* Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be
* looked for in a list of locations to ease the vendoring of a sub-set of
* classes for large projects.
*
* Example usage:
*
* require 'vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
* require 'vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php';
*
* use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
*
* $loader = new ApcUniversalClassLoader('apc.prefix.');
*
* // register classes with namespaces
* $loader->registerNamespaces(array(
* 'Symfony\Component' => __DIR__.'/component',
* 'Symfony' => __DIR__.'/framework',
* 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'),
* ));
*
* // register a library using the PEAR naming convention
* $loader->registerPrefixes(array(
* 'Swift_' => __DIR__.'/Swift',
* ));
*
* // activate the autoloader
* $loader->register();
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
*
* @api
*/
class
ApcUniversalClassLoader
extends
UniversalClassLoader
{
private
$prefix
;
/**
* Constructor.
*
* @param string $prefix A prefix to create a namespace in APC
*
* @api
*/
public
function
__construct
(
$prefix
)
{
if
(
!
extension_loaded
(
'apc'
))
{
throw
new
\
RuntimeException
(
'Unable to use ApcUniversalClassLoader as APC is not enabled.'
);
}
$this
->
prefix
=
$prefix
;
}
/**
* Finds a file by class name while caching lookups to APC.
*
* @param string $class A class name to resolve to file
*/
public
function
findFile
(
$class
)
{
if
(
false
===
$file
=
apc_fetch
(
$this
->
prefix
.
$class
))
{
apc_store
(
$this
->
prefix
.
$class
,
$file
=
parent
::
findFile
(
$class
));
}
return
$file
;
}
}
includes/Symfony/Component/ClassLoader/ClassCollectionLoader.php
0 → 100644
View file @
c85d62c6
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Component\ClassLoader
;
/**
* ClassCollectionLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
ClassCollectionLoader
{
static
private
$loaded
;
/**
* Loads a list of classes and caches them in one big file.
*
* @param array $classes An array of classes to load
* @param string $cacheDir A cache directory
* @param string $name The cache name prefix
* @param Boolean $autoReload Whether to flush the cache when the cache is stale or not
* @param Boolean $adaptive Whether to remove already declared classes or not
* @param string $extension File extension of the resulting file
*
* @throws \InvalidArgumentException When class can't be loaded
*/
static
public
function
load
(
$classes
,
$cacheDir
,
$name
,
$autoReload
,
$adaptive
=
false
,
$extension
=
'.php'
)
{
// each $name can only be loaded once per PHP process
if
(
isset
(
self
::
$loaded
[
$name
]))
{
return
;
}
self
::
$loaded
[
$name
]
=
true
;
if
(
$adaptive
)
{
// don't include already declared classes
$classes
=
array_diff
(
$classes
,
get_declared_classes
(),
get_declared_interfaces
());
// the cache is different depending on which classes are already declared
$name
=
$name
.
'-'
.
substr
(
md5
(
implode
(
'|'
,
$classes
)),
0
,
5
);
}
$cache
=
$cacheDir
.
'/'
.
$name
.
$extension
;
// auto-reload
$reload
=
false
;
if
(
$autoReload
)
{
$metadata
=
$cacheDir
.
'/'
.
$name
.
$extension
.
'.meta'
;
if
(
!
file_exists
(
$metadata
)
||
!
file_exists
(
$cache
))
{
$reload
=
true
;
}
else
{
$time
=
filemtime
(
$cache
);
$meta
=
unserialize
(
file_get_contents
(
$metadata
));
if
(
$meta
[
1
]
!=
$classes
)
{
$reload
=
true
;
}
else
{
foreach
(
$meta
[
0
]
as
$resource
)
{
if
(
!
file_exists
(
$resource
)
||
filemtime
(
$resource
)
>
$time
)
{
$reload
=
true
;
break
;
}
}
}
}
}
if
(
!
$reload
&&
file_exists
(
$cache
))
{
require_once
$cache
;
return
;
}
$files
=
array
();
$content
=
''
;
foreach
(
$classes
as
$class
)
{
if
(
!
class_exists
(
$class
)
&&
!
interface_exists
(
$class
)
&&
(
!
function_exists
(
'trait_exists'
)
||
!
trait_exists
(
$class
)))
{
throw
new
\
InvalidArgumentException
(
sprintf
(
'Unable to load class "%s"'
,
$class
));
}
$r
=
new
\
ReflectionClass
(
$class
);
$files
[]
=
$r
->
getFileName
();
$c
=
preg_replace
(
array
(
'/^\s*<\?php/'
,
'/\?>\s*$/'
),
''
,
file_get_contents
(
$r
->
getFileName
()));
// add namespace declaration for global code
if
(
!
$r
->
inNamespace
())
{
$c
=
"
\n
namespace
\n
{
\n".self::stripComments($c)."\n
}
\n
"
;
}
else
{
$c
=
self
::
fixNamespaceDeclarations
(
'<?php '
.
$c
);
$c
=
preg_replace
(
'/^\s*<\?php/'
,
''
,
$c
);
}
$content
.
=
$c
;
}
// cache the core classes
if
(
!
is_dir
(
dirname
(
$cache
)))
{
mkdir
(
dirname
(
$cache
),
0777
,
true
);
}
self
::
writeCacheFile
(
$cache
,
'<?php '
.
$content
);
if
(
$autoReload
)
{
// save the resources
self
::
writeCacheFile
(
$metadata
,
serialize
(
array
(
$files
,
$classes
)));
}
}
/**
* Adds brackets around each namespace if it's not already the case.
*
* @param string $source Namespace string
*
* @return string Namespaces with brackets
*/
static
public
function
fixNamespaceDeclarations
(
$source
)
{
if
(
!
function_exists
(
'token_get_all'
))
{
return
$source
;
}
$output
=
''
;
$inNamespace
=
false
;
$tokens
=
token_get_all
(
$source
);
for
(
$i
=
0
,
$max
=
count
(
$tokens
);
$i
<
$max
;
$i
++
)
{
$token
=
$tokens
[
$i
];
if
(
is_string
(
$token
))
{
$output
.
=
$token
;
}
elseif
(
in_array
(
$token
[
0
],
array
(
T_COMMENT
,
T_DOC_COMMENT
)))
{
// strip comments
continue
;
}
elseif
(
T_NAMESPACE
===
$token
[
0
])
{
if
(
$inNamespace
)
{
$output
.
=
"}
\n
"
;
}
$output
.
=
$token
[
1
];
// namespace name and whitespaces
while
((
$t
=
$tokens
[
++
$i
])
&&
is_array
(
$t
)
&&
in_array
(
$t
[
0
],
array
(
T_WHITESPACE
,
T_NS_SEPARATOR
,
T_STRING
)))
{
$output
.
=
$t
[
1
];
}
if
(
is_string
(
$t
)
&&
'{'
===
$t
)
{
$inNamespace
=
false
;
--
$i
;
}
else
{
$output
.
=
"
\n
{"
;
$inNamespace
=
true
;
}
}
else
{
$output
.
=
$token
[
1
];
}
}
if
(
$inNamespace
)
{
$output
.
=
"}
\n
"
;
}
return
$output
;
}
/**
* Writes a cache file.
*
* @param string $file Filename
* @param string $content Temporary file content
*
* @throws \RuntimeException when a cache file cannot be written
*/
static
private
function
writeCacheFile
(
$file
,
$content
)
{
$tmpFile
=
tempnam
(
dirname
(
$file
),
basename
(
$file
));
if
(
false
!==
@
file_put_contents
(
$tmpFile
,
$content
)
&&
@
rename
(
$tmpFile
,
$file
))
{
chmod
(
$file
,
0644
);
return
;
}
throw
new
\
RuntimeException
(
sprintf
(
'Failed to write cache file "%s".'
,
$file
));
}
/**
* Removes comments from a PHP source string.
*
* We don't use the PHP php_strip_whitespace() function
* as we want the content to be readable and well-formatted.
*
* @param string $source A PHP string
*
* @return string The PHP string with the comments removed
*/
static
private
function
stripComments
(
$source
)
{
if
(
!
function_exists
(
'token_get_all'
))
{
return
$source
;
}
$output
=
''
;
foreach
(
token_get_all
(
$source
)
as
$token
)
{
if
(
is_string
(
$token
))
{
$output
.
=
$token
;
}
elseif
(
!
in_array
(
$token
[
0
],
array
(
T_COMMENT
,
T_DOC_COMMENT
)))
{
$output
.
=
$token
[
1
];
}
}
// replace multiple new lines with a single newline
$output
=
preg_replace
(
array
(
'/\s+$/Sm'
,
'/\n+/S'
),
"
\n
"
,
$output
);
return
$output
;
}
}
includes/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php
0 → 100644
View file @
c85d62c6
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Component\ClassLoader
;
/**
* Checks that the class is actually declared in the included file.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
DebugUniversalClassLoader
extends
UniversalClassLoader
{
/**
* Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.
*/
static
public
function
enable
()
{
if
(
!
is_array
(
$functions
=
spl_autoload_functions
()))
{
return
;
}
foreach
(
$functions
as
$function
)
{
spl_autoload_unregister
(
$function
);
}
foreach
(
$functions
as
$function
)
{
if
(
is_array
(
$function
)
&&
$function
[
0
]
instanceof
UniversalClassLoader
)
{
$loader
=
new
static
();
$loader
->
registerNamespaceFallbacks
(
$function
[
0
]
->
getNamespaceFallbacks
());
$loader
->
registerPrefixFallbacks
(
$function
[
0
]
->
getPrefixFallbacks
());
$loader
->
registerNamespaces
(
$function
[
0
]
->
getNamespaces
());
$loader
->
registerPrefixes
(
$function
[
0
]
->
getPrefixes
());
$function
[
0
]
=
$loader
;
}
spl_autoload_register
(
$function
);
}
}
/**
* {@inheritDoc}
*/
public
function
loadClass
(
$class
)
{
if
(
$file
=
$this
->
findFile
(
$class
))
{
require
$file
;
if
(
!
class_exists
(
$class
,
false
)
&&
!
interface_exists
(
$class
,
false
)
&&
(
!
function_exists
(
'trait_exists'
)
||
!
trait_exists
(
$class
,
false
)))
{
throw
new
\
RuntimeException
(
sprintf
(
'The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.'
,
$class
,
$file
));
}
}
}
}
includes/Symfony/Component/ClassLoader/LICENSE
0 → 100644
View file @
c85d62c6
Copyright (c) 2004-2011 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
includes/Symfony/Component/ClassLoader/MapClassLoader.php
0 → 100644
View file @
c85d62c6
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Component\ClassLoader
;
/**
* A class loader that uses a mapping file to look up paths.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
MapClassLoader
{
private
$map
=
array
();
/**
* Constructor.
*
* @param array $map A map where keys are classes and values the absolute file path
*/
public
function
__construct
(
array
$map
)
{
$this
->
map
=
$map
;
}
/**
* Registers this instance as an autoloader.
*
* @param Boolean $prepend Whether to prepend the autoloader or not
*/
public
function
register
(
$prepend
=
false
)
{
spl_autoload_register
(
array
(
$this
,
'loadClass'
),
true
,
$prepend
);
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
*/
public
function
loadClass
(
$class
)
{
if
(
'\\'
===
$class
[
0
])
{
$class
=
substr
(
$class
,
1
);
}
if
(
isset
(
$this
->
map
[
$class
]))
{
require
$this
->
map
[
$class
];
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|null The path, if found
*/
public
function
findFile
(
$class
)
{
if
(
'\\'
===
$class
[
0
])
{
$class
=
substr
(
$class
,
1
);
}
if
(
isset
(
$this
->
map
[
$class
]))
{
return
$this
->
map
[
$class
];
}
}
}
includes/Symfony/Component/ClassLoader/UniversalClassLoader.php
0 → 100644
View file @
c85d62c6
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Symfony\Component\ClassLoader
;
/**
* UniversalClassLoader implements a "universal" autoloader for PHP 5.3.
*
* It is able to load classes that use either:
*
* * The technical interoperability standards for PHP 5.3 namespaces and
* class names (http://groups.google.com/group/php-standards/web/psr-0-final-proposal);
*
* * The PEAR naming convention for classes (http://pear.php.net/).
*
* Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be
* looked for in a list of locations to ease the vendoring of a sub-set of
* classes for large projects.
*
* Example usage:
*
* $loader = new UniversalClassLoader();
*
* // register classes with namespaces
* $loader->registerNamespaces(array(
* 'Symfony\Component' => __DIR__.'/component',
* 'Symfony' => __DIR__.'/framework',
* 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'),
* ));
*
* // register a library using the PEAR naming convention
* $loader->registerPrefixes(array(
* 'Swift_' => __DIR__.'/Swift',
* ));
*
* // activate the autoloader
* $loader->register();
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class
UniversalClassLoader
{
private
$namespaces
=
array
();
private
$prefixes
=
array
();
private
$namespaceFallbacks
=
array
();
private
$prefixFallbacks
=
array
();
/**
* Gets the configured namespaces.
*
* @return array A hash with namespaces as keys and directories as values
*/
public
function
getNamespaces
()
{
return
$this
->
namespaces
;
}
/**
* Gets the configured class prefixes.
*
* @return array A hash with class prefixes as keys and directories as values
*/
public
function
getPrefixes
()
{
return
$this
->
prefixes
;
}
/**
* Gets the directory(ies) to use as a fallback for namespaces.
*
* @return array An array of directories
*/
public
function
getNamespaceFallbacks
()
{
return
$this
->
namespaceFallbacks
;
}
/**
* Gets the directory(ies) to use as a fallback for class prefixes.
*
* @return array An array of directories
*/
public
function
getPrefixFallbacks
()