# \CGExtensions\jsloaderlibdefn

A class to define a javascript library.

## Summary

Methods
Properties
Constants
__construct()
valid()
$name
$callback
$depends
$jsfile
$cssfile
$jsurl
$cssurl
$module
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

File
  lib/jsloader/class.libdefn.php
Class hierarchy
  \CGExtensions\jsloader\libdefn

## Tags

todo |

## Properties

### $name

    $name : string

The library name

#### Type

string

#

## Tags

None found

### $callback

    $callback : callable

An optional callback of the form function($name) to return javascript code. Only one of the jsfile, jsurl, callback, or module properties must be specified.

#### Type

callable

#

## Tags

None found

### $depends

    $depends : string[]

An array of library names that this library depends upon.

#### Type

string[]

#

## Tags

None found

### $jsfile

    $jsfile : string

The complete pathname to the javascript file for this library. Only one of the jsfile, jsurl, callback, or module properties must be specified.

#### Type

string

#

## Tags

None found

### $cssfile

    $cssfile : string

The complete pathname to a css file to associate with this libarary

#### Type

string

#

## Tags

None found

### $jsurl

    $jsurl : string

A URL to a remote javascript library. Only one of the jsfile, jsurl, callback, or module properties can be specified.

#### Type

string

#

## Tags

None found

### $cssurl

    $cssurl : string

A complete URL to a remote CSS library.

#### Type

string

#

## Tags

None found

### $module

    $module : string

The name of a module to query to get javascript code.

#### Type

string

#

## Tags

None found

## Methods

### __construct()

    __construct(string $name)

Constructor

#### Parameters

string | $name | The name of the javascript library we are defiing (should not contain spaces or other characters that require encoding)

#

## Tags

todo |

### valid()

    valid() : bool

Test if this object is valid.

#### Returns

bool

#

## Tags

todo |

### class.libdefn.php