webCOMAND

cScript Custom Classes

Object-oriented classes can be defined in cScript, which can subsequently be used to create objects that use that class.

Example

class Contact {
    public $FirstName;
    public $LastName;

    public function full_name() {
        echo("$FirstName $LastName");
    }
}

$contact = new Contact();
$contact->first_name = 'John';
$contact->last_name = 'Lockwood';
$contact->full_name();