The following ServerScript classes existed already in previous versions of Phi but could not be extended or changed programmatically. Now they are implemented as exchangeable modules accessible as a runtime plug-in:
- System class (global object system)
- Reply class (global object reply)
- Request class (global object request)
- Server class (global object server)
- File class (global object file)
- Sql class (global object sql)
- Email class (global object email)
- Item API class (object $('id')) - Note: since this class is an integral part of the server and can not be changed.
Loading a module
To load a specific module enter the following code in the top of your ServerScript file:
loadModule('system'); system.log('log something to the server error log');
Since item API (probably already known from the client environment) also in ServerScript.Phi offers the
Sincethis should be the only used interface to access items and is now an integral part of the server.
loadModule('wrapper'); // needed before v2.0.0 only! $('id').text('attention').color('red');