-
Notifications
You must be signed in to change notification settings - Fork 0
Pull
This controller enables an import-module to be used via the command line interface.
The controller must not implement any logic to import data in to the storage. This has to be handled in the import-module to be injected. This is to keep the architecture and the possible options of the controller to handle different formats flexible and easy to extend.
The architecture does not differ much from the one used for the Push controller. The main difference is that the Symfony2 framework is used to provide a shell access layer instead of a route to handle incoming requests. Doing so the controller is in charge fetching and verifying the data from a service (web-service, RSS-/Atom-feed, etc.) on his own.
[1] The class Command is part of the Symfony2 frame work and is located in the namespace '\Symfony\Bundle\FrameworkBundle\Command'. Configuration there is no Symfony2 typical configuration as in a yaml configuration necessary for this controller. The configuration is part of the PHP code as there is a method named configuration() to be overwritten from the base class.
Within the configuration() method the arguments, name, description, etc of the command are defined to make the controller accessible.
How to call the controller from the command line is described in the RSS-Feed section.