/** * Customized constructor * @param $mixed */ public function __construct($mixed) { $args = func_get_args(); if (AppKitStringUtil::detectFormatSyntax($mixed)) { $format = array_shift($args); parent::__construct(vsprintf($format, $args)); } else { call_user_func_array(array($this, 'Exception::__construct'), array($mixed, $this->getCode())); } }
private function initializeAutosettings() { // Try to set the web path to correct urls within the frontend if (AgaviConfig::get('core.default_context') == 'web') { // Try to set the web path to correct urls within the frontend if (AgaviConfig::get('org.icinga.appkit.web_path', null) == null) { AgaviConfig::set('org.icinga.appkit.web_path', AppKitStringUtil::extractWebPath(), true, true); } } include AgaviConfigCache::checkConfig(AgaviToolkit::expandDirectives('%core.config_dir%/schedules.xml')); // Global temp directory AgaviConfig::set('core.tmp_dir', AgaviConfig::get('core.data_dir') . '/tmp'); }
/** * Converts an array containing ISO-8859-1 string to utf-8 * * @param array $obj */ public static function toUTF8_recursive(array &$obj) { foreach ($obj as $field => &$value) { if (is_string($value) && !AppKitStringUtil::isUTF8($value)) { $value = utf8_encode($value); } else { if (is_array($value)) { AppKitArrayUtil::toUTF8_recursive($value); } } } }
public function getImageFileRelative() { return AppKitStringUtil::absolute2Rel($this->getImageFile()); }