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

The base class for output file glob patterns. More...

+ Inheritance diagram for Shellbox\Command\OutputGlob:

Public Member Functions

 __construct ( $prefix, $extension)
 
 getOutputFile ( $boxedName)
 Get an OutputFile corresponding to a single file that matches the glob.
 
 getPrefix ()
 
 getExtension ()
 
 getId ()
 
 getClientData ()
 Get JSON serializable data for client/server communication.
 
 getFiles ()
 
 isMatch ( $boxedName)
 Determine whether a given relative path matches the glob pattern.
 

Static Public Member Functions

static newFromClientData (array $data)
 This is used on the server side to create a placeholder object for globs based on a specification received from the client.
 

Protected Attributes

 $prefix
 
 $extension
 
 $files = []
 

Detailed Description

The base class for output file glob patterns.

Member Function Documentation

◆ getClientData()

Shellbox\Command\OutputGlob::getClientData ( )

Get JSON serializable data for client/server communication.

Reimplemented in Shellbox\Command\OutputGlobToUrl.

◆ getExtension()

Shellbox\Command\OutputGlob::getExtension ( )
Returns
string

◆ getFiles()

Shellbox\Command\OutputGlob::getFiles ( )
Returns
OutputFile[]

◆ getOutputFile()

Shellbox\Command\OutputGlob::getOutputFile ( $boxedName)
abstract

Get an OutputFile corresponding to a single file that matches the glob.

Reimplemented in Shellbox\Command\OutputGlobPlaceholder, Shellbox\Command\OutputGlobToFile, Shellbox\Command\OutputGlobToString, and Shellbox\Command\OutputGlobToUrl.

◆ getPrefix()

Shellbox\Command\OutputGlob::getPrefix ( )
Returns
string

◆ isMatch()

Shellbox\Command\OutputGlob::isMatch ( $boxedName)

Determine whether a given relative path matches the glob pattern.

Parameters
string$boxedName
Returns
bool

◆ newFromClientData()

static Shellbox\Command\OutputGlob::newFromClientData ( array $data)
static

This is used on the server side to create a placeholder object for globs based on a specification received from the client.

Because the content is never actually populated, it's not necessary to distinguish between the different glob types.


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