Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • Accounts
  • ApiKeys
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • ModuleClientMeta
  • ModuleManager
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • Taxes
  • Themes
  • Transactions
  • Users

Class Countries

Countries adhere to ISO 3166-1 and contain English and native country name (when differing from English)

Model
Extended by AppModel
Extended by Countries
Package: blesta\app\models
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/countries.php

Methods summary

public
# __construct( )

Initialize Countries

Initialize Countries

Overrides

AppModel::__construct
public mixed
# getList( string $sort_by = "name", string $order = "asc" )

List all countries

List all countries

Parameters

$sort_by
string
$sort_by The field to sort the list by
$order
string
$order The order to sort (acs, desc)

Returns

mixed
An array of stdClass country objects, false if no records found
public mixed
# get( string $code )

Get a specific country based ISO 3166-1 alpha2 or alpha3

Get a specific country based ISO 3166-1 alpha2 or alpha3

Parameters

$code
string
$code The ISO 3166-1 alpha2 or alpha3 country code to search on

Returns

mixed
A stdClass country object, false if no record found
public
# add( array $vars )

Add a country

Add a country

Parameters

$vars
array
$vars An array of variable info, including -alpha2 The ISO 3166-1 alpha2 country code -alpha3 The ISO 3166-1 alpha3 country code -name The english country name -alt_name The native language country name (optional)
public
# edit( string $alpha2, array $vars )

Edit a country by the ISO 3166-1 alpha2 code

Edit a country by the ISO 3166-1 alpha2 code

Parameters

$alpha2
string
$alpha2 The ISO 3166-1 alpha2 country code
$vars
array
$vars An array of variable info, including -alpha3 The ISO 3166-1 alpha3 country code -name The english country name -alt_name The native language country name (optional)
public
# delete( string $code )

Delete a country by the ISO 3166-1 alpha2 or alpha3 code

Delete a country by the ISO 3166-1 alpha2 or alpha3 code

Parameters

$code
string
$code The ISO 3166-1 alpha2 or alpha3 country code to delete
public boolean
# validateAlpha3InUse( string $alpha3, string $alpha2 )

Validates that the given alpha3 character code for a country is already in use

Validates that the given alpha3 character code for a country is already in use

Parameters

$alpha3
string
$alpha3 The ISO 3166-1 alpha3 country code to check for
$alpha2
string
$allow_alpha3 The ISO 3166-1 alpha3 country code to ignore if it happens to match $alpha3

Returns

boolean
True if the alpha3 country code is already taken

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()

Magic methods summary

Properties summary

Properties inherited from AppModel

$replacement_keys

Blesta API documentation generated by ApiGen 2.8.0