/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_unit = $config->getString('unit', 'mm')->getValue(); $this->_creator = $config->getString('creator', 'CharcoalPHP')->getValue(); $this->_authhor = $config->getString('authhor', 'CharcoalPHP')->getValue(); $this->_zoom = $config->getString('zoom', 'real')->getValue(); $this->_layout = $config->getString('layout', 'continuous')->getValue(); $this->_auto_break = $config->getBoolean('auto_break', TRUE)->getValue(); $this->_auto_break_margin = $config->getInteger('auto_break_margin', 5)->getValue(); $this->_fill_color = $config->getArray('fill_color', array(255, 255, 255))->getValue(); $this->_margin_left = $config->getInteger('margin_left', 10.0)->getValue(); $this->_margin_top = $config->getInteger('margin_left', 10.0)->getValue(); $this->_margin_right = $config->getInteger('margin_left', 10.0)->getValue(); log_debug("debug,pdf", "unit:" . $this->_unit); log_debug("debug,pdf", "creator:" . $this->_creator); log_debug("debug,pdf", "authhor:" . $this->_authhor); log_debug("debug,pdf", "zoom:" . $this->_zoom); log_debug("debug,pdf", "layout:" . $this->_layout); log_debug("debug,pdf", "auto_break:" . $this->_auto_break); log_debug("debug,pdf", "auto_break_margin:" . $this->_auto_break_margin); log_debug("debug,pdf", "fill_color:" . implode(",", $this->_fill_color)); log_debug("debug,pdf", "margin_left:" . $this->_margin_left); log_debug("debug,pdf", "margin_top:" . $this->_margin_top); log_debug("debug,pdf", "margin_right:" . $this->_margin_right); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->task_manager = us($config->getString('task_manager', '')); $this->forward_target = us($config->getString('forward_target', '')); $this->modules = uv($config->getArray('modules', array())); $this->events = uv($config->getArray('events', array())); $this->debug_mode = ub($config->getBoolean('debug_mode', FALSE)); $this->log_enabled = ub($config->getBoolean('log_enabled')); $this->log_level = us($config->getString('log_level')); $this->log_loggers = uv($config->getArray('log_loggers')); // eventsに記載しているイベントのモジュールも読み込む if (is_array($this->events)) { foreach ($this->events as $event) { $pos = strpos($event, "@"); if ($pos !== FALSE) { $this->modules[] = substr($event, $pos); } } } if ($this->getSandbox()->isDebug()) { log_info("system, debug, config", "task_manager:" . $this->task_manager, self::TAG); log_info("system, debug, config", "forward_target:" . $this->forward_target, self::TAG); log_info("system, debug, config", "modules:" . print_r($this->modules, true), self::TAG); log_info("system, debug, config", "events:" . print_r($this->events, true), self::TAG); log_info("system, debug, config", "debug_mode" . $this->debug_mode, self::TAG); log_info("system, debug, config", "log_enabled" . $this->log_enabled, self::TAG); log_info("system, debug, config", "log_level" . $this->log_level, self::TAG); log_info("system, debug, config", "log_loggers" . print_r($this->log_loggers, true), self::TAG); } }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_mode = $config->getString('mode', '777')->getValue(); $this->_overwrite = $config->getBoolean('overwrite', TRUE)->getValue(); $this->_dir_path = $config->getString(s('dir_path'), s(CHARCOAL_BASE_DIR))->getValue(); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_path = $config->getString(s('path'), s('/'))->getValue(); $this->_domain = $config->getString(s('domain'), s(''))->getValue(); $this->_secure = $config->getBoolean('secure', FALSE)->getValue(); $this->_httponly = $config->getBoolean('httponly', FALSE)->getValue(); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $enable_cahche = $config->getBoolean('enable_cahche', true); $cache_dir = $config->getString('cache_dir', CHARCOAL_CACHE_DIR . '/simplepie', TRUE); $duration = $config->getInteger('duration', 1800); $this->simple_pie->enable_cache(ub($enable_cahche)); $this->simple_pie->set_cache_location(us($cache_dir)); $this->simple_pie->set_cache_duration(ui($duration)); }
public function configure($config) { parent::configure($config); $this->tasks = $config->getArray('tasks', array()); $this->events = $config->getArray('events', array()); $this->required_modules = $config->getArray('required_modules', array()); // log_info( "system, debug", "module", "tasks:" . print_r($this->tasks,true) ); // log_info( "system, debug", "module", "events:" . print_r($this->events,true) ); // log_info( "system, debug", "module", "required_modules:" . print_r($this->extends,true) ); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $encoding = $config->getString('encoding', 'utf-8'); $case_folding = $config->getBoolean('case_folding', true); $output_encoding = $config->getString('output_encoding', 'utf-8'); $this->parser = xml_parser_create(us($encoding)); $this->encoding = $encoding; $this->output_encoding = $output_encoding; xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, ub($case_folding)); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); log_debug("debug", "config: " . print_r($config, true)); $this->token_key = $config->getString('token_key', 'charcoaltoken_key'); $this->debug_mode = $config->getBoolean('debug_mode', FALSE); $this->token_generator = $config->getString('token_generator', 'simple'); log_debug("debug", "token key: {$this->token_key}"); log_debug("debug", "debug mode: {$this->debug_mode}"); log_debug("debug", "token generator: {$this->token_generator}"); $this->token_generator = $this->getSandbox()->createObject($this->token_generator, 'token_generator'); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $encoding = $config->getString('encoding', 'utf8'); $indent = $config->getBoolean('indent', true); $output_xhtml = $config->getBoolean('output-xhtml', true); $output_html = $config->getBoolean('output-html', true); $wrap = $config->getInteger('wrap', 200); $show_body_only = $config->getBoolean('show-body-only', true); $clean = $config->getBoolean('clean', false); $this->config = array('indent' => ub($indent), 'output-xhtml' => ub($output_xhtml), 'output-html' => ub($output_html), 'wrap' => ui($wrap), 'show-body-only' => ub($show_body_only), 'clean' => ub($clean)); $this->encoding = us($encoding); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->name_space = $config->getString('name_space', ''); $this->event_filters = $config->getArray('event_filters', array()); $this->post_actions = $config->getArray('post_actions', array('remove_event')); $this->priority = $config->getInteger('priority', 0); if ($this->getSandbox()->isDebug()) { log_debug("debug,event", "Task[{$this}] name space: {$this->name_space}", self::TAG); log_debug("debug,event", "Task[{$this}] event filters: " . $this->event_filters, self::TAG); log_debug("debug,event", "Task[{$this}] post actions: " . $this->post_actions, self::TAG); log_debug("debug,event", "Task[{$this}] priority: {$this->priority}", self::TAG); } }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $data_source = $config->getString('data_source'); $sql_builder = $config->getString('sql_builder'); log_debug("smart_gateway, data_source", "data_source=" . $data_source); log_debug("smart_gateway, data_source", "sql_builder=" . $sql_builder); if (empty($data_source)) { _throw(new Charcoal_DBDataSourceException('data source is not specified.')); } if (empty($sql_builder)) { _throw(new Charcoal_DBDataSourceException('sql builder is not specified.')); } /** @var Charcoal_IDataSource $ds */ $ds = $this->getSandbox()->createObject($data_source, 'data_source', array(), 'Charcoal_IDataSource'); /** @var Charcoal_ISQLBuilder $builder */ $builder = $this->getSandbox()->createObject($sql_builder, 'sql_builder', array(), 'Charcoal_ISQLBuilder'); $this->impl = new Charcoal_SmartGatewayImpl($this->getSandbox(), $ds, $builder); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { $switcher = new Charcoal_ErrorReportingSwitcher(0, E_DEPRECATED); parent::configure($config); if (is_array($config) || $config === NULL) { $config = new Chacoal_Config($config); } // ========================================= // QdMail設定 // ========================================= // エラーを画面に出力するか $qdmail_error_display = $config->getBoolean('qdmail.error_display', FALSE); $this->qdmail->errorDisplay(ub($qdmail_error_display)); // ログ設定 $qdmail_log_level = $config->getInteger('qdmail.log_level', 0); $qdmail_log_path = $config->getString('qdmail.log_path', '', TRUE); $qdmail_log_filename = $config->getString('qdmail.log_filename', '', TRUE); $this->qdmail->logLevel(ui($qdmail_log_level)); $this->qdmail->logPath(us($qdmail_log_path)); $this->qdmail->logFilename("/" . $qdmail_log_filename); // エラーログ設定 $qdmail_error_display = $config->getBoolean('qdmail.error_display', FALSE); $qdmail_error_log_level = $config->getInteger('qdmail.error_log_level', 0); $qdmail_error_log_path = $config->getString('qdmail.error_log_path', '', TRUE); $qdmail_error_log_filename = $config->getString('qdmail.error_log_filename', '', TRUE); $this->qdmail->errorDisplay(ub($qdmail_error_display)); $this->qdmail->errorlogLevel(ui($qdmail_error_log_level)); $this->qdmail->errorlogPath(us($qdmail_error_log_path)); $this->qdmail->errorlogFilename("/" . $qdmail_error_log_filename); // ========================================= // QdSMTP設定 // ========================================= $qdsmtp = $config->getBoolean('qdsmtp', FALSE); if (!$qdsmtp) { $this->qdmail->smtp(false); } else { // エラーを画面に出力するか $qdsmtp_error_display = $config->getBoolean('qdsmtp.error_display', FALSE); $this->qdmail->smtpObject()->error_display = ub($qdsmtp_error_display); // ログ設定 $qdsmtp_log_level = $config->getInteger('qdsmtp.log_level', 0); $qdsmtp_log_filename = $config->getString('qdsmtp.log_filename', '', TRUE); $qdsmtp_error_log_level = $config->getInteger('qdsmtp.error_log_level', 0); $qdsmtp_error_log_filename = $config->getString('qdsmtp.error_log_filename', '', TRUE); $qdsmtp_error_display = $config->getBoolean('qdsmtp.error_display', FALSE); $this->qdmail->smtpObject()->logLevel(ui($qdsmtp_log_level)); $this->qdmail->smtpObject()->logFilename(us($qdsmtp_log_filename)); $this->qdmail->smtpObject()->errorlogLevel(ui($qdsmtp_error_log_level)); $this->qdmail->smtpObject()->errorlogFilename(us($qdsmtp_error_log_filename)); $this->qdmail->smtpObject()->error_display = $qdsmtp_error_display; // サーバ設定 $qdsmtp_host = $config->getString('qdsmtp.host', ''); $qdsmtp_port = $config->getString('qdsmtp.port', ''); $qdsmtp_from = $config->getString('qdsmtp.from', ''); $qdsmtp_protocol = $config->getString('qdsmtp.protocol', ''); $qdsmtp_user = $config->getString('qdsmtp.user', ''); $qdsmtp_pass = $config->getString('qdsmtp.pass', ''); $options = array('host' => us($qdsmtp_host), 'port' => us($qdsmtp_port), 'from' => us($qdsmtp_from), 'protocol' => us($qdsmtp_protocol), 'user' => us($qdsmtp_user), 'pass' => us($qdsmtp_pass)); $this->qdmail->smtp(true); $result = $this->qdmail->smtpServer($options); if ($result === FALSE) { _throw(new Charcoal_QdmailException($this->qdmail)); } } log_debug("debug, qdmail_sender", "component configs are:" . print_r($config, true)); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->proc_key = $this->getSandbox()->getProfile()->getString('PROC_KEY', 'proc'); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_type_mapping = $config->getArray('type_mappings'); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_priority = $config->getInteger('priority', Charcoal_EnumEventPriority::NORMAL); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->mode = us($config->getString('mode', '777')); $this->overwrite = ub($config->getBoolean('overwrite', TRUE)); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->_base_dir = $config->getString('base_dir', CHARCOAL_BASE_DIR, TRUE); $this->_base_dir_obj = new Charcoal_File($this->_base_dir); }
/** * Initialize instance * * @param Charcoal_Config $config configuration data */ public function configure($config) { parent::configure($config); $this->log_format = $config->getString('log_format', self::DEFAULT_LOG_FORMAT); $this->converter = Charcoal_EncodingConverter::fromString($this->getSandbox(), 'PHP', 'LOG'); }