protected function _set_title(h\string $text) { $c = $this->create_element(h\string('channel'), h\c(array('rdf:about' => '/'))); $t = $this->create_element(h\string('title'), h\c(array($text))); $c->appendChild($t); return $this->root->appendChild($c); }
protected function &_get_footer() { if (is_null($this->_footer)) { $div = $this->canvas->create_div_element(h\c(array('id' => 'footer'))); $this->canvas->body->appendChild($div); $this->_footer = $div; } return $this->_footer; }
function build(h\configuration $configuration, context $ctx) { $component = null; // We build the onion from core to skin $components = h\c($configuration['components'])->reverse(); foreach ($components as $layer) { h\import('lib/component/' . $layer); $component_class = "\\horn\\lib\\component\\{$layer}"; $component = new $component_class($configuration, $component); $component->do_touch($ctx); } return $component; }
function make_configuration() { $files = func_get_args(); $files = h\c($files); $composed_configuration = null; foreach ($files as $file) { $file_configuration = $file; $file_configuration = h\c($file_configuration); $composed_configuration = new composed_configuration($file_configuration, $composed_configuration); } $configuration = new configuration($composed_configuration); return $configuration; }
public function _test_jsonserialize() { $a = array('key' => 'value', 'first'); $o = h\c($a); $messages = array('Try to Jsonify a collection'); $callback = function () use($a, $o) { return json_encode($a) === json_encode($o); }; $this->add_test($callback, $messages); }
private function do_populate_head(context $ctx) { $cors_headers = h\c(array('Access-Control-Allow-Credentials' => 'true', 'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Headers' => 'Content-Type', 'Access-Control-Allow-Origin' => h\string::format('https://%s', $this->configuration['front_base_url']))); $ctx->out->head->join($cors_headers); }
protected function do_before(context $ctx) { $ctx->error_handling = h\c(array('status' => true, 'messages' => h\collection())); ob_start(); }