Procedural File: application.php.inc

Source Location: /sys/application.php.inc



Classes:

Application
The base class for all SiteFusion applications


Page Details:









DisableExtension [line 105]

void DisableExtension( string $id, [string $minVersion = NULL], [string $maxVersion = NULL])

Have an extension disabled in the client

This function adds a rule to the Extension Policy and must be called before the application starts, so either in the global scope or in the authorizeLogin or getApplication functions.




Parameters

string   $id   ID of the extension as specified in the install.rdf (usually name@vendor.tld)
string   $minVersion   Minimal version of the extension to disable
string   $maxVersion   Maximum version of the extension to disable
[ Top ]



LoadClass [line 55]

void LoadClass( string $class, [string $type = 'class'])

This global function loads class libraries, PHP as well as JavaScript.

Calls to this function need to be in the global scope as well, allowing all classes to be loaded before the application gets initialized. Class names need to be entered without extensions, so when loading class 'controls' consisting of 'controls.php.inc' and 'controls.js', just enter 'controls'. The type parameter defines the directory to look in relative to the SiteFusion installation directory. This defaults to 'class'.

All built-in classes are loaded by default. To disable this, define a constant named SF_AUTOLOAD_CLASSES to FALSE: define( 'SF_AUTOLOAD_CLASSES', FALSE );

To load a custom class from an application directory, for example 'mycontrols' in application 'myapp', use: LoadClass('mycontrols','app/myapp')




Parameters

string   $class   The name of the class without extension
string   $type   Directory name to load from
[ Top ]



RequireExtension [line 83]

void RequireExtension( string $id, [string $minVersion = NULL], [string $maxVersion = NULL], [string $fileName = NULL])

Require an extension to be activated in the client

This function adds a rule to the Extension Policy and must be called before the application starts, so either in the global scope or in the authorizeLogin or getApplication functions.




Parameters

string   $id   ID of the extension as specified in the install.rdf (usually name@vendor.tld)
string   $minVersion   Minimal version of the extension to accept
string   $maxVersion   Maximum version of the extension to accept
string   $fileName   Optional filename in the extensions directory in the SiteFusion server directory. The default is (id).xpi
[ Top ]



Documentation generated on Mon, 07 Apr 2014 00:50:45 +0200 by phpDocumentor 1.4.3