<?php
/**
* Environment setting up ({@link ami_env.php}) usage example.
*
* Simple environment external call.
*
* This script could be located anywhere with access to the Amiro document root
*
* @copyright Amiro.CMS.
* @category Example
* @package Environment
* @since 5.12.4
*/
// Define new dummy class
class MySampleClass {}
$AMI_ENV_SETTINGS = array(
'external_call' => true
);
require '../ami_env.php';
$db = new MySampleClass();
// Save current globals
// Restore Amiro.CMS globals
// $db is overwritten with Amiro.CMS internal system object
// We can use any Amiro.CMS API calls here
// Restore initial globals
// $db is restored