Forráskód Böngészése

Classloader PHPDoc

Tim Nagel 14 éve
szülő
commit
108efc6ec9

+ 13 - 0
src/Symfony/Component/ClassLoader/ClassCollectionLoader.php

@@ -119,6 +119,10 @@ class ClassCollectionLoader
 
     /**
      * 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)
     {
@@ -162,6 +166,15 @@ class ClassCollectionLoader
         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)
     {
         $tmpFile = tempnam(dirname($file), basename($file));

+ 6 - 0
src/Symfony/Component/ClassLoader/MapFileClassLoader.php

@@ -12,6 +12,7 @@
 namespace Symfony\Component\ClassLoader;
 
 /**
+ * A class loader that uses a mapping file to look up paths.
  *
  * @author Fabien Potencier <fabien.potencier@symfony-project.org>
  */
@@ -19,6 +20,11 @@ class MapFileClassLoader
 {
     protected $map = array();
 
+    /**
+     * Constructor
+     *
+     * @param string Path to class mapping file
+     */
     public function __construct($file)
     {
         $this->map = require $file;

+ 2 - 2
src/Symfony/Component/ClassLoader/UniversalClassLoader.php

@@ -102,7 +102,7 @@ class UniversalClassLoader
     /**
      * 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)
     {
@@ -112,7 +112,7 @@ class UniversalClassLoader
     /**
      * 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)
     {