@@ -46,6 +46,9 @@ discard block |
||
| 46 | 46 | return $this->getOrCreateCollection($name); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $name |
|
| 51 | + */ |
|
| 49 | 52 | public function getOrCreateCollection($name) |
| 50 | 53 | { |
| 51 | 54 | if (isset($this->collections[$name])) { |
@@ -63,6 +66,9 @@ discard block |
||
| 63 | 66 | return $this->collections[$name] = $this->newCollection($store, $name); |
| 64 | 67 | } |
| 65 | 68 | |
| 69 | + /** |
|
| 70 | + * @param string $name |
|
| 71 | + */ |
|
| 66 | 72 | public function dropCollection($name) |
| 67 | 73 | { |
| 68 | 74 | $this->engine->destroy($name); |
@@ -3,10 +3,6 @@ |
||
| 3 | 3 | namespace Mattbit\Flat\Storage; |
| 4 | 4 | |
| 5 | 5 | use Mattbit\Flat\Model\DocumentInterface; |
| 6 | -use Mattbit\Flat\Storage\Filesystem\FilesystemCursor; |
|
| 7 | - |
|
| 8 | -use Mattbit\Flat\Storage\EncoderInterface; |
|
| 9 | - |
|
| 10 | 6 | use Mattbit\Flat\Exception\DuplicateKeyException; |
| 11 | 7 | |
| 12 | 8 | class DocumentStore implements \IteratorAggregate |
@@ -12,6 +12,9 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | protected $encoder; |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $path |
|
| 17 | + */ |
|
| 15 | 18 | public function __construct(EncoderInterface $encoder, $path) |
| 16 | 19 | { |
| 17 | 20 | $this->encoder = $encoder; |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Mattbit\Flat\Storage; |
| 4 | 4 | |
| 5 | -use Mattbit\Flat\Model\Document; |
|
| 6 | 5 | use Mattbit\Flat\Storage\EncoderInterface; |
| 7 | 6 | |
| 8 | 7 | class FilesystemIterator implements \Iterator { |
@@ -48,6 +48,9 @@ |
||
| 48 | 48 | return $document; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @param DocumentInterface $document |
|
| 53 | + */ |
|
| 51 | 54 | public function flatten($document, $prepend = '') |
| 52 | 55 | { |
| 53 | 56 | $results = []; |