You are here

public function advancedStringOverridesContext::offsetGet in String Overrides Advanced 7

(PHP 5 &gt;= 5.0.0)<br/> Offset to retrieve @link http://php.net/manual/en/arrayaccess.offsetget.php

Parameters

mixed $offset <p>: The offset to retrieve. </p>

Return value

mixed Can return all value types.

File

lib/advancedStringsContext.inc, line 91

Class

advancedStringOverridesContext

Code

public function offsetGet($offset) {

  // Ensure that we've loaded the strings from the cache.
  $this
    ->ensureCacheLoaded();

  // Either return the translated string, or the original offset.
  return $this->cachedStrings[$offset] !== FALSE ? $this->cachedStrings[$offset] : $offset;
}