Table of Contents
This section contains information about the Recite CMS application environment. Certain items and objects (such as current client and user information) are available from all custom code that you implement with the Recite CMS framework.
You will frequently need access to the current client, since all data for a site is
tied to that particular client. You can retrieve the active client object (an instance
of the Application_Client
class) using the following code.
Example 3.1. Retrieving the active client object
<?php $client = Application::GetClient(); // output the client ID echo $client->getId(); ?>
You can use this method in both the control panel and on client sites (such as in custom request handlers).
Alternatively, if you only need the ID of the current client you can use the
getClientId()
function.