Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Asset
+ Граф наследования:Asset:

Открытые члены

 __construct ($path=null)
 
 getType ()
 
 getPath ()
 
 setPath ($path)
 
 getUri ()
 
 setUri ($uri)
 
 setContent ($content)
 
 getName ()
 
 getContent ()
 

Открытые статические члены

static create ($path)
 
static getTypeList ()
 
static detectType ($path)
 
static isExists ($path)
 

Открытые атрибуты

const JS = 'js'
 
const CSS = 'css'
 
const LAYOUT = 'layout'
 
const LANG = 'lang'
 

Защищенные статические члены

static getAbsolutePath ($path)
 

Защищенные данные

 $type
 
 $path
 
 $uri
 
 $content
 

Подробное описание

См. определение в файле asset.php строка 15

Конструктор(ы)

◆ __construct()

__construct ( $path = null)

Asset constructor.

Аргументы
string | null$pathPath to resource.

См. определение в файле asset.php строка 96

Методы

◆ create()

static create ( $path)
static

Create asset instance.

Аргументы
string$pathRelative path to asset.
Возвращает
CssAsset|JsAsset|LangAsset|LayoutAsset
Исключения
ArgumentException

См. определение в файле asset.php строка 38

◆ detectType()

static detectType ( $path)
static

Detect type by path.

Аргументы
string$pathRelative path to asset.
Возвращает
null|string

См. определение в файле asset.php строка 72

◆ getAbsolutePath()

static getAbsolutePath ( $path)
staticprotected

Get absolute path.

Аргументы
string$pathRelative path.
Возвращает
string

См. определение в файле asset.php строка 279

◆ getContent()

getContent ( )

Get content.

Возвращает
string|null

Переопределяется в LangAsset.

См. определение в файле asset.php строка 207

◆ getName()

getName ( )

Get name.

Возвращает
string|null

См. определение в файле asset.php строка 197

◆ getPath()

getPath ( )

Get path.

Возвращает
string

См. определение в файле asset.php строка 119

◆ getType()

getType ( )

Get type.

Возвращает
string

См. определение в файле asset.php строка 109

◆ getTypeList()

static getTypeList ( )
static

Get type list.

Возвращает
array

См. определение в файле asset.php строка 61

◆ getUri()

getUri ( )

Get uri.

Возвращает
string|null

См. определение в файле asset.php строка 152

◆ isExists()

static isExists ( $path)
static

Return true if asset exists.

Аргументы
string$pathRelative path.
Возвращает
string

Переопределяется в LangAsset.

См. определение в файле asset.php строка 268

◆ setContent()

setContent ( $content)

Set content.

Аргументы
string | array$contentContent.
Возвращает
$this

См. определение в файле asset.php строка 186

◆ setPath()

setPath ( $path)

Set path to resource.

Аргументы
string$pathPath to file.
Возвращает
$this

См. определение в файле asset.php строка 130

◆ setUri()

setUri ( $uri)

Set uri.

Аргументы
string | null$uriUri.
Возвращает
$this

См. определение в файле asset.php строка 174

Данные класса

◆ $content

$content
protected

См. определение в файле asset.php строка 29

◆ $path

$path
protected

См. определение в файле asset.php строка 25

◆ $type

$type
protected

См. определение в файле asset.php строка 23

◆ $uri

$uri
protected

См. определение в файле asset.php строка 27

◆ CSS

const CSS = 'css'

См. определение в файле asset.php строка 18

◆ JS

const JS = 'js'

См. определение в файле asset.php строка 17

◆ LANG

const LANG = 'lang'

См. определение в файле asset.php строка 20

◆ LAYOUT

const LAYOUT = 'layout'

См. определение в файле asset.php строка 19