Метод | Описание | |
---|---|---|
__construct ( string $handle, string $url, array $dependencies = [], string | null $version = '' ) | Constructor. Sets up the properties. | |
__toString ( ) : string | Returns the handle. | |
add_data ( string $object_name, array $data ) : static | Makes the given data available for the script. | |
clear_data ( ) : static | Clears the data so it won't be output another time. | |
data ( ) : array[] | Returns all data to be made available for the script. | |
dependencies ( ) : string[] | Returns the dependencies. | |
from_location ( string $handle, |
Returns a new script object, instantiated according to the given arguments. | |
handle ( ) : string | Returns the handle. | |
url ( ) : string | Returns the file URL. | |
version ( ) : string | null | Returns the file version. |
public __construct ( string $handle, string $url, array $dependencies = [], string | null $version = '' ) | ||
$handle | string | The handle. |
$url | string | The public URL for the directory containing the file. |
$dependencies | array | Optional. The dependencies. Defaults to empty array. |
$version | string | null | Optional. Version of the file. Defaults to empty string. |
public __toString ( ) : string | ||
Результат | string | The handle. |
public clear_data ( ) : static | ||
Результат | static | Script instance. |
public data ( ) : array[] | ||
Результат | array[] | Data to be made available for the script. |
public dependencies ( ) : string[] | ||
Результат | string[] | The dependencies. |
public static from_location ( string $handle, |
||
$handle | string | The handle. |
$location | Location object. | |
$dependencies | array | Optional. The dependencies. Defaults to empty array. |
$version | string | null | Optional. Version of the file. Defaults to empty string. |
Результат | static | Script object. |