Skip to content
Snippets Groups Projects
Unverified Commit d59da3d4 authored by lukasmatusiewicz's avatar lukasmatusiewicz Committed by GitHub
Browse files

Merge pull request #12 from melanger/namespaces

Namespaces
parents fc6dba15 b5979c10
No related branches found
No related tags found
No related merge requests found
<?php <?php
namespace PrivacyIdea\PHPClient;
class PIBadRequestException extends \Exception {} class PIBadRequestException extends \Exception {}
{ {
......
<?php <?php
namespace PrivacyIdea\PHPClient;
class PIChallenge class PIChallenge
{ {
/* @var string Token's type. */ /* @var string Token's type. */
......
<?php <?php
namespace PrivacyIdea\PHPClient;
/** /**
* Interface PILog * Interface PILog
* Call the functions that collect debug and error messages * Call the functions that collect debug and error messages
......
<?php <?php
namespace PrivacyIdea\PHPClient;
class PIResponse class PIResponse
{ {
/* @var string All tokens messages which are sent by PI and can be used in UI to help user interact with service. */ /* @var string All tokens messages which are sent by PI and can be used in UI to help user interact with service. */
......
<?php <?php
namespace PrivacyIdea\PHPClient;
const AUTHENTICATORDATA = "authenticatordata"; const AUTHENTICATORDATA = "authenticatordata";
const CLIENTDATA = "clientdata"; const CLIENTDATA = "clientdata";
const SIGNATUREDATA = "signaturedata"; const SIGNATUREDATA = "signaturedata";
......
...@@ -9,10 +9,13 @@ spl_autoload_register('autoLoader'); ...@@ -9,10 +9,13 @@ spl_autoload_register('autoLoader');
function autoLoader($className) function autoLoader($className)
{ {
$fullPath = dirname(__FILE__) . "/" . $className . ".php"; $classNameParts = explode("\\");
$classNameOnly = $classNameParts[count($classNameParts) - 1];
$fullPath = dirname(__FILE__) . "/" . $classNameOnly . ".php";
if (file_exists($fullPath)) if (file_exists($fullPath))
{ {
require_once $fullPath; require_once $fullPath;
class_alias($className, $classNameOnly, false);
return true; return true;
} else } else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment