-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
25 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
|
||
class Client | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
class Endpoint | ||
{ | ||
|
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
4 changes: 2 additions & 2 deletions
4
src/Entase/Endpoints/Productions.php → src/Endpoints/Productions.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
Empty file.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
abstract class Env | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
|
||
namespace Entase\Exceptions; | ||
namespace Entase\SDK\Exceptions; | ||
|
||
class API extends Base {} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase\Exceptions; | ||
namespace Entase\SDK\Exceptions; | ||
|
||
class Base extends \Exception | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
|
||
namespace Entase\Exceptions; | ||
namespace Entase\SDK\Exceptions; | ||
|
||
class CURL extends Base {} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
|
||
namespace Entase\Exceptions; | ||
namespace Entase\SDK\Exceptions; | ||
|
||
class Request extends Base {} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
class ObjectBase | ||
{ | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
use \IteratorAggregate; | ||
use \Traversable; | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Entase; | ||
namespace Entase\SDK; | ||
|
||
class ObjectCursor extends ObjectBase | ||
{ | ||
|
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 |
---|---|---|
@@ -1,43 +1,32 @@ | ||
<?php | ||
|
||
namespace EntaseSDK; | ||
namespace Entase\SDK; | ||
|
||
function AutoLoader($className) | ||
{ | ||
if (strpos($className, 'Entase\\') !== 0) | ||
if (strpos($className, 'Entase\\SDK\\') !== 0) | ||
return; | ||
|
||
$calledClass = $className; | ||
$className = str_replace('Entase\\SDK\\', '', $className); | ||
|
||
$fileName = ''; | ||
$namespace = ''; | ||
|
||
// Sets the include path as the "src" directory | ||
$includePath = dirname(__FILE__).DIRECTORY_SEPARATOR; | ||
|
||
if (false !== ($lastNsPos = strripos($className, '\\'))) { | ||
$namespace = substr($className, 0, $lastNsPos); | ||
$className = substr($className, $lastNsPos + 1); | ||
$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; | ||
} | ||
|
||
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; | ||
$fullFileName = $includePath . DIRECTORY_SEPARATOR . $fileName; | ||
$fullFileNameEX = $includePath . DIRECTORY_SEPARATOR .'ThirdParty/'.$fileName; | ||
|
||
$pos = strpos($fileName, '/'); | ||
$fileName_src = ($pos !== false) ? substr_replace($fileName, '/src/', $pos, 1) : 'src/'.$fileName; | ||
$fullFileNameEX_SRC = $includePath . DIRECTORY_SEPARATOR .'ThirdParty/'.$fileName_src; | ||
$fullFilePath = $includePath.DIRECTORY_SEPARATOR.$fileName; | ||
|
||
if (file_exists($fullFileName)) { | ||
require_once $fullFileName; | ||
} | ||
elseif (file_exists($fullFileNameEX)) { | ||
require_once $fullFileNameEX; | ||
} | ||
elseif (file_exists($fullFileNameEX_SRC)) { | ||
require_once $fullFileNameEX_SRC; | ||
} | ||
else { | ||
die('Class "'.$className.'" does not exist.'); | ||
if (file_exists($fullFilePath)) { | ||
require_once $fullFilePath; | ||
} | ||
else die('Class "'.$calledClass.'" does not exist.'); | ||
} | ||
|
||
\spl_autoload_register('EntaseSDK\AutoLoader'); // Registers the autoloader | ||
\spl_autoload_register('Entase\\SDK\\AutoLoader'); // Registers the autoloader |