class PharExtensionInterceptor implements Assertable (View source)

An alternate PharExtensionInterceptor to support phar-based CLI tools.

Methods

bool
assert(string $path, string $command)

Determines whether phar file is allowed to execute.

Details

bool assert(string $path, string $command)

Determines whether phar file is allowed to execute.

The phar file is allowed to execute if:

  • the base file name has a ".phar" suffix.
  • it is the CLI tool that has invoked the interceptor.

Parameters

string $path

The path of the phar file to check.

string $command

The command being carried out.

Return Value

bool

TRUE if the phar file is allowed to execute.

Exceptions

Exception