当前位置: 首页>>代码示例>>PHP>>正文


PHP ARC2::getRequestURI方法代码示例

本文整理汇总了PHP中ARC2::getRequestURI方法的典型用法代码示例。如果您正苦于以下问题:PHP ARC2::getRequestURI方法的具体用法?PHP ARC2::getRequestURI怎么用?PHP ARC2::getRequestURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ARC2的用法示例。


在下文中一共展示了ARC2::getRequestURI方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parse

 function parse($q, $src = '', $iso_fallback = 'ignore')
 {
     $this->setDefaultPrefixes();
     $this->base = $src ? $this->calcBase($src) : ARC2::getRequestURI();
     $this->r = array('base' => '', 'vars' => array(), 'prefixes' => array());
     $this->unparsed_code = $q;
     list($r, $v) = $this->xQuery($q);
     if ($r) {
         $this->r['query'] = $r;
         $this->unparsed_code = trim($v);
     } elseif (!$this->getErrors() && !$this->unparsed_code) {
         $this->addError('Query not properly closed');
     }
     $this->r['prefixes'] = $this->prefixes;
     $this->r['base'] = $this->base;
     /* remove trailing comments */
     while (preg_match('/^\\s*(\\#[^\\xd\\xa]*)(.*)$/si', $this->unparsed_code, $m)) {
         $this->unparsed_code = $m[2];
     }
     if ($this->unparsed_code && !$this->getErrors()) {
         $rest = preg_replace('/[\\x0a|\\x0d]/i', ' ', substr($this->unparsed_code, 0, 30));
         $msg = trim($rest) ? 'Could not properly handle "' . $rest . '"' : 'Syntax error, probably an incomplete pattern';
         $this->addError($msg);
     }
 }
开发者ID:paskalkris,项目名称:rdfrep-php,代码行数:25,代码来源:ARC2_SPARQLParser.php

示例2: testGetRequestURI

 public function testGetRequestURI()
 {
     $tmp = $_SERVER;
     unset($_SERVER);
     $actual = ARC2::getRequestURI();
     $this->assertEquals(ARC2::getScriptURI(), $actual);
     $_SERVER = $tmp;
     $_SERVER = array('SERVER_PROTOCOL' => 'http', 'SERVER_PORT' => 1234, 'HTTP_HOST' => 'example.com', 'REQUEST_URI' => '/foo');
     $actual = ARC2::getRequestURI();
     $this->assertEquals('http://example.com:1234/foo', $actual);
     $_SERVER = $tmp;
 }
开发者ID:neumann89,项目名称:FUB-xml-project6-2013,代码行数:12,代码来源:ARC2_Test.php

示例3: __init

 function __init()
 {
     /* base, time_limit */
     if (!$_POST && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
         parse_str($GLOBALS['HTTP_RAW_POST_DATA'], $_POST);
     }
     /* php5 bug */
     $this->inc_path = ARC2::getIncPath();
     $this->ns_count = 0;
     $this->nsp = array('http://www.w3.org/1999/02/22-rdf-syntax-ns#' => 'rdf');
     $this->used_ns = array('http://www.w3.org/1999/02/22-rdf-syntax-ns#');
     $this->ns = $this->v('ns', array(), $this->a);
     $this->base = $this->v('base', ARC2::getRequestURI(), $this->a);
     $this->errors = array();
     $this->warnings = array();
     $this->adjust_utf8 = $this->v('adjust_utf8', 0, $this->a);
     $this->max_errors = $this->v('max_errors', 25, $this->a);
 }
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:18,代码来源:ARC2_Class.php

示例4: __init

 function __init()
 {
     /* base, time_limit */
     if (!$_POST && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
         parse_str($GLOBALS['HTTP_RAW_POST_DATA'], $_POST);
     }
     /* php5 bug */
     $this->inc_path = ARC2::getIncPath();
     $this->ns_count = 0;
     $rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
     $this->nsp = array($rdf => 'rdf');
     $this->used_ns = array($rdf);
     $this->ns = array_merge(array('rdf' => $rdf), $this->v('ns', array(), $this->a));
     $this->base = $this->v('base', ARC2::getRequestURI(), $this->a);
     $this->errors = array();
     $this->warnings = array();
     $this->adjust_utf8 = $this->v('adjust_utf8', 0, $this->a);
     $this->max_errors = $this->v('max_errors', 25, $this->a);
     $this->has_pcre_unicode = @preg_match('/\\pL/u', 'test');
     /* \pL = block/point which is a Letter */
 }
开发者ID:johnulist,项目名称:arc2,代码行数:21,代码来源:ARC2_Class.php


注:本文中的ARC2::getRequestURI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。