strargs: Parse commands to get parameters of multiple types

Recommend this page to a friend!
  Info   View files Example   View files View files (20)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-07-31 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 45 This week: 1All time: 10,130 This week: 174Up
Version License PHP version Categories
strargs 1.0.0MIT/X Consortium ...5PHP 5, Text processing, Console
Description Author

This package can parse commands to get parameters of multiple types.

It can take a command string and parses it to extract parameter values that can be strings, as well objects or arrays encoded using JSON.

The package can also compose a command string from the names and the values of the parameters.

Innovation Award
PHP Programming Innovation award nominee
July 2021
Number 11
Command-line scripts that can run from an operating system console of a computer can take a list of parameters as a string passed in the front of the command name.

Usually, this string is processed to extract the parameter names and the values.

This package can extract the values of parameters passed as a string. It can also extract the values of parameters of more complex types like arrays or objects. It can decode parameter values that may be passed using the JSON format.

Manuel Lemos
Picture of Isa Eken
  Performance   Level  
Name: Isa Eken <contact>
Classes: 11 packages by
Country: Turkey Turkey
Innovation award
Innovation award
Nominee: 7x

  Files folder image Files  
File Role Description
Files folder imagesrc (2 files, 4 directories)
Files folder imagetests (2 files)
Plain text file composer.json Data Auxiliary data
Plain text file LICENSE.md Lic. License text
Plain text file phpunit.xml Data Auxiliary data
Plain text file README.md Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageContracts (5 files)
Files folder imageEnums (1 file)
Files folder imageExceptions (1 file)
Files folder imageTraits (5 files)
  Plain text file Helpers.php Class Class source
  Plain text file Strargs.php Class Class source

  Files folder image Files  /  src  /  Contracts  
File Role Description
  Plain text file HasArguments.php Class Class source
  Plain text file HasCommand.php Class Class source
  Plain text file HasFlags.php Class Class source
  Plain text file HasOptions.php Class Class source
  Plain text file HasVerbose.php Class Class source

  Files folder image Files  /  src  /  Enums  
File Role Description
  Plain text file VerboseLevel.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file NoCommandException.php Class Class source

  Files folder image Files  /  src  /  Traits  
File Role Description
  Plain text file HasArguments.php Class Class source
  Plain text file HasCommand.php Class Class source
  Plain text file HasFlags.php Class Class source
  Plain text file HasOptions.php Class Class source
  Plain text file HasVerbose.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file HelperTest.php Class Class source
  Plain text file StringTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:45
This week:1
All time:10,130
This week:174Up
For more information send a message to info at phpclasses dot org.