Standards  1.0
Standards Class Reference

Static Public Member Functions

static registerStandard (Standard $standard)
 
static standard ($type)
 
static error ($errorMsg)
 
static findEntities ($location, $data=false)
 
static toPath ($trail)
 
static toTrail ($path)
 
static fromPath ($path)
 
static MarkdownToolkit ()
 
static UserSystem ()
 
static ForumSystem ()
 
static NotificationSystem ()
 
static CommentSystem ()
 

Static Public Attributes

static $events
 
static $version = '1.0'
 
static $major = '1'
 
static $minor = '0'
 

Detailed Description

This is the standard interface class, used for getting Standard(s)

Member Function Documentation

static error (   $errorMsg)
static

This will return a string containing the $errorMsg and any html structure around it.

Use this to standardize the error message look.

static findEntities (   $location,
  $data = false 
)
static

This will try to find the entity associated with the location provided.

– How locations work – Locations are strings that contain a path to a certain piece of information in the database. Example: "Forum.Post.#65" Breakdown: The "Forum" part is looking in the installed Forum systems data tables. The "Post" part is telling Standard to search inside of the posts table. The "#65" part is looking for the post that has an id of 65.

You can also use "Forum.Post.<time|-90" This will get 90 forum posts going from newest to oldest.

If you are using user input to search use:

$ents = Standards::findEntities("ForumSystem.Post", [ "<" => "time", "|%" => ["title", $userInput] ]); //This is faster and safer.
//Same results as.
$ents = Standards::findEntities("ForumSystem.Post.<time|%title/".$userInput);
Parameters
string$locationThe location where a entity is stored.
Returns
An array of found entities or false if the query is invalid.
static fromPath (   $path)
static

This will get an entity from the path.

Parameters
string$pathThe short location of an entity.
Returns
An entity loaded with the data found or false if not found.
static registerStandard ( Standard  $standard)
static

This will register a standard instance with the global Standards.

See the tutorial for making a Standard

static standard (   $type)
static

This will get a standard if it is installed.

Parameters
string$typeThe standard type. See StandardsList for a list.
Returns
The found Standard instance or false if not found.
static toPath (   $trail)
static

This will create a path from the trail.

Parameters
string$trailThe location of an entity.
Returns
A short string that contains the path to the trail or false if trail is invalid.
static toTrail (   $path)
static

This will create a trail from the path.

Parameters
string$pathThe short location of an entity.
Returns
A long readable string that contains the trail or false if the path is invalid.

Field Documentation

$events
static

The global event interface. See Standard_Event_Interface for info.

$version = '1.0'
static

The currently installed Standards version.


The documentation for this class was generated from the following file: