예제 #1
0
 public function setOptions($options)
 {
     parent::setOptions($options);
     //Make sure the view model is available in the view
     $this->widget = $this;
     foreach ($options as $name => $value) {
         $this->{$name} = $value;
     }
 }
예제 #2
0
 public function testPassingAnInvalidArgumentToSetOptionsRaisesAnException()
 {
     $model = new ViewModel();
     $this->setExpectedException('Zend\\View\\Exception\\InvalidArgumentException', 'expects an array');
     $model->setOptions(new stdClass());
 }