PHP Class PMA\libraries\Scripts

Show file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Methods

Method Description
__construct ( ) Generates new Scripts objects
addCode ( string $code ) : void Adds a new code snippet to the code to be executed
addFile ( string $filename, boolean $before_statics = false ) : void Adds a new file to the list of scripts
addFiles ( array $filelist ) : void Add new files to the list of scripts
getDisplay ( ) : string Renders all the JavaScript file inclusions, code and events
getFiles ( ) : array Returns a list with filenames and a flag to indicate whether to register onload events for this file

Private Methods

Method Description
_eventBlacklist ( string $filename ) : integer Determines whether to fire up an onload event for a file
_includeFiles ( array $files ) : string Returns HTML code to include javascript file.

Method Details

__construct() public method

Generates new Scripts objects
public __construct ( )

addCode() public method

Adds a new code snippet to the code to be executed
public addCode ( string $code ) : void
$code string The JS code to be added
return void

addFile() public method

Adds a new file to the list of scripts
public addFile ( string $filename, boolean $before_statics = false ) : void
$filename string The name of the file to include
$before_statics boolean Whether this dynamic script should be included before the static ones
return void

addFiles() public method

Add new files to the list of scripts
public addFiles ( array $filelist ) : void
$filelist array The array of file names
return void

getDisplay() public method

Renders all the JavaScript file inclusions, code and events
public getDisplay ( ) : string
return string

getFiles() public method

Returns a list with filenames and a flag to indicate whether to register onload events for this file
public getFiles ( ) : array
return array