for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
declare(strict_types=1);
namespace Cycle\Annotated\Annotation;
use Cycle\Annotated\Annotation\Table\Index;
use Doctrine\Common\Annotations\Annotation\Attribute;
use Doctrine\Common\Annotations\Annotation\Attributes;
use Doctrine\Common\Annotations\Annotation\Target;
* @Annotation
* @Target({"CLASS", "ANNOTATION"})
* @Attributes({
* @Attribute("columns", type="array<Cycle\Annotated\Annotation\Column>"),
* @Attribute("indexes", type="array<Cycle\Annotated\Annotation\Table\Index>"),
* })
final class Table
{
/** @var array<Column> */
private $columns = [];
/** @var array<Index> */
private $indexes = [];
* @param array $values
public function __construct(array $values)
foreach ($values as $key => $value) {
$this->$key = $value;
}
* @return Column[]
public function getColumns(): array
return $this->columns;
* @return Index[]
public function getIndexes(): array
return $this->indexes;