Copied!

Abstract base class for most PHPFUI classes

Overrides string output for easy output and concatination

Abstract
Constants
public PHPFUI\Base::DEBUG_SOURCE = 1
Methods
public __clone()
public __construct()
public __toString() : string
public add(?mixed $item) : static
 

Base add function. Adds to the end of the current objects

  • param mixed $item should be convertable to string
public addAsFirst(?mixed $item) : static
 

Base addAsFirst function. Adds to the front of the current object

  • param mixed $item should be convertable to string
public count() : int
 

Number of object in this object. Does not count sub objects.

public done(bool $done = true) : static
 

Form is done rendering

public static getDebug(int $flags = 0) : int
 

Gets the current debug setting

public getResponse() : string
 

Get the current response

public isDone() : bool
 

Returns true if the page needs no more processing

public prepend(?mixed $item) : static
 

Add an object in front of existing object

public static setDebug(int $level = 0) : void
 

Set the debug level, 1 or higher is on

public setRawResponse(string $response, bool $asJSON = true) : static
 

Sets the page response directly and exits the program

  • return never|static
public setResponse(string $response, string $color = 'lime') : static
 

Set a response in the standard format ('reponse' and 'color' array) exit will be called after returning the encoded response

  • param string $response to return
  • param string $color used for the save button
  • return never|static
public walk(string $method, ?mixed $argument = NULL) : static
 

Recursively walks all objects and calls the passed method on each object where it exists

  • param string $method to call on the object in the collection
  • param mixed $argument to pass to the method
Methods
protected abstract getBody() : string
 

You must provide a getBody function. It will be called after start and before end.

protected abstract getEnd() : string
 

You must provide a getEnd function. It will be called last on output.

protected getItems() : array
 
  • return array
protected abstract getStart() : string
 

You must provide a getStart function. It will be called first on output.

Properties
private static int $debug = 0
private static bool $done = false
private array $items = []
 
  • var array
private static string $response = ''
Methods
private output() : string
 

Output the object (convert to string)

Properties
private static int $debug = 0
private static bool $done = false
private static string $response = ''
Methods
public static getDebug(int $flags = 0) : int
 

Gets the current debug setting

public static setDebug(int $level = 0) : void
 

Set the debug level, 1 or higher is on

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration