PHP Класс Pantheon\Terminus\Collections\Sites

Наследование: extends TerminusCollection, implements Pantheon\Terminus\Session\SessionAwareInterface, use trait Pantheon\Terminus\Session\SessionAwareTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$collected_class string

Открытые методы

Метод Описание
__construct ( array $options = [] ) : Sites Instantiates the collection, sets param members as properties
all ( ) : Site[] Retrieves all sites
create ( string[] $params = [] ) : Workflow Creates a new site
createForMigration ( string[] $params = [] ) : Workflow Creates a new site for migration
fetch ( array $arg_options = [] ) : Sites Fetches model data from API and instantiates its model instances
filterByName ( string $regex = '(.*)' ) : Sites Filters an array of sites by whether the user is an organizational member
filterByOwner ( string $owner_uuid ) : Sites Filters an array of sites by whether the user is an organizational member
filterByTag ( string $tag ) : Sites Filters sites list by tag
findUuidByName ( string $name ) : string Looks up a site's UUID by its name.
get ( string $id ) : Site Retrieves the site of the given UUID or name
nameIsTaken ( string $name ) : boolean Determines whether a given site name is taken or not.

Описание методов

__construct() публичный Метод

Instantiates the collection, sets param members as properties
public __construct ( array $options = [] ) : Sites
$options array To be set to $this->key
Результат Sites

all() публичный Метод

Retrieves all sites
public all ( ) : Site[]
Результат Site[]

create() публичный Метод

Creates a new site
public create ( string[] $params = [] ) : Workflow
$params string[] Options for the new site, elements as follow: string label The site's human-friendly name string site_name The site's name string organization_id Organization to which this site belongs' UUID
Результат Workflow

createForMigration() публичный Метод

Creates a new site for migration
public createForMigration ( string[] $params = [] ) : Workflow
$params string[] Options for the new site, elements as follow: string label The site's human-friendly name string site_name The site's name string organization_id Organization to which this site belongs' UUID string type Workflow type for imports
Результат Workflow

fetch() публичный Метод

Fetches model data from API and instantiates its model instances
public fetch ( array $arg_options = [] ) : Sites
$arg_options array Options to change the requests made. Elements as follow: string org_id UUID of the organization to retrieve sites for boolean team_only True to only retrieve team sites
Результат Sites

filterByName() публичный Метод

Filters an array of sites by whether the user is an organizational member
public filterByName ( string $regex = '(.*)' ) : Sites
$regex string Non-delimited PHP regex to filter site names by
Результат Sites

filterByOwner() публичный Метод

Filters an array of sites by whether the user is an organizational member
public filterByOwner ( string $owner_uuid ) : Sites
$owner_uuid string UUID of the owning user to filter by
Результат Sites

filterByTag() публичный Метод

Filters sites list by tag
public filterByTag ( string $tag ) : Sites
$tag string A tag to filter by
Результат Sites

findUuidByName() публичный Метод

Looks up a site's UUID by its name.
public findUuidByName ( string $name ) : string
$name string Name of the site to look up
Результат string

get() публичный Метод

Retrieves the site of the given UUID or name
public get ( string $id ) : Site
$id string UUID or name of desired site
Результат Site

nameIsTaken() публичный Метод

Determines whether a given site name is taken or not.
public nameIsTaken ( string $name ) : boolean
$name string Name of the site to look up
Результат boolean

Описание свойств

$collected_class защищенное свойство

protected string $collected_class
Результат string