Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved Defaults to Non Abstract Provider
For certain scenarios, the default static property isn’t necessary. It’s a good base class to have, but not necessary for the abstract, which most might choose to extend from.
- Loading branch information
1 parent
4c84a91
commit 844c194
Showing
5 changed files
with
26 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace MRussell\REST\Endpoint\Provider; | ||
|
||
|
||
class DefaultEndpointProvider extends AbstractEndpointProvider | ||
{ | ||
/** | ||
* List of default endpoints to load | ||
* @var array | ||
*/ | ||
protected static $_DEFAULT_ENDPOINTS = array(); | ||
|
||
public function __construct() { | ||
foreach(static::$_DEFAULT_ENDPOINTS as $name => $epData){ | ||
if (!isset($epData['properties'])){ | ||
$epData['properties'] = array(); | ||
} | ||
$this->registerEndpoint($name,$epData['class'],$epData['properties']); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,5 +6,4 @@ | |
|
||
class EndpointProvider extends AbstractEndpointProvider | ||
{ | ||
|
||
} |
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