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 ( $item )
 

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

  • param mixed $item should be convertable to string
  • return PHPFUI\Base
public addAsFirst ( $item )
 

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

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

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

public done ( bool $done = true ) : PHPFUI\Base
 

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 ( $item ) : PHPFUI\Base
 

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 ) : PHPFUI\Base
 

Sets the page response directly

public setResponse ( string $response , string $color = 'lime' ) : PHPFUI\Base
 

Set a response in the standard format ('reponse' and 'color' array)

  • param string $response to return
  • param string $color used for the save button
public walk ( string $method , $argument = NULL )
 

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
  • return $this
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
protected abstract getStart () : string
 

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

Properties
private static int $debug = 1
private static bool $done
private array $items
private static string $response
Methods
private output () : string
 

Output the object (convert to string)

Properties
private static int $debug = 1
private static bool $done
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

© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration