- Symphony 2.6.7
-
› assets
14 -
› boot
14 -
› core
23 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
59 -
› interface
9 -
› toolkit
59 - Delegates92
- Deprecated27
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
Functions
string __(
$string, $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(
$name, $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(
$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(
$action, $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(
$url)
Redirects the browser to a specified location. Safer than using a direct header() call
void symphony(
$mode)
Responsible for picking the launcher function and starting it.
integer symphony_launcher(
$mode)
Responsible for launching a standard symphony instance and sending output to the browser.