You are here

protected function D3LibraryInfoProcessor::processValues in d3.js 7

Sub function to start a recursive process.

Parameters

$values: An array row that is being currently looped through.

See also

D3LibraryInfoController::process().

1 call to D3LibraryInfoProcessor::processValues()
D3LibraryInfoProcessor::process in includes/D3LibraryInfoProcessor.inc
Main function to process the info file for the current keys.

File

includes/D3LibraryInfoProcessor.inc, line 90
D3 .info file processor class.

Class

D3LibraryInfoProcessor
Parse additional information from library .info files.

Code

protected function processValues(&$values, $depth = 0) {

  // If this is a special string.
  if (!is_array($values) && trim($values) != $this
    ->trim($values)) {
    $values = $this
      ->parseSpecialString($values);

    // Process meta keys once the special thing is parsed out.
    $this
      ->processMeta($values);
  }
  elseif (is_string($values)) {

    // If this is a normal string, only check to see if it's a file name.
    $this
      ->processFile($values);
  }
  elseif (is_array($values)) {

    // This is an array, process this recursively.
    foreach ($values as $index => &$data) {
      $this
        ->setKey($index, $depth + 1);
      $this
        ->processValues($data, $depth + 1);
    }

    // Process meta values.
    $this
      ->processMeta($values);
  }
}