string __(string $string, array $inserts)

The translation function accepts an English string and returns its translation to the active system language. If the given string is not available in the current dictionary the original English string will be returned. Given an optional $inserts array, the function will replace translation placeholders using vsprintf(). Since Symphony 2.3, it is also possible to have multiple translation of the same string according to the page namespace (i.e. the value returned by Symphony's getPageNamespace() method). In your lang file, use the $dictionary key as namespace and its value as an array of context-aware translations, as shown below:

$dictionary = array( [...]

	            'Create new' => 'Translation for Create New',

	    '/blueprints/datasources' => array(
	        'Create new' =>
	        'If we are inside a /blueprints/datasources/* page, this translation will be returned for the string'



void cleanup_session_cookies()

Cleans up Session Cookies. When there is no data in the session the cookie will be unset. If there is data, the cookie will be renewed, expiring it in two weeks from now. This will improve the interoperability with caches like Varnish and Squid.

void define_safe(string $name, string|integer|boolean $value)

Checks that a constant has not been defined before defining it. If the constant is already defined, this function will do nothing, otherwise, it will set the constant

string getCurrentPage()

Returns the current URL string from within the Administration context. It omits the Symphony directory from the current URL.

string getcwd_safe()

Returns the current working directory, replacing any \ with /. Use for Windows compatibility.

integer ini_size_to_bytes(string $val)

Convert php.ini size format to bytes

boolean is_session_empty()

Function will loop over the $_SESSION and find out if it is empty or not

integer precision_timer(string $action, integer $start_time)

Used as a basic stopwatch for profiling. The default $action starts the timer. Setting $action to 'stop' and passing the start time returns the difference between now and that time.

void redirect(string $url)

Redirects the browser to a specified location. Safer than using a direct header() call

mixed server_safe(string $name)

Retrieve a value from the $_SERVER array. Makes sure the key exists. Returns null otherwise.

This function is an extension point. We could check other storage for specific values or enforce some security restrictions.

void symphony(string $mode)

Responsible for picking the launcher function and starting it.

integer symphony_launcher(string $mode)

Responsible for launching a standard symphony instance and sending output to the browser.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details