You are here

protected function StringDatabaseStorage::dbStringLoad in Localization update 7.2

Loads multiple string objects.

Parameters

array $conditions: Any of the conditions used by dbStringSelect().

array $options: Any of the options used by dbStringSelect().

string $class: Class name to use for fetching returned objects.

Return value

array Array of objects of the class requested.

2 calls to StringDatabaseStorage::dbStringLoad()
StringDatabaseStorage::getStrings in includes/locale/StringDatabaseStorage.php
Implements StringStorageInterface::getStrings().
StringDatabaseStorage::getTranslations in includes/locale/StringDatabaseStorage.php
Implements StringStorageInterface::getTranslations().

File

includes/locale/StringDatabaseStorage.php, line 260
Definition of StringDatabaseStorage.

Class

StringDatabaseStorage
Defines the locale string class.

Code

protected function dbStringLoad(array $conditions, array $options, $class) {
  $strings = array();
  $result = $this
    ->dbStringSelect($conditions, $options)
    ->execute();
  foreach ($result as $item) {
    $string = new $class($item);
    $string
      ->setStorage($this);
    $strings[] = $string;
  }
  return $strings;
}