Browse Source

added PHPDoc

Ryan Weaver 14 years ago
parent
commit
c39635680f

+ 11 - 4
src/Symfony/Component/DependencyInjection/Loader/LoaderResolver.php

@@ -12,12 +12,19 @@ namespace Symfony\Component\DependencyInjection\Loader;
  */
 
 /**
- * LoaderResolver selects a loader for a given resource..
+ * LoaderResolver selects a loader for a given resource.
+ *
+ * A resource can be anything that can be converted to a ContainerBuilder
+ * instance (e.g. a full path to a config file or a Closure). Each
+ * loader determines whether it can load a resource and how.
  *
  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
  */
 class LoaderResolver implements LoaderResolverInterface
 {
+    /**
+     * @var LoaderInterface[] An array of LoaderInterface objects
+     */
     protected $loaders;
 
     /**
@@ -38,7 +45,7 @@ class LoaderResolver implements LoaderResolverInterface
      *
      * @param mixed  $resource A resource
      *
-     * @return LoaderInterface A LoaderInterface instance
+     * @return LoaderInterface|false A LoaderInterface instance
      */
     public function resolve($resource)
     {
@@ -52,7 +59,7 @@ class LoaderResolver implements LoaderResolverInterface
     }
 
     /**
-     * Sets a loader.
+     * Adds a loader.
      *
      * @param LoaderInterface $loader A LoaderInterface instance
      */
@@ -65,7 +72,7 @@ class LoaderResolver implements LoaderResolverInterface
     /**
      * Returns the registered loaders.
      *
-     * @return LoaderInterface[] A array of LoaderInterface instances
+     * @return LoaderInterface[] An array of LoaderInterface instances
      */
     public function getLoaders()
     {

+ 11 - 1
src/Symfony/Component/HttpKernel/Bundle/Bundle.php

@@ -18,7 +18,8 @@ use Symfony\Component\Finder\Finder;
  */
 
 /**
- * Bundle.
+ * An implementation of the BundleInterface that follows a few conventions
+ * for the DependencyInjection extensions and the Console commands. 
  *
  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
  */
@@ -131,6 +132,11 @@ abstract class Bundle extends ContainerAware implements BundleInterface
     /**
      * Finds and registers Commands.
      *
+     * Override this method if your bundle commands do not follow the conventions:
+     *
+     * * Commands are in the 'Command' sub-directory
+     * * Commands extend Symfony\Component\Console\Command\Command
+     *
      * @param Application $application An Application instance
      */
     public function registerCommands(Application $application)
@@ -151,6 +157,10 @@ abstract class Bundle extends ContainerAware implements BundleInterface
         }
     }
 
+    /**
+     * Initializes the properties on this object that require a reflection
+     * object to have been created.
+     */
     protected function initReflection()
     {
         $tmp = dirname(str_replace('\\', '/', get_class($this)));

+ 3 - 3
src/Symfony/Component/Routing/Loader/LoaderResolver.php

@@ -38,7 +38,7 @@ class LoaderResolver implements LoaderResolverInterface
      *
      * @param mixed  $resource A resource
      *
-     * @return LoaderInterface A LoaderInterface instance
+     * @return LoaderInterface|false A LoaderInterface instance
      */
     public function resolve($resource)
     {
@@ -52,7 +52,7 @@ class LoaderResolver implements LoaderResolverInterface
     }
 
     /**
-     * Sets a loader.
+     * Adds a loader.
      *
      * @param LoaderInterface $loader A LoaderInterface instance
      */
@@ -65,7 +65,7 @@ class LoaderResolver implements LoaderResolverInterface
     /**
      * Returns the registered loaders.
      *
-     * @return LoaderInterface[] A array of LoaderInterface instances
+     * @return LoaderInterface[] An array of LoaderInterface instances
      */
     public function getLoaders()
     {