Tools_Context ############# .. php:namespace:: Nos .. php:class:: Tools_Context Provides static methods to work with yours contexts, sites and languages. .. seealso:: :doc:`/php/configuration/software/multi_context` ::contexts() ------------ .. php:staticmethod:: contexts() :returns: An array of all your valid contexts. .. code-block:: php $context_urls) { // .... } ::sites() ----------- .. php:staticmethod:: sites() :returns: An array of all your valid sites. Each site has a ``title`` and an ``alias``. .. code-block:: php $site_params) { $title = $site_params['title']; $alias = $site_params['alias']; } ::locales() ----------- .. php:staticmethod:: locales() :returns: An array of all your valid locales. Each locale has a ``title`` and a flag's code ``flag``. .. code-block:: php $locale_params) { $title = $locale_params['title']; $flag = $locale_params['flag']; } ::defaultContext() ------------------ .. php:staticmethod:: defaultContext() :returns: The code of default context of your Novius OS instance. .. code-block:: php