PHP 클래스 Inpsyde\MultilingualPress\Asset\DebugAwareScript

부터: 3.0.0
상속: implements Inpsyde\MultilingualPress\Asset\Script
파일 보기 프로젝트 열기: inpsyde/multilingual-press 1 사용 예제들

공개 메소드들

메소드 설명
__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, AssetLocation $location, array $dependencies = [], string | null $version = '' ) : static 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.

메소드 상세

__construct() 공개 메소드

Constructor. Sets up the properties.
부터: 3.0.0
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.

__toString() 공개 메소드

Returns the handle.
부터: 3.0.0
public __toString ( ) : string
리턴 string The handle.

add_data() 공개 메소드

Makes the given data available for the script.
부터: 3.0.0
public add_data ( string $object_name, array $data ) : static
$object_name string The name of the JavaScript variable holding the data.
$data array The data to be made available for the script.
리턴 static Script instance.

clear_data() 공개 메소드

Clears the data so it won't be output another time.
부터: 3.0.0
public clear_data ( ) : static
리턴 static Script instance.

data() 공개 메소드

Returns all data to be made available for the script.
부터: 3.0.0
public data ( ) : array[]
리턴 array[] Data to be made available for the script.

dependencies() 공개 메소드

Returns the dependencies.
부터: 3.0.0
public dependencies ( ) : string[]
리턴 string[] The dependencies.

from_location() 공개 정적인 메소드

Returns a new script object, instantiated according to the given arguments.
부터: 3.0.0
public static from_location ( string $handle, AssetLocation $location, array $dependencies = [], string | null $version = '' ) : static
$handle string The handle.
$location AssetLocation 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.

handle() 공개 메소드

Returns the handle.
부터: 3.0.0
public handle ( ) : string
리턴 string The handle.

url() 공개 메소드

Returns the file URL.
부터: 3.0.0
public url ( ) : string
리턴 string The file URL.

version() 공개 메소드

Returns the file version.
부터: 3.0.0
public version ( ) : string | null
리턴 string | null The file version.