-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed ProviderDataType -> ProviderDataFetcher.
- Loading branch information
Showing
21 changed files
with
124 additions
and
127 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
namespace ScriptFUSION\Porter\Collection; | ||
|
||
use ScriptFUSION\Porter\Provider\ProviderDataType; | ||
use ScriptFUSION\Porter\Provider\ProviderDataFetcher; | ||
|
||
class ProviderRecords extends RecordCollection | ||
{ | ||
private $providerData; | ||
private $dataFetcher; | ||
|
||
public function __construct(\Iterator $providerRecords, ProviderDataType $providerDataType) | ||
public function __construct(\Iterator $providerRecords, ProviderDataFetcher $dataFetcher) | ||
{ | ||
parent::__construct($providerRecords); | ||
|
||
$this->providerData = $providerDataType; | ||
$this->dataFetcher = $dataFetcher; | ||
} | ||
|
||
/** | ||
* @return ProviderDataType | ||
* @return ProviderDataFetcher | ||
*/ | ||
public function getProviderData() | ||
public function getDataFetcher() | ||
{ | ||
return $this->providerData; | ||
return $this->dataFetcher; | ||
} | ||
} |
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,10 @@ | ||
<?php | ||
namespace ScriptFUSION\Porter\Provider; | ||
|
||
/** | ||
* The exception that is thrown when a foreign data fetcher is received. | ||
*/ | ||
class ForeignDataFetcherException extends \RuntimeException | ||
{ | ||
// Intentionally empty. | ||
} |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/Porter/Provider/NoDataType.php → src/Porter/Provider/NullFetcher.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
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,25 @@ | ||
<?php | ||
namespace ScriptFUSION\Porter\Provider; | ||
|
||
use ScriptFUSION\Porter\Connector\Connector; | ||
|
||
/** | ||
* Specifies how to fetch data from the specified provider. | ||
*/ | ||
interface ProviderDataFetcher | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getProviderName(); | ||
|
||
/** | ||
* Fetches data from the provider using the the specified connector and | ||
* presents the data as an iterative series. | ||
* | ||
* @param Connector $connector Connector. | ||
* | ||
* @return \Iterator Data series. | ||
*/ | ||
public function fetch(Connector $connector); | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
namespace ScriptFUSION\Porter\Specification; | ||
|
||
use ScriptFUSION\Porter\Provider\StaticDataType; | ||
use ScriptFUSION\Porter\Provider\StaticDataFetcher; | ||
|
||
class StaticDataImportSpecification extends ImportSpecification | ||
{ | ||
public function __construct(\Iterator $data) | ||
{ | ||
parent::__construct(new StaticDataType($data)); | ||
parent::__construct(new StaticDataFetcher($data)); | ||
} | ||
} |
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.