-
Notifications
You must be signed in to change notification settings - Fork 43
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 #37 from CircleOfNice/api-v1
API v1
- Loading branch information
Showing
92 changed files
with
2,715 additions
and
665 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* This file is part of DoctrineRestDriver. | ||
* | ||
* DoctrineRestDriver is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* DoctrineRestDriver is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with DoctrineRestDriver. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Circle\DoctrineRestDriver\Annotations; | ||
|
||
/** | ||
* Contract for all data source annotations | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
interface DataSource { | ||
|
||
/** | ||
* returns the route | ||
* | ||
* @return string | ||
*/ | ||
public function getRoute(); | ||
|
||
/** | ||
* returns the status code | ||
* | ||
* @return int|null | ||
*/ | ||
public function getStatusCode(); | ||
|
||
/** | ||
* returns the method | ||
* | ||
* @return null|string | ||
*/ | ||
public function getMethod(); | ||
|
||
/** | ||
* returns the options | ||
* | ||
* @return array|null | ||
*/ | ||
public function getOptions(); | ||
} |
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 |
---|---|---|
|
@@ -26,6 +26,6 @@ | |
* | ||
* @Annotation | ||
*/ | ||
class Delete { | ||
class Delete implements DataSource{ | ||
use Route; | ||
} |
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 |
---|---|---|
|
@@ -26,6 +26,6 @@ | |
* | ||
* @Annotation | ||
*/ | ||
class Fetch { | ||
class Fetch implements DataSource { | ||
use Route; | ||
} |
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 |
---|---|---|
|
@@ -29,6 +29,6 @@ | |
* | ||
* @Annotation | ||
*/ | ||
class Insert { | ||
class Insert implements DataSource { | ||
use Route; | ||
} |
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
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 |
---|---|---|
|
@@ -29,6 +29,6 @@ | |
* | ||
* @Annotation | ||
*/ | ||
class Select { | ||
class Select implements DataSource { | ||
use Route; | ||
} |
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 |
---|---|---|
|
@@ -29,6 +29,6 @@ | |
* | ||
* @Annotation | ||
*/ | ||
class Update { | ||
class Update implements DataSource { | ||
use Route; | ||
} |
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,27 @@ | ||
<?php | ||
/** | ||
* This file is part of DoctrineRestDriver. | ||
* | ||
* DoctrineRestDriver is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* DoctrineRestDriver is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with DoctrineRestDriver. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Circle\DoctrineRestDriver\Exceptions; | ||
|
||
/** | ||
* Generic driver exception | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
*/ | ||
class DoctrineRestDriverException 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
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,39 @@ | ||
<?php | ||
/** | ||
* This file is part of DoctrineRestDriver. | ||
* | ||
* DoctrineRestDriver is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* DoctrineRestDriver is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with DoctrineRestDriver. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Circle\DoctrineRestDriver\Exceptions; | ||
|
||
/** | ||
* Exception class for invalid format | ||
* | ||
* @author Tobias Hauck <[email protected]> | ||
* @copyright 2015 TeeAge-Beatz UG | ||
* | ||
* @SuppressWarnings("PHPMD.StaticAccess") | ||
*/ | ||
class InvalidFormatException extends DoctrineRestDriverException { | ||
|
||
/** | ||
* InvalidFormatException constructor | ||
* | ||
* @param string $class | ||
*/ | ||
public function __construct($class) { | ||
parent::__construct('Class ' . $class . ' must implement Circle\DoctrineRestDriver\Formatters\Formatter to act as formatter'); | ||
} | ||
} |
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
Oops, something went wrong.