API Documentation for: 1.1.1
Show:

CanteenBase Class

Namespace: Canteen\Utilities

Common functionality for Services, Controllers, Forms. Located in the namespace Canteen\Utilities.

Item Index

Methods

parse

(
  • content
  • substitutions
)
String protected

Convenience method for parsing content

Parameters:

  • content String

    The string to parse

  • substitutions Dictionary

    The dictionary of tags to replace

Returns:

String:

The parsed string

parse

(
  • content
)
String protected

Convenience method for parsing content

Parameters:

  • content String

    The string to parse

Returns:

String:

The parsed string

service

(
  • alias
)
Service protected

Get a service by alias

Parameters:

Returns:

Service:

The service matching the alias

template

(
  • name
  • [substitutions=[]
)
String protected

Convenience method for parsing content

Parameters:

  • name String

    The name of the template to parse

  • [substitutions=[] Dictionary optional

    The dictionary of tags to replace

Returns:

String:

The parsed string

Properties

cache

ServerCache

Get the instance of the site cache

parser

Parser

The parser is responsible for rendering templates

profiler

Profiler

The instance of the profiler for debugging performance

settings

SettingsManager

Get the instance of the settings manager

site

Site

Convenience getter for the site

user

Authorization

Get the Authorization class to handle things like login, password change