Skip to content

Commit

Permalink
Use PHP namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
cb8 authored and DRvanR committed Dec 21, 2015
1 parent f11a9c3 commit 431576a
Show file tree
Hide file tree
Showing 200 changed files with 2,592 additions and 1,673 deletions.
8 changes: 5 additions & 3 deletions src/SAML2/ArtifactResolve.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

namespace SAML2;
/**
* The Artifact is part of the SAML 2.0 IdP code, and it builds an artifact object.
* I am using strings, because I find them easier to work with.
Expand All @@ -7,7 +9,7 @@
* @author Danny Bollaert, UGent AS. <danny.bollaert@ugent.be>
* @package SimpleSAMLphp
*/
class SAML2_ArtifactResolve extends SAML2_Request
class ArtifactResolve extends Request
{
private $artifact;

Expand All @@ -16,7 +18,7 @@ public function __construct(DOMElement $xml = NULL)
parent::__construct('ArtifactResolve', $xml);

if (!is_null($xml)) {
$results = SAML2_Utils::xpQuery($xml, './saml_protocol:Artifact');
$results = Utils::xpQuery($xml, './saml_protocol:Artifact');
$this->artifact = $results[0]->textContent;
}

Expand Down Expand Up @@ -51,7 +53,7 @@ public function setArtifact($artifact)
public function toUnsignedXML()
{
$root = parent::toUnsignedXML();
$artifactelement = $this->document->createElementNS(SAML2_Constants::NS_SAMLP, 'Artifact', $this->artifact);
$artifactelement = $this->document->createElementNS(Constants::NS_SAMLP, 'Artifact', $this->artifact);
$root->appendChild($artifactelement);

return $root;
Expand Down
8 changes: 5 additions & 3 deletions src/SAML2/ArtifactResponse.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php

namespace SAML2;

/**
* The SAML2_ArtifactResponse, is the response to the SAML2_ArtifactResolve.
* The \SAML2\ArtifactResponse, is the response to the \SAML2\ArtifactResolve.
*
* @author Danny Bollaert, UGent AS. <danny.bollaert@ugent.be>
* @package SimpleSAMLphp
*/
class SAML2_ArtifactResponse extends SAML2_StatusResponse
class ArtifactResponse extends StatusResponse
{
/**
* The DOMElement with the message the artifact refers
Expand All @@ -23,7 +25,7 @@ public function __construct(DOMElement $xml = NULL)

if (!is_null($xml)) {

$status = SAML2_Utils::xpQuery($xml, './saml_protocol:Status');
$status = Utils::xpQuery($xml, './saml_protocol:Status');
assert('!empty($status)'); /* Will have failed during StatusResponse parsing. */

$status = $status[0];
Expand Down
Loading

0 comments on commit 431576a

Please sign in to comment.