forked from emgiezet/DoctrineMongoDBBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doctrine#260 from doctrine/filter-params
Support filter parameters in configuration
- Loading branch information
Showing
10 changed files
with
260 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Tests/DependencyInjection/Fixtures/config/xml/odm_filters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:doctrine="http://symfony.com/schema/dic/doctrine/odm/mongodb" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine/odm/mongodb http://symfony.com/schema/dic/doctrine/odm/mongodb/mongodb-1.0.xsd"> | ||
|
||
<doctrine:mongodb> | ||
<doctrine:connection id="default" server="mongodb://localhost:27017" /> | ||
|
||
<doctrine:document-manager id="default" connection="default"> | ||
<doctrine:filter name="disabled_filter" enabled="false" class="Vendor\Filter\DisabledFilter" /> | ||
<doctrine:filter name="basic_filter" enabled="true" class="Vendor\Filter\BasicFilter" /> | ||
<doctrine:filter name="complex_filter" enabled="true" class="Vendor\Filter\ComplexFilter"> | ||
<doctrine:parameter name="integer">1</doctrine:parameter> | ||
<doctrine:parameter name="string">foo</doctrine:parameter> | ||
<doctrine:parameter name="object">{"key":"value"}</doctrine:parameter> | ||
<doctrine:parameter name="array">[1,2,3]</doctrine:parameter> | ||
</doctrine:filter> | ||
</doctrine:document-manager> | ||
|
||
</doctrine:mongodb> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Tests/DependencyInjection/Fixtures/config/yml/odm_filters.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
doctrine_mongodb: | ||
connections: | ||
default: | ||
server: mongodb://localhost:27017 | ||
document_managers: | ||
default: | ||
filters: | ||
disabled_filter: | ||
class: Vendor\Filter\DisabledFilter | ||
enabled: false | ||
basic_filter: | ||
class: Vendor\Filter\BasicFilter | ||
enabled: true | ||
complex_filter: | ||
class: Vendor\Filter\ComplexFilter | ||
enabled: true | ||
parameters: | ||
integer: 1 | ||
string: foo | ||
object: { key: value } | ||
array: [ 1, 2, 3 ] |