Download the PHP package antidot-fw/cli without Composer
On this page you can find all versions of the php package antidot-fw/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antidot-fw/cli
More information about antidot-fw/cli
Files in antidot-fw/cli
Package cli
Short Description Anti.Framework console line tool
License BSD-2-Clause
Informations about the package cli
Antidot Framework Console Tool
This library is an adapter for using the Symfony Console component
using the standard Zend Framework configuration and any dependency injection container compatible with
the Psr\ContainerInterface
Install
Using composer package manager
`
Antidot Framework:
The Cli component is installed by default in Antidot Framework Starter
Zend Expressive:
The Cli component will be automatically installed by running composer require command when we have previously installed the library Zend Config Aggregator
All we'll need to do is create the Console entry point:
``
Finally we will give execution permissions to the file bin/console
`
As Standalone application
The Cli component can also be used to create console applications without any Framework,
all we need is an implementation of the dependency injection container compatible with the
standard Psr\ContainerInterface
Assuming we create a project with the following structure:
`
As a dependency we could use the Antidot Framework adapter For Aura Container
`
We create the file config/container.php
that must return a configured instance of Psr\ContainerInterface
to us.
``
We need to create the Console entry point:
``
And give to it execution permissions
`
Usage
Una vez instalada la Consola, podemos ver los comndos disponibles ejecutando el punto de entrada con el parametro
list
o sin parametro
`
Create Commands
To create console commands you need to create a class that extends from Symfony\Component\Console\Command\Command
``
For more information you can see the official documentation of Symfony in this regard.
Config
The configuration consists of three different elements: dependencies
, console.commands
y console.helper-sets
``
All versions of cli with dependencies
psr/container Version ^2.0
symfony/console Version ^5.0 || ^6.0