mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-16 13:07:14 +01:00
32 lines
617 B
PHP
32 lines
617 B
PHP
<?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);
|
|
}
|
|
}
|