Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 108 | All time: 9,671 This week: 560 |
Version | License | PHP version | Categories | |||
php_component_cli_en 1.0.0 | GNU Lesser Genera... | 5 | PHP 5, Unix, Console, Code Generation |
This project aims to deliver an free as in freedom, easy to use and lean as in fat free environment to create executable command line php files.
This project does not want to be competitive to a big console environment like the once mentioned below in the link section.
The current change log can be found here.
Take a look on openhub.net.
./bin/net_bazzline_create_executable_command_line_file bin/hello
#open bin/hello
#replace line "$usage = basename(__FILE__) . ' [-v|--verbose]';" with the line below
$usage = basename(__FILE__) . ' <your name> [-v|--verbose]';
#replace the line "//put in your business logic" with the code below
//begin of dependencies
$arguments = $environment->getArguments();
$values = $arguments->getValues();
//end of dependencies
//begin of argument validation
$valuesNotAreValid = (count($values) == 0);
if ($valuesNotAreValid) {
throw new InvalidArgumentException(
'invalid number of arguments provided'
);
}
//end of argument validation
//begin of business logic
$name = ucfirst($values[0]);
$environment->outputIfVerbosityIsEnabled('provided values are: ' . implode(' ', $values));
$environment->output('Hello ' . $name);
//end of business logic
#execute ./bin/hello world
mkdir -p vendor/net_bazzline/php_component_cli_environment
cd vendor/net_bazzline/php_component_cli_environment
git clone https://github.com/bazzline/php_component_cli_environment .
composer require net_bazzline/php_component_cli_environment:dev-master
API is available at bazzline.net.
Files (7) |
File | Role | Description | ||
---|---|---|---|---|
bin (1 file) | ||||
example (1 file) | ||||
source (1 file) | ||||
CHANGELOG.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (7) | / | bin |
File | Role | Description |
---|---|---|
net_bazzline_creat...e_command_line_file | Aux. | Script that generates the new script code |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
php_component_cli_en-2022-06-24.zip 8KB | |
php_component_cli_en-2022-06-24.tar.gz 6KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.