PHP Интерфейс CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
get ( string $code, array $parents ) : Subdivision | null Returns a subdivision instance matching the provided code and parents.
getAll ( array $parents ) : Subdivision[] Returns all subdivision instances for the provided parents.
getList ( array $parents, string $locale = null ) : array Returns a list of subdivisions for the provided parents.

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

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

Returns a subdivision instance matching the provided code and parents.
public get ( string $code, array $parents ) : Subdivision | null
$code string The subdivision code.
$parents array The parents (country code, subdivision codes).
Результат Subdivision | null The subdivision instance, if found.

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

Returns all subdivision instances for the provided parents.
public getAll ( array $parents ) : Subdivision[]
$parents array The parents (country code, subdivision codes).
Результат Subdivision[] An array of subdivision instances.

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

Returns a list of subdivisions for the provided parents.
public getList ( array $parents, string $locale = null ) : array
$parents array The parents (country code, subdivision codes).
$locale string The locale (e.g. fr-FR).
Результат array An array of subdivision names, keyed by code.