Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AuthorCollection.php

class AuthorCollection

@template-implements IteratorAggregate<int,Author>

Hierarchy

  • class \PharIo\Manifest\AuthorCollection implements \Countable, \IteratorAggregate

Expanded class hierarchy of AuthorCollection

File

vendor/phar-io/manifest/src/values/AuthorCollection.php, line 18

Namespace

PharIo\Manifest
View source
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);
    }

}

Members

Title Sort descending Modifiers Object type Summary
AuthorCollection::$authors private property @var Author[]
AuthorCollection::add public function
AuthorCollection::count public function
AuthorCollection::getAuthors public function
AuthorCollection::getIterator public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal