PHP Класс Webpatser\Countries\Countries

Наследование: extends Jenssegers\Mongodb\Model
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$countries string Path to the directory containing countries data.
$table string The table for the countries in the database, is "countries" by default.

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

Метод Описание
__construct ( ) : void Constructor.
getList ( $sort = null ) : array Returns a list of countries
getListForSelect ( $display = 'name' ) : array Returns a list of countries suitable to use with a select element in Laravelcollective\html Will show the value and sort by the column specified in the display attribute
getOne ( string $id ) : array Returns one country

Защищенные методы

Метод Описание
getCountries ( ) : array Get the countries from the JSON file, if it hasn't already been loaded.

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

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

Constructor.
public __construct ( ) : void
Результат void

getCountries() защищенный Метод

Get the countries from the JSON file, if it hasn't already been loaded.
protected getCountries ( ) : array
Результат array

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

Returns a list of countries
public getList ( $sort = null ) : array
Результат array

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

Returns a list of countries suitable to use with a select element in Laravelcollective\html Will show the value and sort by the column specified in the display attribute
public getListForSelect ( $display = 'name' ) : array
Результат array

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

Returns one country
public getOne ( string $id ) : array
$id string The country id
Результат array

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

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

Path to the directory containing countries data.
protected string $countries
Результат string

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

The table for the countries in the database, is "countries" by default.
protected string $table
Результат string