-
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.
- Record collections implement Records abstraction - Moved setup classes into separate namespace
- Loading branch information
Showing
14 changed files
with
128 additions
and
98 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
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,59 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Polymorphine/Container package. | ||
* | ||
* (c) Shudd3r <q3.shudder@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Polymorphine\Container; | ||
|
||
use Polymorphine\Container\Records\Record; | ||
use Psr\Container\ContainerInterface; | ||
|
||
|
||
interface Records | ||
{ | ||
/** | ||
* Checks if Record is stored at given identifier. | ||
* | ||
* @param string $id | ||
* | ||
* @return bool | ||
*/ | ||
public function has(string $id): bool; | ||
|
||
/** | ||
* Returns Record stored at given identifier. | ||
* | ||
* @param string $id | ||
* @param ContainerInterface $container | ||
* | ||
* @throws Exception\RecordNotFoundException | ||
* | ||
* @return mixed | ||
*/ | ||
public function get(string $id, ContainerInterface $container); | ||
|
||
/** | ||
* Stores Record at given $name identifier. | ||
* | ||
* @param $id | ||
* @param Record $record | ||
* | ||
* @throws Exception\InvalidIdException | ||
*/ | ||
public function add(string $id, Record $record): void; | ||
|
||
/** | ||
* Moves Record to different identifier. | ||
* | ||
* @param string $id | ||
* | ||
* @return string New identifier of moved Record | ||
*/ | ||
public function moveRecord(string $id): string; | ||
} |
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
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.