Page MenuHomeWickedGov Phorge

AuthorCollection.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

AuthorCollection.php

<?php declare(strict_types = 1);
/*
* This file is part of PharIo\Manifest.
*
* Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PharIo\Manifest;
use Countable;
use IteratorAggregate;
use function count;
/** @template-implements IteratorAggregate<int,Author> */
class AuthorCollection implements Countable, IteratorAggregate {
/** @var Author[] */
private $authors = [];
public function add(Author $author): void {
$this->authors[] = $author;
}
/**
* @return Author[]
*/
public function getAuthors(): array {
return $this->authors;
}
public function count(): int {
return count($this->authors);
}
public function getIterator(): AuthorCollectionIterator {
return new AuthorCollectionIterator($this);
}
}

File Metadata

Mime Type
text/x-php
Expires
Oct 4 2026, 17:51 (5 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
29/64/741718c86ae16f5162c1b4a6aab9
Default Alt Text
AuthorCollection.php (1 KB)

Event Timeline