Namespace: BX

BX

Core namespace of the Brixy framework.

Version:
  • 1.0.0
Author:
  • Stanislav Antos
Source:

Namespaces

apps
debug
di
error
module
use

Methods

(static) evalFile (file)

Evaluates the file.

Parameters:
Name Type Description
file File
Source:

(static) subclass (Child, Parent)

Subclassing. Adds the prototype of the parent class to the child class.
BX.subclass() should be called before adding of child's prototype methods and properties.

Parameters:
Name Type Description
Child function
Parent function
Example:
// parent class
function Parent(surname) {
	this._surname = surname;
}
Parent.prototype.getSurname = function() {
	return this._surname;
};

// subclass
function Child(name, surname) {
	// you may call the Parent constructor (if needed)
	Parent.call(this, surname);
	this._name = name;
}
BX.subclass(Child, Parent); // subclassing
Child.prototype.getName = function() {
	return this._name + ' ' + this._surname;
	// or you may directly call the Parent method
	return this._name + ' ' + Parent.prototype.getSurname.call(this);
};
Source:

(static) toString () → {string}

Returns a string representation of the object in the form of "[object ClassName]".
Base Extend Script Object.prototype.toString() method doesn't distinguish the type and always returns "[object Object]".

Returns:
  • string
Source: