private function addPlaceHolder($path, \SimpleXMLElement $propertyPlaceHolder) { $placeHolder = new PlaceHolder($path); $placeHolder->doNode($propertyPlaceHolder); $this->context->addPlaceHolder($placeHolder); $ar = parse_ini_file($placeHolder->getFullPath(), $placeHolder->getToArray()); $this->container->addPlaceHolderData($ar); }
/** * Evaluate the value definition that can be find in a property definition * @param string $value check is the value contenu somthing like ${properyName} and replace the value if needed * @return String */ private function doValueProperty($value) { if (strpos($value, '${') === 0) { $len = strlen($value); $a = strrpos($value, '}'); if (strrpos($value, '}') === $len - 1) { $propertyName = substr($value, 2, $len - 3); return $this->parentContainer->getIniValue($propertyName); } } }
<?php set_include_path('../virtualsangha' . PATH_SEPARATOR . get_include_path()); require_once 'IocContainer.class.php'; require_once 'inc/header.inc.php'; $ioc = new IocContainer(); $admin = $ioc->getInstanceOf('Admin'); $admin->main();