AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Traversables
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • Cookie
  • Cron
  • Curl
  • Email
  • Format
  • Handler
  • Locale
  • Profiler
  • Security
  • SFTP

Class Locale

Locale handler

Alo\Traversables\ArrayObjimplementsIteratorAggregate,ArrayAccess,Countable
Extended byAlo\Locale
Namespace:Alo
Author:Arturas Molcanovas <a.molcanovas@gmail.com>
Located atsys/class/alo/locale.php

Methods summary

public
#__construct(Alo\Db\AbstractDb& $db=null)

Instantiates the Locale handler

Instantiates the Locale handler

Parameters

$db
Alo\Db\AbstractDb
$db If not using Alo::$db you can supply the reference to the database connection here

Throws

Alo\Exception\LibraryException
If the above reference is not supplied and Alo::$db is not instantiated

Author

Art <a.molcanovas@gmail.com>

Overrides

Alo\Traversables\ArrayObj::__construct
public staticAlo\Locale
#locale(Alo\Db\AbstractDb& $db=null)

Instantiates the Locale handler

Instantiates the Locale handler

Parameters

$db
Alo\Db\AbstractDb
$db If not using Alo::$db you can supply the reference to the database connection here

Returns

Alo\Locale

Throws

Alo\Exception\LibraryException
If the above reference is not supplied and Alo::$db is not instantiated

Author

Art <a.molcanovas@gmail.com>
publicAlo\Locale
#fetch(array$pages=null,string$primaryLocale=null,string$secondaryLocale=null)

Performs a locale fetch

Performs a locale fetch

Parameters

$pages
array
$pages Pages to fetch.
$primaryLocale
string
$primaryLocale The main locale - will be used as a fallback if a string is unavailable for the secondary locale
$secondaryLocale
string
$secondaryLocale If you're fetching for the secondary locale, input it here.

Returns

Alo\Locale

Author

Art <a.molcanovas@gmail.com>
protected
#fetchTwo(array$pages,string$primaryLocale,string$secondaryLocale)

Fetches a raw dual-locale resultset (primary being a fallback)

Fetches a raw dual-locale resultset (primary being a fallback)

Parameters

$pages
array
$pages Pages to fetch
$primaryLocale
string
$primaryLocale The primary locale
$secondaryLocale
string
$secondaryLocale The secondary locale

Author

Art <a.molcanovas@gmail.com>
protected
#fetchOne(array$pages,string$locale)

Fetches a raw single-locale resultset

Fetches a raw single-locale resultset

Parameters

$pages
array
$pages pages to fetch
$locale
string
$locale Locale to fetch

Author

Art <a.molcanovas@gmail.com>
protectedAlo\Locale
#formatRaw( )

Formats raw data

Formats raw data

Returns

Alo\Locale

Author

Art <a.molcanovas@gmail.com>
public array
#getAll( )

Returns the fetched locale array

Returns the fetched locale array

Returns

array

Author

Art <a.molcanovas@gmail.com>

Methods inherited fromAlo\Traversables\ArrayObj

__get(),__set(),count(),getIterator(),offsetExists(),offsetGet(),offsetSet(),offsetUnset(),toArray()

Magic methods summary

Properties summary

public staticAlo\Locale$this
#

Static reference to the last instance of this class

Static reference to the last instance of this class

protected static array$querySettings
#

prepQuery settings

prepQuery settings

protectedAlo\Db\AbstractDb$db
#

Reference to the database connection

Reference to the database connection

protected array$raw
#

Raw fetched array

Raw fetched array

protected boolean$firstFetchDone
#

Whether the initial fetch has been done

Whether the initial fetch has been done

Properties inherited fromAlo\Traversables\ArrayObj

$data

AloFramework documentation API documentation generated byApiGen 2.8.0