Classloader PHPDoc
This commit is contained in:
parent
69672bad59
commit
108efc6ec9
@ -119,6 +119,10 @@ class ClassCollectionLoader
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds brackets around each namespace if it's not already the case.
|
* Adds brackets around each namespace if it's not already the case.
|
||||||
|
*
|
||||||
|
* @param string Namespace string
|
||||||
|
*
|
||||||
|
* @return string Namespaces with brackets
|
||||||
*/
|
*/
|
||||||
static public function fixNamespaceDeclarations($source)
|
static public function fixNamespaceDeclarations($source)
|
||||||
{
|
{
|
||||||
@ -162,6 +166,15 @@ class ClassCollectionLoader
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a cache file
|
||||||
|
*
|
||||||
|
* @param string Filename
|
||||||
|
* @param string Temporary file content
|
||||||
|
*
|
||||||
|
* @throws \RuntimeException when a cache file cannot be written
|
||||||
|
*/
|
||||||
|
|
||||||
static protected function writeCacheFile($file, $content)
|
static protected function writeCacheFile($file, $content)
|
||||||
{
|
{
|
||||||
$tmpFile = tempnam(dirname($file), basename($file));
|
$tmpFile = tempnam(dirname($file), basename($file));
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\ClassLoader;
|
namespace Symfony\Component\ClassLoader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A class loader that uses a mapping file to look up paths.
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien.potencier@symfony-project.org>
|
* @author Fabien Potencier <fabien.potencier@symfony-project.org>
|
||||||
*/
|
*/
|
||||||
@ -19,6 +20,11 @@ class MapFileClassLoader
|
|||||||
{
|
{
|
||||||
protected $map = array();
|
protected $map = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param string Path to class mapping file
|
||||||
|
*/
|
||||||
public function __construct($file)
|
public function __construct($file)
|
||||||
{
|
{
|
||||||
$this->map = require $file;
|
$this->map = require $file;
|
||||||
|
@ -102,7 +102,7 @@ class UniversalClassLoader
|
|||||||
/**
|
/**
|
||||||
* Registers the directory to use as a fallback for namespaces.
|
* Registers the directory to use as a fallback for namespaces.
|
||||||
*
|
*
|
||||||
* @return string|array $dirs A directory path or an array of directories
|
* @param string|array $dirs A directory path or an array of directories
|
||||||
*/
|
*/
|
||||||
public function registerNamespaceFallback($dirs)
|
public function registerNamespaceFallback($dirs)
|
||||||
{
|
{
|
||||||
@ -112,7 +112,7 @@ class UniversalClassLoader
|
|||||||
/**
|
/**
|
||||||
* Registers the directory to use as a fallback for class prefixes.
|
* Registers the directory to use as a fallback for class prefixes.
|
||||||
*
|
*
|
||||||
* @return string|array $dirs A directory path or an array of directories
|
* @param string|array $dirs A directory path or an array of directories
|
||||||
*/
|
*/
|
||||||
public function registerPrefixFallback($dirs)
|
public function registerPrefixFallback($dirs)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user