function __construct($name, $method, $required, $result) { in_array($method, ['record']) or backend_error('bad_config', 'Unknown GeoIP procedure method: ' . $method); $result == 'object' or backend_error('bad_config', 'GeoIP procedure result must be object'); parent::__construct([], self::make_id($name, []), $required, $result); $this->method = $method; }
function __construct($name, $params, $required, $result, $body, $sql) { parent::__construct($params, self::make_id($name, $params), $required, $result); $body = explode(';', trim(trim($body), ';')); $this->body = count($body) == 1 ? $body[0] : $body; $this->sql = $sql; }
function __construct($name, $method, $required, $result, $foursquare) { in_array($method, ['photos', 'venues']) or error('initialization_error', 'Unknown Foursquare procedure method: ' . $method); $result == 'array' or error('initialization_error', 'Foursquare procedure result must be array'); parent::__construct($name, [], $required, $result); $this->method = $method; $this->foursquare = $foursquare; }
function __construct($name, $method, $required, $result, $foursquare) { in_array($method, ['photos', 'venues']) or backend_error('bad_config', 'Unknown Foursquare procedure method: ' . $method); $result == 'array' or backend_error('bad_config', 'Foursquare procedure result must be array'); parent::__construct([], self::make_id($name, []), $required, $result); $this->method = $method; $this->foursquare = $foursquare; }
function __construct($datasource, $vars, $name, $method, $url, $params, $get, $post, $content_type, $empty, $root, $permission = null, $cache = true) { parent::__construct($vars, $name, $params, $empty, $root, [], $permission, $cache); $this->datasource = $datasource; $this->method = $method; $this->url = $datasource['url'] . $url; $this->get = $get; $this->post = $post; $this->content_type = is_null($content_type) ? $datasource['content-type'] : $content_type; }
function prc($prc, $args = null, $debug = false) { $link = getDbLink(); $p = new procedure($link); $p->resultTag = "data"; $prms = Input::toArray($args); $result = $p->call($prc,$prms ); if ($debug) { echo "/*\n"; echo $p->lastSQL."\n"; var_dump($prms); echo "\n*/"; } mysqli_close($link); unset($p); return $result; }
function __construct($name, $params, $required, $result, $requires, $body, $www, $self) { parent::__construct($params, self::make_id($name, $params), $requires, $result); $imploded = '$' . implode(',$', array_keys($params)); $this->body = ''; foreach ($requires as $require) { $this->body .= 'require_once(\'' . $www->folder('_require') . $require . '\');'; } $this->body .= 'return function(' . (empty($params) ? '' : $imploded) . ") { {$body} };"; $this->self = $self; }
function __construct($vars, $datasource, $name, $params, $empty, $root, $item, $body, $output = array(), $permission = null, $cache = true) { parent::__construct($vars, $name, $params, $empty, $root, $output, $permission, $cache); $this->datasource = $datasource; if ($item) { $this->item = explode(',', $item); foreach ($this->item as &$value) { $value = trim($value); } } $this->body = explode(';', trim(trim($body), ';')); }
function __construct($name, $params, $required, $result, $solr, $core, $method, $body, $order_by, $offset, $count) { in_array($method, ['add', 'delete', 'query']) or backend_error('bad_config', "Unknown Solr method: {$method}"); parent::__construct($params, self::make_id($name, $params), $required, $result); $this->solr = $solr; $this->core = $core; $this->method = $method; $this->body = trim($body); $this->order_by = $order_by; $this->offset = $offset; $this->count = $count; }
function __construct($name, $params, $required, $result, $embed, $solr, $core, $method, $body, $order_by, $offset, $count) { in_array($method, ['add', 'delete', 'query']) or error('initialization_error', "Unknown Solr method: {$method}"); parent::__construct($name, $params, $required, $result, $embed); $this->solr = $solr; $this->core = $core; $this->method = $method; $this->body = trim($body); $this->order_by = $order_by; $this->offset = $offset; $this->count = $count; }
function __construct($vars, $datasource, $name, $params, $empty, $root, $item, $core, $method, $body, $order_by, $offset = null, $count = null, $output = array(), $permission = null, $cache = true) { parent::__construct($vars, $name, $params, $empty, $root, $output, $permission, $cache); $this->datasource = $datasource; if ($item) { $this->item = explode(',', $item); foreach ($this->item as &$value) { $value = trim($value); } } $this->core = $core; $this->method = $method; $this->body = trim($body); $this->order_by = $order_by; $this->offset = $offset; $this->count = $count; }
function __construct($datasource, $vars, $name, $method, $params, $empty, $root, $output = array(), $permission = null, $cache = true) { parent::__construct($vars, $name, $params, $empty, $root, $output, $permission, $cache); $this->datasource = $datasource; $this->method = $method; }
function __construct($vars, $name, $params, $empty, $root, $method, $output = array(), $permission = null) { parent::__construct($vars, $name, $params, $empty, $root, $output, $permission); $this->method = $method; }
function get($name, $args) { $id = procedure::make_id($name, $args); isset($this->procedures[$id]) or backend_error('bad_query', "Unknown procedure: {$id}"); return $this->procedures[$id]; }
private function get($name, $args) { $mangled = procedure::mangle($name, $args); isset($this->procedures[$mangled]) or runtime_error('Unknown procedure: ' . $mangled); return $this->procedures[$mangled]; }