Class States
States adhere to ISO 3166-2, and contain the native state/province/territory name. The format of ISO 3166-2 is [ISO 3166-1 alpha2 country code]-[subdivision code]. This model requires that the ISO 3166-2 code be split on the hyphen into its two parts.
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/states.php
Methods summary
public
|
|
public
array
|
#
getList( string $country = null, string $sort_by = "name", string $order = "asc" )
List all states for a given country (ISO 3166-1 alpha2) |
public
mixed
|
#
get( string $country, string $code )
Get a specific state/province/territory based ISO 3166-1 alpha2 country code and ISO 3166-2 subdivision code |
public
|
|
public
|
#
edit( string $country, string $code, array $vars )
Edit a state by the ISO 3166-1 alpha2 country code and 3166-2 subdivision code |
public
|
#
delete( string $country, string $code )
Delete a state by the ISO 3166-1 alpha2 country code and 3166-2 subdivision code |
private
array
|
Methods inherited from AppModel
_(),
boolToInt(),
currencyToDecimal(),
dateToUtc(),
errors(),
getPerPage(),
ifSet(),
loadCrypto(),
setDefaultIfEmpty(),
setPerPage(),
setRulesIfSet(),
strToBool(),
systemDecrypt(),
systemEncrypt(),
systemHash(),
truncateDecimal(),
validateExists(),
validateStateCountry()
Methods inherited from Model
affectedRows(),
begin(),
commit(),
getConnection(),
lastInsertId(),
makeDSN(),
prepare(),
query(),
rollBack(),
setAttribute(),
setFetchMode()