Skip to content
Aaron Junker edited this page Mar 20, 2021 · 2 revisions

Class U

This class is the main class of USOC.

Manual

Usage

You need to include configuration.php first, then includes/class.inc.php and last initialize the class with newClass().

After that you can access all the functions and variables defined in U via $U.

Technical implementation

This class imports a function if the function is called. This is for saving resources. It's importing from includes/functionname.inc.php. It's usually not allowed to import functions via including the file. That's only allowed if the function needs to parse difficult strings (like blobs), because the call function of U can't handle them.

Write new function for U

For example creating a function called examplePrint()

  1. Create a file called examplePrint.inc.php in /includes
  2. Define function examplePrint()
  3. Create PHPDoc blocks for the file and for the function. Just look at the other files for examples

Reference

Look at the reference index

Clone this wiki locally