Update documentation. Change composer registerNamespaces method to addClassMap.
This commit is contained in:
parent
df1d1855a5
commit
336e203655
|
@ -43,7 +43,7 @@ This bundle can be installed using composer by adding the following in the `requ
|
||||||
...
|
...
|
||||||
"knplabs/knp-gaufrette-bundle": "dev-master"
|
"knplabs/knp-gaufrette-bundle": "dev-master"
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
### Git Submodule Style
|
### Git Submodule Style
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ If you are versioning your project with git and making changes to this bundle yo
|
||||||
|
|
||||||
$ git submodule add https://github.com/KnpLabs/KnpGaufretteBundle.git vendor/bundles/Knp/Bundle/GaufretteBundle
|
$ git submodule add https://github.com/KnpLabs/KnpGaufretteBundle.git vendor/bundles/Knp/Bundle/GaufretteBundle
|
||||||
|
|
||||||
## Add the namespace in the autoloader
|
## Add the namespace in the autoloader
|
||||||
|
|
||||||
You must register both Gaufrette and the KnpGaufretteBundle in your autoloader:
|
You must register both Gaufrette and the KnpGaufretteBundle in your autoloader:
|
||||||
(You do not have to do this if you are using the composer autoload system.)
|
(You do not have to do this if you are using the composer autoload system.)
|
||||||
|
@ -61,7 +61,7 @@ You must register both Gaufrette and the KnpGaufretteBundle in your autoloader:
|
||||||
|
|
||||||
// app/autoload.php
|
// app/autoload.php
|
||||||
|
|
||||||
$loader->registerNamespaces(array(
|
$loader->addClassMap(array(
|
||||||
'Knp\Bundle' => __DIR__.'/../vendor/bundles',
|
'Knp\Bundle' => __DIR__.'/../vendor/bundles',
|
||||||
'Gaufrette' => __DIR__.'/../vendor/gaufrette/src',
|
'Gaufrette' => __DIR__.'/../vendor/gaufrette/src',
|
||||||
// ...
|
// ...
|
||||||
|
@ -424,7 +424,7 @@ Note that Gaufrette is not currently compatible with the v2 Amazon SDK (called "
|
||||||
|
|
||||||
### Defining services
|
### Defining services
|
||||||
|
|
||||||
To use the Amazon S3 adapter you need to provide a valid `AmazonS3` instance (as defined in the Amazon SDK). This can
|
To use the Amazon S3 adapter you need to provide a valid `AmazonS3` instance (as defined in the Amazon SDK). This can
|
||||||
easily be set up as using Symfony's service configuration:
|
easily be set up as using Symfony's service configuration:
|
||||||
|
|
||||||
``` yaml
|
``` yaml
|
||||||
|
@ -436,7 +436,7 @@ services:
|
||||||
options:
|
options:
|
||||||
key: '%aws_key%'
|
key: '%aws_key%'
|
||||||
secret: '%aws_secret_key%'
|
secret: '%aws_secret_key%'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
@ -466,11 +466,11 @@ Adapter for OpenCloud (Rackspace)
|
||||||
* `container_name`: the name of the container to use
|
* `container_name`: the name of the container to use
|
||||||
* `create_container`: if `true` will create the container if it doesn't exist *(default `false`)*
|
* `create_container`: if `true` will create the container if it doesn't exist *(default `false`)*
|
||||||
* `detect_content_type`: if `true` will detect the content type for each file *(default `true`)*
|
* `detect_content_type`: if `true` will detect the content type for each file *(default `true`)*
|
||||||
|
|
||||||
### Defining services
|
### Defining services
|
||||||
|
|
||||||
To use the OpenCloud adapter you should provide a valid `ObjectStore` instance. You can retrieve an instance through the
|
To use the OpenCloud adapter you should provide a valid `ObjectStore` instance. You can retrieve an instance through the
|
||||||
`OpenCloud\OpenStack` or `OpenCloud\Rackspace` instances. We can provide a comprehensive configuration through the Symfony
|
`OpenCloud\OpenStack` or `OpenCloud\Rackspace` instances. We can provide a comprehensive configuration through the Symfony
|
||||||
DIC configuration.
|
DIC configuration.
|
||||||
|
|
||||||
#### Define OpenStack/Rackspace service
|
#### Define OpenStack/Rackspace service
|
||||||
|
@ -524,7 +524,7 @@ services:
|
||||||
factory_service: opencloud.connection.hpcloud
|
factory_service: opencloud.connection.hpcloud
|
||||||
factory_method: ObjectStore
|
factory_method: ObjectStore
|
||||||
arguments:
|
arguments:
|
||||||
- 'Object Storage' # Object storage type
|
- 'Object Storage' # Object storage type
|
||||||
- 'region-a.geo-1' # Object storage region
|
- 'region-a.geo-1' # Object storage region
|
||||||
- 'publicURL' # url type
|
- 'publicURL' # url type
|
||||||
```
|
```
|
||||||
|
@ -539,7 +539,7 @@ services:
|
||||||
factory_service: opencloud.connection
|
factory_service: opencloud.connection
|
||||||
factory_method: ObjectStore
|
factory_method: ObjectStore
|
||||||
arguments:
|
arguments:
|
||||||
- 'cloudFiles' # Object storage type
|
- 'cloudFiles' # Object storage type
|
||||||
- 'DFW' # Object storage region
|
- 'DFW' # Object storage region
|
||||||
- 'publicURL' # url type
|
- 'publicURL' # url type
|
||||||
```
|
```
|
||||||
|
@ -599,14 +599,14 @@ knp_gaufrette:
|
||||||
|
|
||||||
## Stream Wrapper
|
## Stream Wrapper
|
||||||
|
|
||||||
The `stream_wrapper` settings allow you to register filesystems with a specified domain and
|
The `stream_wrapper` settings allow you to register filesystems with a specified domain and
|
||||||
then use as a stream wrapper anywhere in your code like:
|
then use as a stream wrapper anywhere in your code like:
|
||||||
`gaufrette://domain/file.txt`
|
`gaufrette://domain/file.txt`
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
* `protocol` The protocol name like `gaufrette://…` *(default gaufrette)*
|
* `protocol` The protocol name like `gaufrette://…` *(default gaufrette)*
|
||||||
* `filesystem` An array that contains filesystems that you want to register to this stream_wrapper.
|
* `filesystem` An array that contains filesystems that you want to register to this stream_wrapper.
|
||||||
If you set array keys these will be used as an alias for the filesystem (see examples below) *(default all filesystems without aliases)*
|
If you set array keys these will be used as an alias for the filesystem (see examples below) *(default all filesystems without aliases)*
|
||||||
|
|
||||||
### Example 1
|
### Example 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user