Functions

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 $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

string mysql_date_diff(DateTime $date_1, DateTime $date_2)

This function, give two DateTime objects, will return the difference between the two in hours and minutes, in a format suitable for MySQL.

This function does not provide full date_diff functionality, it's a stopgap for PHP5.2 support.

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

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