Commune
in package
Uses
InseeTnccable, Geolocatable
Commune française.
Tags
Table of Contents
Properties
- $geoLat : mixed
- $geoLng : mixed
- $art : mixed
- $codes : mixed
- $departement : mixed
- $enabled : mixed
- $insee : mixed
- $nom : mixed
- $nom_maj : mixed
- $outre_mer : mixed
- $postal : mixed
- $tncc : mixed
- $tncc_articles : mixed
- $tncc_charnieres : mixed
- $type : mixed
- $version : mixed
Methods
- __construct() : mixed
- __toString() : mixed
- getArt() : string|null
- getArticle() : string
- Retourne l'article à employer avec le nom.
- getArtNom() : string
- Retourne le nom avec son éventuel article en préfixe.
- getCharniere() : string
- Retourne la charnière à employer avec le nom.
- getCodes() : string|null
- getDepartement() : Departement|null
- getEnabled() : bool|null
- getGeoLat() : float|null
- getGeoLng() : float|null
- getGeomap() : array<string|int, mixed>|string
- Retourne les coordonnées latitude;longitude pour le formulaire.
- getInsee() : string|null
- getNom() : string|null
- getNomArt() : string
- Retourne le nom avec son éventuel article en suffixe (entre parenthèses).
- getNomMaj() : string|null
- getOutreMer() : bool|null
- getPostal() : string|null
- getRegion() : Region|null
- getTncc() : int|null
- getType() : string|null
- getTypeNomClair() : int
- Alias du getter sur tncc.
- getVersion() : string|null
- parseGeomap() : array<string|int, mixed>|null
- Retourne un tableau {'lat','lng'} à partir de différents formats d'entrée.
- setArt() : self
- setDepartement() : self
- setEnabled() : self
- setGeoLat() : self
- setGeoLng() : self
- setGeomap() : Entity
- Enregistre les coordonnées latitude;longitude pour le formulaire.
- setInsee() : self
- setNom() : self
- setNomMaj() : self
- setOutreMer() : self
- setPostal() : self
- setTncc() : self
- setType() : self
- setTypeNomClair() : self
- Alias du setter sur tncc.
- setVersion() : self
- tnccArticle() : string
- Retourne l'article correspondant à un code TNCC.
- tnccCharniere() : string
- Retourne la charnière correspondant à un code TNCC.
Properties
$geoLat
protected
mixed
$geoLat
Tags
$geoLng
protected
mixed
$geoLng
Tags
$art
private
mixed
$art
Tags
$codes
private
mixed
$codes
Tags
$departement
private
mixed
$departement
Tags
$enabled
private
mixed
$enabled
Tags
$insee
private
mixed
$insee
Tags
$nom
private
mixed
$nom
Tags
$nom_maj
private
mixed
$nom_maj
Tags
$outre_mer
private
mixed
$outre_mer
Tags
$postal
private
mixed
$postal
Tags
$tncc
private
mixed
$tncc
Tags
$tncc_articles
private
mixed
$tncc_articles
= array("", "", "Le", "La", "Les", "L'", "Aux", "Las", "Los")
$tncc_charnieres
private
mixed
$tncc_charnieres
= array("de", "d'", "du", "de la", "des", "de l'", "des", "de Las", "de Los")
$type
private
mixed
$type
Tags
$version
private
mixed
$version
Tags
Methods
__construct()
public
__construct() : mixed
__toString()
public
__toString() : mixed
getArt()
public
getArt() : string|null
Return values
string|nullgetArticle()
Retourne l'article à employer avec le nom.
public
getArticle([bool $espace = false ][, bool $parentheses = false ]) : string
Parameters
- $espace : bool = false
- $parentheses : bool = false
Return values
stringgetArtNom()
Retourne le nom avec son éventuel article en préfixe.
public
getArtNom() : string
Return values
stringgetCharniere()
Retourne la charnière à employer avec le nom.
public
getCharniere([bool $espace = false ]) : string
Parameters
- $espace : bool = false
Return values
stringgetCodes()
public
getCodes() : string|null
Return values
string|nullgetDepartement()
public
getDepartement() : Departement|null
Return values
Departement|nullgetEnabled()
public
getEnabled() : bool|null
Return values
bool|nullgetGeoLat()
public
getGeoLat() : float|null
Return values
float|nullgetGeoLng()
public
getGeoLng() : float|null
Return values
float|nullgetGeomap()
Retourne les coordonnées latitude;longitude pour le formulaire.
public
getGeomap([bool|string $toString = false ]) : array<string|int, mixed>|string
Parameters
- $toString : bool|string = false
Return values
array<string|int, mixed>|stringgetInsee()
public
getInsee() : string|null
Return values
string|nullgetNom()
public
getNom() : string|null
Return values
string|nullgetNomArt()
Retourne le nom avec son éventuel article en suffixe (entre parenthèses).
public
getNomArt() : string
Return values
stringgetNomMaj()
public
getNomMaj() : string|null
Return values
string|nullgetOutreMer()
public
getOutreMer() : bool|null
Return values
bool|nullgetPostal()
public
getPostal() : string|null
Return values
string|nullgetRegion()
public
getRegion() : Region|null
Return values
Region|nullgetTncc()
public
getTncc() : int|null
Return values
int|nullgetType()
public
getType() : string|null
Return values
string|nullgetTypeNomClair()
Alias du getter sur tncc.
public
getTypeNomClair() : int
Return values
intgetVersion()
public
getVersion() : string|null
Return values
string|nullparseGeomap()
Retourne un tableau {'lat','lng'} à partir de différents formats d'entrée.
public
static parseGeomap(array<string|int, mixed>|string $latLng[, string $sep = null ]) : array<string|int, mixed>|null
Parameters
- $latLng : array<string|int, mixed>|string
-
Coordonnées à analyser (chaine concaténée ou tableau lat/lng)
- $sep : string = null
-
Caractère(s) séparateur si $latLng est une chaine (par défaut ';' et ',')
Return values
array<string|int, mixed>|null —Tableau avec les clés 'lat' & 'lng' (ou null si données non reconnues)
setArt()
public
setArt(string|null $art) : self
Parameters
- $art : string|null
Return values
selfsetDepartement()
public
setDepartement(Departement|null $departement) : self
Parameters
- $departement : Departement|null
Return values
selfsetEnabled()
public
setEnabled(bool $enabled) : self
Parameters
- $enabled : bool
Return values
selfsetGeoLat()
public
setGeoLat(float|null $geoLat) : self
Parameters
- $geoLat : float|null
Return values
selfsetGeoLng()
public
setGeoLng(float|null $geoLng) : self
Parameters
- $geoLng : float|null
Return values
selfsetGeomap()
Enregistre les coordonnées latitude;longitude pour le formulaire.
public
setGeomap(array<string|int, mixed>|string $latLng[, string $sep = null ]) : Entity
Parameters
- $latLng : array<string|int, mixed>|string
-
Coordonnées à enregistrer (chaine concaténée ou tableau lat/lng)
- $sep : string = null
-
Caractère(s) séparateur si $latLng est une chaine (par défaut ';' et ',')
Return values
EntitysetInsee()
public
setInsee(string $insee) : self
Parameters
- $insee : string
Return values
selfsetNom()
public
setNom(string $nom) : self
Parameters
- $nom : string
Return values
selfsetNomMaj()
public
setNomMaj(string $nom_maj) : self
Parameters
- $nom_maj : string
Return values
selfsetOutreMer()
public
setOutreMer(bool $outre_mer) : self
Parameters
- $outre_mer : bool
Return values
selfsetPostal()
public
setPostal(string|null $postal) : self
Parameters
- $postal : string|null
Return values
selfsetTncc()
public
setTncc(int|null $tncc) : self
Parameters
- $tncc : int|null
Return values
selfsetType()
public
setType(string $type) : self
Parameters
- $type : string
Return values
selfsetTypeNomClair()
Alias du setter sur tncc.
public
setTypeNomClair(int $tncc) : self
Parameters
- $tncc : int
Return values
selfsetVersion()
public
setVersion(string|null $version) : self
Parameters
- $version : string|null
Return values
selftnccArticle()
Retourne l'article correspondant à un code TNCC.
public
static tnccArticle(int $tncc) : string
Parameters
- $tncc : int
Return values
stringtnccCharniere()
Retourne la charnière correspondant à un code TNCC.
public
static tnccCharniere(int $tncc) : string
Parameters
- $tncc : int