PHP Class Webpatser\Countries\Countries

Inheritance: extends Jenssegers\Mongodb\Model
Afficher le fichier Open project: webpatser/laravel-countries Class Usage Examples

Protected Properties

Свойство Type Description
$countries string Path to the directory containing countries data.
$table string The table for the countries in the database, is "countries" by default.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
getCountries ( ) : array Get the countries from the JSON file, if it hasn't already been loaded.

Method Details

__construct() public méthode

Constructor.
public __construct ( ) : void
Résultat void

getCountries() protected méthode

Get the countries from the JSON file, if it hasn't already been loaded.
protected getCountries ( ) : array
Résultat array

getList() public méthode

Returns a list of countries
public getList ( $sort = null ) : array
Résultat array

getListForSelect() public méthode

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
Résultat array

getOne() public méthode

Returns one country
public getOne ( string $id ) : array
$id string The country id
Résultat array

Property Details

$countries protected_oe property

Path to the directory containing countries data.
protected string $countries
Résultat string

$table protected_oe property

The table for the countries in the database, is "countries" by default.
protected string $table
Résultat string