resolveCompletePath() public static method

public static resolveCompletePath ( string $origin, string $destination ) : string
$origin string
$destination string
return string
コード例 #1
0
 /**
  *
  */
 public function testResolveCompletePath()
 {
     $dirname = __DIR__;
     $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), './folder/../aukro.wsdl'));
     $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'folder/../aukro.wsdl'));
     $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'folder/../toto/../aukro.wsdl'));
     $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'aukro.wsdl'));
 }
コード例 #2
0
 /**
  * @see \WsdlToPhp\PackageGenerator\Parser\Wsdl\AbstractParser::parseWsdl()
  */
 protected function parseWsdl(Wsdl $wsdl, Schema $schema = null)
 {
     foreach ($this->getTags() as $tag) {
         if ($tag instanceof AbstractTagImport && $tag->getLocationAttribute() != '') {
             $finalLocation = Utils::resolveCompletePath($this->getLocation($wsdl, $schema), $tag->getLocationAttribute());
             $this->generator->addSchemaToWsdl($wsdl, $finalLocation);
         }
     }
 }