Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Xentral\Components\SchemaCreator\Collection;
|
||||
|
||||
use ArrayIterator;
|
||||
use IteratorAggregate;
|
||||
use Xentral\Components\SchemaCreator\Schema\TableSchema;
|
||||
|
||||
final class SchemaCollection implements IteratorAggregate
|
||||
{
|
||||
/** @var array|TableSchema[] */
|
||||
private $values = [];
|
||||
|
||||
/**
|
||||
* @param TableSchema $schema
|
||||
*/
|
||||
public function add(TableSchema $schema): void
|
||||
{
|
||||
$this->values[] = $schema;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayIterator|TableSchema[]
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
return new ArrayIterator($this->values);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user