Shellbox
Library and server for containerized shell execution
Loading...
Searching...
No Matches
Shellbox\ShellParser\SyntaxInfo Class Reference

Public Member Functions

 __construct ( $root)
 
 getFeatureList ()
 Get the features used in this shell program.
 
 getLiteralArgv ()
 If the program is a single command and all of its arguments can be represented as string literals, return the unquoted literals.
 

Static Public Member Functions

static compileFeaturesByNodeType ()
 A function for use from a PHP CLI which inverts the $nodeTypesByFeature array to produce $featuresByNodeType.
 

Public Attributes

const LIST = 'list'
 
const BACKGROUND = 'background'
 
const PIPELINE = 'pipeline'
 
const COMPOUND = 'compound'
 
const REDIRECT = 'redirect'
 
const COMMAND_EXPANSION = 'command_expansion'
 
const PARAMETER = 'parameter'
 
const EXOTIC_EXPANSION = 'exotic_expansion'
 
const ASSIGNMENT = 'assignment'
 

Member Function Documentation

◆ compileFeaturesByNodeType()

array Features by node type compiled with Shellbox\ShellParser\SyntaxInfo::compileFeaturesByNodeType ( )
static

A function for use from a PHP CLI which inverts the $nodeTypesByFeature array to produce $featuresByNodeType.

Returns
string

◆ getFeatureList()

Shellbox\ShellParser\SyntaxInfo::getFeatureList ( )

Get the features used in this shell program.

Returns
array

◆ getLiteralArgv()

Shellbox\ShellParser\SyntaxInfo::getLiteralArgv ( )

If the program is a single command and all of its arguments can be represented as string literals, return the unquoted literals.

Otherwise, return null.

Returns
string[]|null

The documentation for this class was generated from the following file: