The PhrameContainer class mimicks some of the functionality of a Java web container, which in pre 3.1 versions used to be part of the ActionServer class.
PhrameContainer instance and call its run() method to select an activate the appropriate action server. It makes sense to create a dedicated PHP ' action server' script for this purpose.
If your application uses only one front-end controller, you will obviously have one action server script. In this case your container configuration will only contain one action server configuration for the so-called default action server. See How To Configure The Phrame Container for details.
If your application uses more front-end controllers, you will have multiple action server scripts, one for each action server. As a consequence, users will have multiple entry points to the application, much similar to the Java servlet principle. In this case your container configuration will also contain multiple action server configurations, one of which might represent the default action server.
PhrameContainer instance;
run() method of the PhrameContainer activating the appropriate action server.
//Include Phrame's core library
include('/WEB-INF/lib/phrame/include.php');
// Include array holding the container configuration
include('/WEB-INF/conf/container-config.php');
// Construct a PhrameContainer instance (assuming the
// container configuration is in an array variable
// called $config). Note that the & is not needed
// (strictly speaking not even allowed) in PHP5.
$container =& new PhrameContainer($config);
// Run the default action server
$container->run();
In case your application consists of more action servers, you have to pass the name of the appropriate server to the run() method, like so:
// Run the action server called '2ndFrontEnd'
$container->run('2ndFrontEnd');