Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Accounts
  • Actions
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CouponTerms
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • EmailVerifications
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • MessageGroups
  • Messages
  • MessengerManager
  • ModuleClientMeta
  • ModuleManager
  • ModuleTypes
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • ServiceInvoices
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • SystemEvents
  • Taxes
  • Themes
  • Transactions
  • Users
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Countries

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

Model
Extended by AppModel uses Blesta\Core\Util\Common\Traits\Container
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
The field to sort the list by
$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
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

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
The ISO 3166-1 alpha2 country code
$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
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
The ISO 3166-1 alpha3 country code to check for
$alpha2
The ISO 3166-1 alpha2 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 used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Properties inherited from AppModel
$logger, $replacement_keys
Blesta API documentation generated by ApiGen