浏览代码

[DependencyInjection] added some usage examples in the PHPDoc

Fabien Potencier 15 年之前
父节点
当前提交
11acd0e78b

+ 4 - 0
src/Symfony/Components/DependencyInjection/Loader/Extension/DoctrineExtension.php

@@ -27,6 +27,10 @@ class DoctrineExtension extends LoaderExtension
   /**
    * Loads the DBAL configuration.
    *
+   * Usage example:
+   *
+   *      <doctrine:dbal dbname="sfweb" username="root" />
+   *
    * @param array $config A configuration array
    *
    * @return BuilderConfiguration A BuilderConfiguration instance

+ 8 - 0
src/Symfony/Components/DependencyInjection/Loader/Extension/SwiftMailerExtension.php

@@ -27,6 +27,14 @@ class SwiftMailerExtension extends LoaderExtension
   /**
    * Loads the Swift Mailer configuration.
    *
+   * Usage example:
+   *
+   *      <swift:mailer transport="gmail" delivery_strategy="spool">
+   *        <swift:username>fabien</swift:username>
+   *        <swift:password>xxxxx</swift:password>
+   *        <swift:spool path="/path/to/spool/" />
+   *      </swift:mailer>
+   *
    * @param array $config A configuration array
    *
    * @return BuilderConfiguration A BuilderConfiguration instance

+ 9 - 1
src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php

@@ -26,7 +26,15 @@ use Symfony\Components\DependencyInjection\Reference;
 class SymfonyTemplatingExtension extends LoaderExtension
 {
   /**
-   * Loads the template configuration.
+   * Loads the templating configuration.
+   *
+   * Usage example:
+   *
+   *      <symfony:templating path="/path/to/templates" cache="/path/to/cache">
+   *        <symfony:loader>symfony.templating.loader.filesystem</symfony:loader>
+   *        <symfony:helper>symfony.templating.helper.javascripts</symfony:helper>
+   *        <symfony:helper>symfony.templating.helper.stylesheets</symfony:helper>
+   *      </symfony:templating>
    *
    * @param array $config A configuration array
    *

+ 11 - 0
src/Symfony/Components/DependencyInjection/Loader/Extension/ZendExtension.php

@@ -27,6 +27,10 @@ class ZendExtension extends LoaderExtension
   /**
    * Loads the logger configuration.
    *
+   * Usage example:
+   *
+   *      <zend:logger priority="info" path="/path/to/some.log" />
+   *
    * @param array $config A configuration array
    *
    * @return BuilderConfiguration A BuilderConfiguration instance
@@ -54,6 +58,13 @@ class ZendExtension extends LoaderExtension
   /**
    * Loads the mail configuration.
    *
+   * Usage example:
+   *
+   *      <zend:mail transport="gmail">
+   *        <zend:username>fabien</zend:username>
+   *        <zend:password>xxxxxx</zend:password>
+   *      </zend:mail>
+   *
    * @param array $config A configuration array
    *
    * @return BuilderConfiguration A BuilderConfiguration instance