-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from veewee/additional-method-meta
Add additional method metadata
- Loading branch information
Showing
14 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/Metadata/Converter/Methods/Configurator/Wsdl1Configurator.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Soap\WsdlReader\Metadata\Converter\Methods\Configurator; | ||
|
||
use Soap\Engine\Metadata\Model\Method; | ||
use Soap\Engine\Metadata\Model\MethodMeta; | ||
use Soap\WsdlReader\Model\Wsdl1; | ||
|
||
final class Wsdl1Configurator | ||
{ | ||
public function __invoke(Method $method, Wsdl1 $wsdl): Method | ||
{ | ||
return $method->withMeta( | ||
static fn (MethodMeta $meta): MethodMeta => $meta | ||
->withTargetNamespace($wsdl->targetNamespace?->value()) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Soap\WsdlReader\Model\Definitions; | ||
|
||
enum EncodingStyle: string | ||
{ | ||
case SOAP_11 = 'http://schemas.xmlsoap.org/soap/encoding/'; | ||
case SOAP_12 = 'http://www.w3.org/2001/12/soap-encoding'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Soap\WsdlReader\Parser\Definitions; | ||
|
||
use VeeWee\Xml\Dom\Document; | ||
use VeeWee\Xml\Xmlns\Xmlns; | ||
|
||
final class TargetNamespaceParser | ||
{ | ||
public static function tryParse(Document $wsdl): ?Xmlns | ||
{ | ||
$definitions = $wsdl->locateDocumentElement(); | ||
|
||
return $definitions->hasAttribute('targetNamespace') | ||
? Xmlns::load($definitions->getAttribute('targetNamespace')) | ||
: null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters