Updated doc
This commit is contained in:
parent
e27dc9cbd5
commit
06b5f2783d
|
@ -35,6 +35,7 @@ Installation
|
|||
|
||||
* Register this bundle in the `AppKernel` class:
|
||||
|
||||
``` php
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
|
@ -48,14 +49,17 @@ Installation
|
|||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
* Don't forget to register the PropelBundle namespace in `app/autoload.php`:
|
||||
|
||||
``` php
|
||||
$loader->registerNamespaces(array(
|
||||
...
|
||||
|
||||
'Propel' => __DIR__.'/../vendor/bundles',
|
||||
));
|
||||
```
|
||||
|
||||
|
||||
Sample Configuration
|
||||
|
@ -63,6 +67,7 @@ Sample Configuration
|
|||
|
||||
### Project configuration
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
path: "%kernel.root_dir%/../vendor/propel"
|
||||
|
@ -91,6 +96,7 @@ Sample Configuration
|
|||
# dsn: mysql:host=localhost;dbname=test
|
||||
# options: {}
|
||||
# attributes: {}
|
||||
```
|
||||
|
||||
|
||||
### Build properties
|
||||
|
@ -102,18 +108,21 @@ You can define _build properties_ by creating a `propel.ini` file in `app/config
|
|||
|
||||
But you can follow the Symfony2 way by adding build properties in `app/config/config.yml`:
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
build_properties:
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
### Sample Schema
|
||||
|
||||
Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xml` :
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database name="default" namespace="Sensio\HelloBundle\Model" defaultIdMethod="native">
|
||||
|
||||
|
@ -134,6 +143,7 @@ Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xm
|
|||
</table>
|
||||
|
||||
</database>
|
||||
```
|
||||
|
||||
|
||||
Commands
|
||||
|
@ -234,10 +244,12 @@ If none of this parameter are set all files, XML and SQL, in the directory will
|
|||
|
||||
A valid _XML fixtures file_ is:
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dataset name="all">
|
||||
<Object Id="..." />
|
||||
</dataset>
|
||||
```
|
||||
|
||||
|
||||
### Graphviz
|
||||
|
@ -251,13 +263,22 @@ It will write files in `app/propel/graph/`.
|
|||
|
||||
### Database
|
||||
|
||||
You can drop a **database**:
|
||||
You can create a **database**:
|
||||
|
||||
> php app/console propel:database:drop
|
||||
> php app/console propel:database:create [--connection[=""]]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
|
||||
You can drop a **database**:
|
||||
|
||||
> php app/console propel:database:drop [--connection[=""]] [--force]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
Note that the `--force` option is needed to actually execute the SQL statements.
|
||||
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ Installation
|
|||
|
||||
* Register this bundle in the `AppKernel` class:
|
||||
|
||||
``` php
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
|
@ -48,14 +49,17 @@ Installation
|
|||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
* Don't forget to register the PropelBundle namespace in `app/autoload.php`:
|
||||
|
||||
``` php
|
||||
$loader->registerNamespaces(array(
|
||||
...
|
||||
|
||||
'Propel' => __DIR__.'/../vendor/bundles',
|
||||
));
|
||||
```
|
||||
|
||||
|
||||
Sample Configuration
|
||||
|
@ -63,6 +67,7 @@ Sample Configuration
|
|||
|
||||
### Project configuration
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
path: "%kernel.root_dir%/../vendor/propel"
|
||||
|
@ -91,6 +96,7 @@ Sample Configuration
|
|||
# dsn: mysql:host=localhost;dbname=test
|
||||
# options: {}
|
||||
# attributes: {}
|
||||
```
|
||||
|
||||
|
||||
### Build properties
|
||||
|
@ -102,18 +108,21 @@ You can define _build properties_ by creating a `propel.ini` file in `app/config
|
|||
|
||||
But you can follow the Symfony2 way by adding build properties in `app/config/config.yml`:
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
build_properties:
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
### Sample Schema
|
||||
|
||||
Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xml` :
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database name="default" namespace="Sensio\HelloBundle\Model" defaultIdMethod="native">
|
||||
|
||||
|
@ -134,6 +143,7 @@ Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xm
|
|||
</table>
|
||||
|
||||
</database>
|
||||
```
|
||||
|
||||
|
||||
Commands
|
||||
|
@ -234,10 +244,12 @@ If none of this parameter are set all files, XML and SQL, in the directory will
|
|||
|
||||
A valid _XML fixtures file_ is:
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dataset name="all">
|
||||
<Object Id="..." />
|
||||
</dataset>
|
||||
```
|
||||
|
||||
|
||||
### Graphviz
|
||||
|
@ -251,13 +263,22 @@ It will write files in `app/propel/graph/`.
|
|||
|
||||
### Database
|
||||
|
||||
You can drop a **database**:
|
||||
You can create a **database**:
|
||||
|
||||
> php app/console propel:database:drop
|
||||
> php app/console propel:database:create [--connection[=""]]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
|
||||
You can drop a **database**:
|
||||
|
||||
> php app/console propel:database:drop [--connection[=""]] [--force]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
Note that the `--force` option is needed to actually execute the SQL statements.
|
||||
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ Installation
|
|||
|
||||
* Register this bundle in the `AppKernel` class:
|
||||
|
||||
``` php
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
|
@ -48,14 +49,17 @@ Installation
|
|||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
* Don't forget to register the PropelBundle namespace in `app/autoload.php`:
|
||||
|
||||
``` php
|
||||
$loader->registerNamespaces(array(
|
||||
...
|
||||
|
||||
'Propel' => __DIR__.'/../vendor/bundles',
|
||||
));
|
||||
```
|
||||
|
||||
|
||||
Sample Configuration
|
||||
|
@ -63,6 +67,7 @@ Sample Configuration
|
|||
|
||||
### Project configuration
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
path: "%kernel.root_dir%/../vendor/propel"
|
||||
|
@ -91,6 +96,7 @@ Sample Configuration
|
|||
# dsn: mysql:host=localhost;dbname=test
|
||||
# options: {}
|
||||
# attributes: {}
|
||||
```
|
||||
|
||||
|
||||
### Build properties
|
||||
|
@ -102,18 +108,21 @@ You can define _build properties_ by creating a `propel.ini` file in `app/config
|
|||
|
||||
But you can follow the Symfony2 way by adding build properties in `app/config/config.yml`:
|
||||
|
||||
``` yaml
|
||||
# in app/config/config.yml
|
||||
propel:
|
||||
build_properties:
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
xxxxx.xxxx.xxxxx: XXXX
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
### Sample Schema
|
||||
|
||||
Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xml` :
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database name="default" namespace="Sensio\HelloBundle\Model" defaultIdMethod="native">
|
||||
|
||||
|
@ -134,6 +143,7 @@ Place the following schema in `src/Sensio/HelloBundle/Resources/config/schema.xm
|
|||
</table>
|
||||
|
||||
</database>
|
||||
```
|
||||
|
||||
|
||||
Commands
|
||||
|
@ -234,10 +244,12 @@ If none of this parameter are set all files, XML and SQL, in the directory will
|
|||
|
||||
A valid _XML fixtures file_ is:
|
||||
|
||||
``` xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dataset name="all">
|
||||
<Object Id="..." />
|
||||
</dataset>
|
||||
```
|
||||
|
||||
|
||||
### Graphviz
|
||||
|
@ -251,13 +263,22 @@ It will write files in `app/propel/graph/`.
|
|||
|
||||
### Database
|
||||
|
||||
You can drop a **database**:
|
||||
You can create a **database**:
|
||||
|
||||
> php app/console propel:database:drop
|
||||
> php app/console propel:database:create [--connection[=""]]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
|
||||
You can drop a **database**:
|
||||
|
||||
> php app/console propel:database:drop [--connection[=""]] [--force]
|
||||
|
||||
As usual, `--connection` allows to specify a connection.
|
||||
|
||||
Note that the `--force` option is needed to actually execute the SQL statements.
|
||||
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue