/** * Assign the context of this OsidManager. * * @param object OsidContext $context * * @throws object OsidException An exception with one of the following * messages defined in org.osid.OsidException: {@link * org.osid.OsidException#NULL_ARGUMENT NULL_ARGUMENT} * * @access public */ function assignOsidContext(OsidContext $context) { ArgumentValidator::validate($context->getContext('harmoni'), ExtendsValidatorRule::getRule('Harmoni')); $this->_osidContext = $context; $this->attachToHarmoni(); }
* * * @package harmoni.utilities.tests * * @copyright Copyright © 2005, Middlebury College * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) * * @version $Id: testList.php,v 1.4 2007/09/04 20:25:56 adamfranco Exp $ **/ if (!defined('HARMONI')) { require_once "../../harmoni.inc.php"; } if (!defined('SIMPLE_TEST')) { define('SIMPLE_TEST', HARMONI . 'simple_test/'); } require_once HARMONI . "errorHandler/ErrorHandler.class.php"; if (!Services::serviceAvailable("ErrorHandler")) { Services::registerService("ErrorHandler", "ErrorHandler"); require_once OKI2 . "osid/OsidContext.php"; $context = new OsidContext(); $context->assignContext('harmoni', $harmoni); require_once HARMONI . "oki2/shared/ConfigurationProperties.class.php"; $configuration = new ConfigurationProperties(); Services::startManagerAsService("ErrorHandler", $context, $configuration); } require_once SIMPLE_TEST . 'simple_unit.php'; require_once SIMPLE_TEST . 'dobo_simple_html_test.php'; $test = new GroupTest('Utilities tests'); $test->addTestFile(HARMONI . 'utilities/tests/OrderedListTestCase.class.php'); $test->attachObserver(new DoboTestHtmlDisplay()); $test->run();
*/ // :: set up the $harmoni object :: // These parameters may be automatically overridden by setting a starting site in starting_site.conf.php $harmoni->config->set("defaultModule", "home"); $harmoni->config->set("defaultAction", "welcome"); $harmoni->config->set("programTitle", "Segue"); $harmoni->config->set("sessionName", "SEGUE_SESSID"); $harmoni->config->set("sessionUseCookies", true); // In order to prevent User's from including their SESSION IDs in urls that they // copy/paste for others, we will force the usage of cookies. This will prevent // inadvertant session fixation problems. $harmoni->config->set("sessionUseOnlyCookies", true); $harmoni->config->set("sessionCookiePath", "/"); $harmoni->config->set("sessionCookieDomain", ""); // An array of actions for which the SESSION ID *can* be passed in the url $harmoni->config->set("sessionInUrlActions", array('repository.viewfile_flash', 'repository.viewthumbnail_flash')); // tell harmoni to post-process all actions with this specified action. // the action takes the result from previous actions and builds a display // screen from it. // until polyphony has been updated to use this functionality, we must ignore // it. $postProcessIgnoreList = array("language.*", "repository.*", "plugin_manager.viewplugin", "ui1.*", "ui2.*", "versioning.*", "help.*", "view.*", "tags.*", "participation.*", "roles.*", "agent.*", "dataport.html"); $harmoni->setPostProcessAction("window.display", $postProcessIgnoreList); $context = new OsidContext(); $context->assignContext('harmoni', $harmoni); /********************************************************* * Set the default timezone if not set. *********************************************************/ if (!ini_get('date.timezone')) { ini_set('date.timezone', 'America/New_York'); }
/** * The constructor. * @access private * @return void **/ private function __construct() { $this->ActionHandler = new ActionHandler($this); // set up config options $this->config = new HarmoniConfig(); // set up request context / handler $this->request = new RequestContext(); // set up the history manager $this->history = new BrowseHistoryManager(); $this->_attachedData = new ReferencedFieldSet(); $this->_preExecActions = array(); $this->_postExecActions = array(); // Set up a default OutputHandler $osidContext = new OsidContext(); $osidContext->assignContext('harmoni', $this); $configuration = new BasicOutputHandlerConfigProperties(); $outputHandler = new BasicOutputHandler(); $outputHandler->assignOsidContext($osidContext); $outputHandler->assignConfiguration($configuration); $this->attachOutputHandler($outputHandler); }
require_once dirname(__FILE__) . "/main/library/Wizard/ErrorCheckingRules/WECNonZeroRegex.class.php"; require_once dirname(__FILE__) . "/main/library/Wizard/ErrorCheckingRules/WECOptionalRegex.class.php"; require_once dirname(__FILE__) . "/main/library/Wizard/ErrorCheckingRules/XmlSchemaRule.class.php"; require_once dirname(__FILE__) . "/main/library/ResultPrinter/IteratorResultPrinter.class.php"; require_once dirname(__FILE__) . "/main/library/ResultPrinter/ArrayResultPrinter.class.php"; require_once dirname(__FILE__) . "/main/library/ResultPrinter/EmbeddedArrayResultPrinter.class.php"; require_once dirname(__FILE__) . "/main/library/Basket/Basket.class.php"; require_once dirname(__FILE__) . "/main/library/AuthZPrinter.abstract.php"; require_once dirname(__FILE__) . "/main/modules/help/Help.class.php"; require_once dirname(__FILE__) . "/main/modules/auth/PolyphonyLogin.class.php"; require_once dirname(__FILE__) . "/main/library/RepositoryInputOutputModules/RepositoryInputOutputModuleManager.class.php"; Services::registerService("InOutModules", "RepositoryInputOutputModuleManager"); require_once dirname(__FILE__) . "/main/library/RepositorySearchModules/RepositorySearchModuleManager.class.php"; Services::registerService("RepositorySearchModules", "RepositorySearchModuleManager"); require_once OKI2 . "osid/OsidContext.php"; $context = new OsidContext(); $context->assignContext('harmoni', $harmoni); require_once HARMONI . "oki2/shared/ConfigurationProperties.class.php"; $configuration = new ConfigurationProperties(); Services::startManagerAsService("InOutModules", $context, $configuration); Services::startManagerAsService("RepositorySearchModules", $context, $configuration); require_once dirname(__FILE__) . "/main/library/HierarchyPrinter/GroupPrinter.class.php"; require_once dirname(__FILE__) . "/main/library/HierarchyPrinter/HierarchyPrinter.class.php"; // NEW CONFIGS AFTER HERE!!!: if (file_exists(dirname(__FILE__) . "/config/domit.conf.php")) { require_once dirname(__FILE__) . "/config/domit.conf.php"; } else { require_once dirname(__FILE__) . "/config/domit_default.conf.php"; } if (file_exists(dirname(__FILE__) . "/config/exif.conf.php")) { require_once dirname(__FILE__) . "/config/exif.conf.php";
* * @copyright Copyright © 2005, Middlebury College * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) * * @version $Id: test.php,v 1.10 2007/09/14 13:57:10 adamfranco Exp $ */ ini_set('display_errors', true); if (!defined('HARMONI')) { require_once "../../../harmoni.inc.php"; } if (!defined('SIMPLE_TEST')) { define('SIMPLE_TEST', HARMONI . 'simple_test/'); } require_once SIMPLE_TEST . 'simple_unit.php'; require_once SIMPLE_TEST . 'dobo_simple_html_test.php'; $context = new OsidContext(); $context->assignContext('harmoni', $harmoni); $configuration = new ConfigurationProperties(); Services::startManagerAsService("DatabaseManager", $context, $configuration); $dbc = Services::getService("DBHandler"); require_once HARMONI . "errorHandler/throw.inc.php"; require_once HARMONI . "utilities/ArgumentValidator.class.php"; // if (!Services::serviceAvailable("ErrorHandler")) { // Services::registerService("ErrorHandler","ErrorHandler"); // require_once(OKI2."osid/OsidContext.php"); // // require_once(HARMONI."oki2/shared/ConfigurationProperties.class.php"); // $configuration = new ConfigurationProperties; // Services::startManagerAsService("ErrorHandler", $context, $configuration); // } //