LiquidContext::merge PHP Method

merge() public method

Merges the given assigns into the current assigns
public merge ( array $newAssigns )
$newAssigns array
    public function merge($newAssigns)
    {
        $this->_assigns[0] = array_merge($this->_assigns[0], $newAssigns);
    }

Usage Example

Ejemplo n.º 1
0
 function test_cents_through_drop_nestedly()
 {
     $this->context->merge(array('cents' => array('cents' => new CentsDrop())));
     $this->assertEqual(100, $this->context->get('cents.cents.amount'));
     $this->context->merge(array('cents' => array('cents' => array('cents' => new CentsDrop()))));
     $this->assertEqual(100, $this->context->get('cents.cents.cents.amount'));
 }