Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Accounts
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • ModuleManager
  • Navigation
  • PackageGroups
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • 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
private array
# getRules( array $vars )

Returns the rules for adding/editing countries

Returns the rules for adding/editing countries

Parameters

$vars
array
$vars The key/value pairs used for language replacement

Returns

array
The rules

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