Home Manual Reference Source Test Repository
import {FastTransformer} from '@cedx/gulp-php-minify/src/fast_transformer.js'
public class | source

FastTransformer

Removes comments and whitespace from a PHP script, by calling a Web service.

Test:

Static Member Summary

Static Public Members
public static get

The default address that the server is listening on.

Constructor Summary

Public Constructor
public

constructor(minifier: Minifier)

Initializes a new instance of the class.

Member Summary

Public Members
public get

Value indicating whether the PHP process is currently listening.

Method Summary

Public Methods
public

async close(): Promise

Terminates the underlying PHP process: stops the server from accepting new connections.

public

async listen(): Promise<number>

Starts the underlying PHP process: begins accepting connections.

public

async transform(script: string): Promise<string>

Processes a PHP script.

Static Public Members

public static get DEFAULT_ADDRESS: string source

The default address that the server is listening on.

Public Constructors

public constructor(minifier: Minifier) source

Initializes a new instance of the class.

Params:

NameTypeAttributeDescription
minifier Minifier

The instance providing access to the minifier settings.

Public Members

public get listening: boolean source

Value indicating whether the PHP process is currently listening.

Test:

Public Methods

public async close(): Promise source

Terminates the underlying PHP process: stops the server from accepting new connections. It does nothing if the server is already closed.

Return:

Promise

Completes when the PHP process is finally terminated.

public async listen(): Promise<number> source

Starts the underlying PHP process: begins accepting connections. It does nothing if the server is already started.

Return:

Promise<number>

The port used by the PHP process.

public async transform(script: string): Promise<string> source

Processes a PHP script.

Params:

NameTypeAttributeDescription
script string

The path to the PHP script.

Return:

Promise<string>

The transformed script.

Test: