TYPO3  7.6
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Command Class Reference

Public Member Functions

 __construct (Command $parent=null)
 
 __toString ()
 
 add ($bit)
 
 top ($bit)
 
 arg ($arg)
 
 cmd ($esc)
 
 ins ($label)
 
 get ($label)
 
 end ()
 
 length ()
 
 setErrorHandler (\Closure $errorHandler)
 
 getErrorHandler ()
 
 execute ()
 
 join ()
 
 addAtIndex ($bit, $index)
 

Static Public Member Functions

static create (Command $parent=null)
 
static escape ($input)
 
static quote ($input)
 

Private Attributes

 $parent
 
 $bits = array()
 
 $labels = array()
 
 $errorHandler
 

Detailed Description

Author
Jean-François Simon conta.nosp@m.ct@j.nosp@m.fsimo.nosp@m.n.fr

Definition at line 17 of file vendor/symfony/finder/Shell/Command.php.

Constructor & Destructor Documentation

__construct ( Command  $parent = null)

Constructor.

Parameters
Command | null$parentParent command

Definition at line 44 of file vendor/symfony/finder/Shell/Command.php.

References Command\$parent.

Member Function Documentation

__toString ( )

Returns command as string.

Returns
string

Definition at line 54 of file vendor/symfony/finder/Shell/Command.php.

References Command\join().

add (   $bit)
addAtIndex (   $bit,
  $index 
)

Insert a string or a Command instance before the bit at given position $index (index starts from 0).

Parameters
string | Command$bit
int$index
Returns
Command The current Command instance

Definition at line 288 of file vendor/symfony/finder/Shell/Command.php.

arg (   $arg)

Appends an argument, will be quoted.

Parameters
string$arg
Returns
Command The current Command instance

Definition at line 134 of file vendor/symfony/finder/Shell/Command.php.

cmd (   $esc)

Appends escaped special command chars.

Parameters
string$esc
Returns
Command The current Command instance

Definition at line 148 of file vendor/symfony/finder/Shell/Command.php.

Referenced by AbstractFindAdapter\buildNamesFiltering(), and AbstractFindAdapter\buildPathsFiltering().

static create ( Command  $parent = null)
static
end ( )

Returns parent command (if any).

Returns
Command Parent command
Exceptions
\RuntimeExceptionIf command has no parent

Definition at line 201 of file vendor/symfony/finder/Shell/Command.php.

References Command\$parent.

static escape (   $input)
static

Escapes special chars from input.

Parameters
string$inputA string to escape
Returns
string The escaped string

Definition at line 78 of file vendor/symfony/finder/Shell/Command.php.

execute ( )

Executes current command.

Returns
array The command result
Exceptions
\RuntimeException

Definition at line 247 of file vendor/symfony/finder/Shell/Command.php.

References Command\$errorHandler, and Command\join().

get (   $label)

Retrieves a previously labeled command.

Parameters
string$label
Returns
Command The labeled command
Exceptions
\RuntimeException

Definition at line 185 of file vendor/symfony/finder/Shell/Command.php.

Referenced by GnuFindAdapter\buildFormatSorting().

getErrorHandler ( )
Returns
|null

Definition at line 235 of file vendor/symfony/finder/Shell/Command.php.

References Command\$errorHandler.

ins (   $label)

Inserts a labeled command to feed later.

Parameters
string$labelThe unique label
Returns
Command The current Command instance
Exceptions
\RuntimeExceptionIf label already exists

Definition at line 164 of file vendor/symfony/finder/Shell/Command.php.

Referenced by AbstractFindAdapter\buildFindCommand(), GnuFindAdapter\buildFormatSorting(), and BsdFindAdapter\buildFormatSorting().

join ( )
length ( )

Counts bits stored in command.

Returns
int The bits count

Definition at line 215 of file vendor/symfony/finder/Shell/Command.php.

static quote (   $input)
static

Quotes input.

Parameters
string$inputAn argument string
Returns
string The quoted string

Definition at line 90 of file vendor/symfony/finder/Shell/Command.php.

setErrorHandler ( \Closure  $errorHandler)
Parameters
\Closure$errorHandler
Returns
Command

Definition at line 225 of file vendor/symfony/finder/Shell/Command.php.

References Command\$errorHandler.

top (   $bit)

Prepends a string or a command instance.

Parameters
string | Command$bit
Returns
Command The current Command instance

Definition at line 116 of file vendor/symfony/finder/Shell/Command.php.

Member Data Documentation

$bits = array()
private

Definition at line 27 of file vendor/symfony/finder/Shell/Command.php.

Referenced by Command\join().

$errorHandler
private
$labels = array()
private

Definition at line 32 of file vendor/symfony/finder/Shell/Command.php.

$parent
private