Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reorganize documentation

  • Loading branch information...
commit 4ee017ed6e20ac91715582e5ac5fa011aa55a731 1 parent 7a1dcf9
@egeloen egeloen authored
View
120 README.md
@@ -5,120 +5,14 @@ The supported annotations are :
- @XmlHttpRequest: Checks if the request is an XML HTTP Request.
- @JsonTemplate: Converts the controller result to a JSON response.
-# Installation
+Documentation
+-------------
-## Add WidopFrameworkExtraBundle to your vendor/bundles/ directory
+ 1. [Installation](https://github.com/widop/WidopFrameworkExtraBundle/tree/master/Resources/doc/installation.md)
+ 2. [Configuration](https://github.com/widop/WidopFrameworkExtraBundle/tree/master/Resources/doc/configuration.md)
+ 3. [Usage](https://github.com/widop/WidopFrameworkExtraBundle/tree/master/Resources/doc/usage.md)
-### Using the vendors script
-
-Add the following lines in your ``deps`` file
-
-```
-[WidopFrameworkExtraBundle]
- git=http://github.com/widop/WidopFrameworkExtraBundle.git
- target=bundles/Widop/FrameworkExtraBundle
-```
-
-Run the vendors script
-
-``` bash
-$ php bin/vendors update
-```
-
-### Using submodules
-
-``` bash
-$ git submodule add http://github.com/widop/WidopFrameworkExtraBundle.git vendor/bundles/Widop/FrameworkExtraBundle
-```
-
-## Add the Widop namespace to your autoloader
-
-``` php
-<?php
-// app/autoload.php
-
-$loader->registerNamespaces(array(
- //..
- 'Widop' => __DIR__.'/../vendor/bundles',
-);
-```
-
-## Add the WidopFrameworkExtraBundle to your application kernel
-
-``` php
-<?php
-// app/AppKernel.php
-
-public function registerBundles()
-{
- return array(
- //..
- new Widop\FrameworkExtraBundle\WidopFrameworkExtraBundle(),
- );
-}
-```
-
-# Configuration
-
-All features provided by the bundle are enabled by default when the bundle is registered in your Kernel class.
-The default configuration is as follow:
-
-``` yaml
-# app/config/config.yml
-
-widop_framework_extra:
- xml_http_request: { annotations: true }
- json_template: { annotations: true }
-```
-
-You can disable some annotations by defining one or more settings to false.
-
-# Usage
-
-## XML HTTP Request Annotation
-
-```` php
-<?php
-
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Widop\FrameworkExtraBundle\Configuration\XmlHttpRequest;
-
-class AnnotController extends Controller
-{
- /**
- * @XmlHttpRequest
- */
- public function indexAction()
- {
-
- }
-}
-````
-
-If the request is not an XML HTTP Request, an NotFoundHttpException is thrown.
-
-## JSON Template Annotation
-
-```` php
-<?php
-
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Widop\FrameworkExtraBundle\Configuration\JsonTemplate;
-
-class AnnotController extends Controller
-{
- /**
- * @JsonTemplate
- */
- public function indexAction()
- {
- return array('foo' => 'bar');
- }
-}
-````
-
-The response is automatically converted to a JSON response.
-
-# License
+License
+-------
The bundle is under the MIT license. See the complete license [here](http://github.com/widop/WidopFrameworkExtraBundle/blob/master/Resources/meta/LICENSE).
View
14 Resources/doc/configuration.md
@@ -0,0 +1,14 @@
+# Configuration
+
+All features provided by the bundle are enabled by default when the bundle is registered in your Kernel class.
+The default configuration is as follow:
+
+``` yaml
+# app/config/config.yml
+
+widop_framework_extra:
+ xml_http_request: { annotations: true }
+ json_template: { annotations: true }
+```
+
+You can disable some annotations by defining one or more settings to false.
View
89 Resources/doc/installation.md
@@ -0,0 +1,89 @@
+# Installation
+
+## Symfony 2.1.*
+
+### Add the WidopFrameworkExtraBundle to your composer configuration
+
+Add the bundle to the require section of your `composer.json`
+
+``` json
+{
+ "require": {
+ "widop/framework-extra-bundle": "dev-master"
+ }
+}
+```
+
+Run the composer update command
+
+``` bash
+$ php composer.phar update
+```
+
+### Add the WidopFrameworkExtraBundle to your application kernel
+
+``` php
+<?php
+// app/AppKernel.php
+
+public function registerBundles()
+{
+ return array(
+ //..
+ new Widop\FrameworkExtraBundle\WidopFrameworkExtraBundle(),
+ );
+}
+```
+
+## Symfony 2.0.*
+
+### Add the WidopFrameworkExtraBundle to your vendor/bundles/ directory
+
+#### Using the vendors script
+
+Add the following lines in your ``deps`` file
+
+```
+[WidopFrameworkExtraBundle]
+ git=http://github.com/widop/WidopFrameworkExtraBundle.git
+ target=bundles/Widop/FrameworkExtraBundle
+```
+
+Run the vendors script
+
+``` bash
+$ php bin/vendors update
+```
+
+#### Using submodules
+
+``` bash
+$ git submodule add http://github.com/widop/WidopFrameworkExtraBundle.git vendor/bundles/Widop/FrameworkExtraBundle
+```
+
+### Add the Widop namespace to your autoloader
+
+``` php
+<?php
+// app/autoload.php
+
+$loader->registerNamespaces(array(
+ //..
+ 'Widop' => __DIR__.'/../vendor/bundles',
+);
+```
+
+### Add the WidopFrameworkExtraBundle to your application kernel
+
+``` php
+<?php
+// app/AppKernel.php
+
+public function registerBundles()
+{
+ return array(
+ //..
+ new Widop\FrameworkExtraBundle\WidopFrameworkExtraBundle(),
+ );
+}
+```
View
45 Resources/doc/usage.md
@@ -0,0 +1,45 @@
+# Usage
+
+## XML HTTP Request Annotation
+
+```` php
+<?php
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Widop\FrameworkExtraBundle\Configuration\XmlHttpRequest;
+
+class AnnotController extends Controller
+{
+ /**
+ * @XmlHttpRequest
+ */
+ public function indexAction()
+ {
+
+ }
+}
+````
+
+If the request is not an XML HTTP Request, an NotFoundHttpException is thrown.
+
+## JSON Template Annotation
+
+```` php
+<?php
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Widop\FrameworkExtraBundle\Configuration\JsonTemplate;
+
+class AnnotController extends Controller
+{
+ /**
+ * @JsonTemplate
+ */
+ public function indexAction()
+ {
+ return array('foo' => 'bar');
+ }
+}
+````
+
+The response is automatically converted to a JSON response.
Please sign in to comment.
Something went wrong with that request. Please try again.