Starting a Session

In order to access content in the PCR, a session needs to be started.

The following code will start a session, assuming you have followed the installation instructions and have:

  1. The PCR Server variable set
  2. PHP Include path set
  3. An autoloader in place
  4. MySQL Database and Content Table created
<?php 
$credentials = new Credentials('mysql_username', 
                               'mysql_password');
                               
$workspace = 'pcr'; 
$session = Repository::login($credentials, $workspace);
?>