PHP Класс PMA\libraries\Scripts

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

Generates new Scripts objects
public __construct ( )

addCode() публичный Метод

Adds a new code snippet to the code to be executed
public addCode ( string $code ) : void
$code string The JS code to be added
Результат void

addFile() публичный Метод

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
Результат void

addFiles() публичный Метод

Add new files to the list of scripts
public addFiles ( array $filelist ) : void
$filelist array The array of file names
Результат void

getDisplay() публичный Метод

Renders all the JavaScript file inclusions, code and events
public getDisplay ( ) : string
Результат string

getFiles() публичный Метод

Returns a list with filenames and a flag to indicate whether to register onload events for this file
public getFiles ( ) : array
Результат array