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


PHP Net_URL2::removeDotSegments方法代码示例

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


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

示例1: __construct

 public function __construct($path = '', $defaults = array(), $rules = array())
 {
     $this->path = '/' . trim(Net_URL2::removeDotSegments($path), '/');
     $this->setDefaults($defaults);
     $this->setRules($rules);
     try {
         $this->parsePath();
     } catch (Exception $e) {
         // The path could not be parsed correctly, treat it as fixed
         $this->fixed = true;
         $part = self::createPart(Net_URL_Mapper_Part::FIXED, $this->path, $this->path);
         $this->parts = array($part);
     }
     $this->getRequired();
 }
开发者ID:4lb0,项目名称:encaminar,代码行数:15,代码来源:Path.php

示例2: test19315

 /**
  * This is a regression test that removeDotSegments('0') is
  * working as it was reported as not-working in Bug #19315
  * on 2012-03-04 04:18 UTC.
  *
  * @return void
  */
 public function test19315()
 {
     $actual = Net_URL2::removeDotSegments('0');
     $this->assertSame('0', $actual);
     $nonStringObject = (object) array();
     try {
         Net_URL2::removeDotSegments($nonStringObject);
     } catch (PHPUnit_Framework_Error $error) {
         $this->addToAssertionCount(1);
     }
     if (!isset($error)) {
         $this->fail('Failed to verify that error was given.');
     }
     unset($error);
 }
开发者ID:vube,项目名称:php-pear-net_url2,代码行数:22,代码来源:URL2Test.php

示例3: testRemoveDotSegments

 /**
  * @dataProvider pathProvider
  */
 public function testRemoveDotSegments($path, $assertion)
 {
     $this->assertEquals($assertion, Net_URL2::removeDotSegments($path));
 }
开发者ID:wb-crowdfusion,项目名称:crowdfusion,代码行数:7,代码来源:URL2Test.php


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