Download the PHP package vierbergenlars/manipulator-bundle without Composer
On this page you can find all versions of the php package vierbergenlars/manipulator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vierbergenlars/manipulator-bundle
More information about vierbergenlars/manipulator-bundle
Files in vierbergenlars/manipulator-bundle
Package manipulator-bundle
Short Description A set of classes to make modifying Symfony services and routes easier
License MIT
Informations about the package manipulator-bundle
Manipulator Bundle
A set of classes to make modifying Symfony services and routes easier.
Installation
Usage
All manipulators require the path to be passed in their constructor. The file must already exist and have a valid structure.
The write()
method writes all changes to the original file.
Modify services
Use XmlServiceManipulator
or YamlServiceManipulator
, depending on the type of the configuration file.
addService(string $id, Definition $service)
: adds a service to the configuration. Pass the service id, and the Symfony DI DefinitionremoveService(string $id)
: remove a service from the configuration.
Modify routing
Use XmlRouteManipulator
or YamlRouteManipulator
, depending on the type of the configuration file.
addRoute(string $name, array $options)
: Adds a route to the configuration.removeRoute(string $name)
: Removes a route from the configuration.addImport(string $resource, array $options)
: Adds an import of a resource to the configurationremoveImport(string $resource)
: Removes an import from the configuration.
$options
An array of configuration options for the route or import.
The options correspond to the settings structure in a routing YAML file, but they are listed below for reference.
Have a look at the symfony documentation
Key | Type | Description |
---|---|---|
path | string | Path that the route will match (route only) |
type | string | Type of the import (import only) |
prefix | string | Path to prepend to imported routes (import only) |
host | string | Host to match for the route(s) |
schemes | string | HTTP schemes the route(s) will respond to |
methods | string | HTTP methods the route(s) will respond to |
defaults | array | Map of default settings for variables in the route |
requirements | array | Map of requirements for variables in the route |
options | array | Map of internal options for the route (rarely used) |
condition | string | Custom condition that determines if the route matches |
All versions of manipulator-bundle with dependencies
symfony/dependency-injection Version ~2.1
symfony/yaml Version ~2.1