\Hazaar\Html
Script
The HTML script class.

Displays an HTML <script> element.

Tags

Since

1.1

Summary
Methods Properties Constants
src
get
key
set
No constants
Properties
Inherited
$type
$type
Methods
__construct()
__construct($content = null, $type = 'text/javascript', $params = Array ( ) )

The HTML script constructor.

Tags

Since

1.1

Parameters

$contentmixed

The content can be loaded from various sources and can be specified as one of the following:

* A string of JavaScript that will comprise the content of the script block. * A filename to a local file from which the script will be loaded. * A URL to a file that will cause the HREF parameter to be set.
$typestring

The type of script. Usually text/javascript.

$params

No description

src()
src($file)

Parameters

$file

No description

Inherited
children()
children()
Inherited
count()
count()
Inherited
current()
current()
Inherited
get()
get() : array

Get the contents of the block.

Tags

Since

2.0.0

Returns

array
Inherited
key()
key()
Inherited
next()
next()
Inherited
offsetExists()
offsetExists($key)

Parameters

$key

No description

Inherited
offsetGet()
offsetGet($key)

Parameters

$key

No description

Inherited
offsetSet()
offsetSet($key, $value)

Parameters

$key

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($key)

Parameters

$key

No description

Inherited
prepend()
prepend($element) : \\Hazaar\\Html\\Block

Prepend an element to the beginning of the contents.

Tags

Since

1.0.0

Parameters

$element

No description

Returns

\\Hazaar\\Html\\Block
Inherited
renderElement()
renderElement($element) : string

Recursively render a child element.

Tags

Since

1.0.0

Parameters

$elementmixed

The element to render. Can be anything that can be converted to a string, or an array of other elements.

Returns

string
Inherited
renderObject()
renderObject() : string

Render the current object as an HTML string.

Tags

Since

1.0.0

Returns

string
Inherited
rewind()
rewind()
Inherited
set()
set() : \\Hazaar\\Html\\Block

Set one or more elements as the contents of the block.

Tags

Since

1.0.0

Inherited
valid()
valid()