You are here

function _potx_is_beginning_of_array in Translation template extractor 7.3

Same name and namespace in other branches
  1. 8 potx.inc \_potx_is_beginning_of_array()

Determines if processing an array.

Parameters

string|string[] $arr:

string|NULL $par:

Return value

int|FALSE The number to forward the current position forward to start processing the array. FALSE if not processing an array.

1 call to _potx_is_beginning_of_array()
_potx_find_context in ./potx.inc
Helper to find the value for 'context' on t() and format_plural().

File

./potx.inc, line 1348
Extraction API used by the web and command line interface.

Code

function _potx_is_beginning_of_array($arr, $par) {
  if ($arr === '[' && is_array($par)) {
    return 2;
  }
  if (is_array($arr) && $arr[1] == 'array' && $par == '(') {
    return 3;
  }
  return FALSE;
}