You are here

private function lessc::merge in Less CSS Preprocessor 6

Same name and namespace in other branches
  1. 6.3 lessphp/lessc.inc.php \lessc::merge()
1 call to lessc::merge()
lessc::readChunk in ./lessc.inc.php

File

./lessc.inc.php, line 1027

Class

lessc

Code

private function merge($name, $value) {

  // if the current block isn't there then just set
  $top =& $this->env[count($this->env) - 1];
  if (!isset($top[$name])) {
    return $this
      ->set($name, $value);
  }

  // copy the block into the old one, including meta data
  foreach ($value as $k => $v) {

    // todo: merge property values instead of replacing
    // have to check type for this
    $top[$name][$k] = $v;
  }
}