Exemple #1
0
 /**
  * Override offsetSet
  * 
  * @param  string|int $index 
  * @param  mixed $value 
  * @return void
  */
 public function offsetSet($index, $value)
 {
     if (!$this->_isValid($value)) {
         require_once 'Zend/View/Exception.php';
         throw new Zend_View_Exception('Invalid argument passed to offsetSet(); please use one of the helper methods, offsetSetScript() or offsetSetFile()');
     }
     $this->_isValid($value);
     return parent::offsetSet($index, $value);
 }
Exemple #2
0
 /**
  * Override offsetSet to enforce style creation
  * 
  * @param  string|int $index
  * @param  mixed $value 
  * @return void
  */
 public function offsetSet($index, $value)
 {
     if (!$this->_isValid($value)) {
         require_once 'Zend/View/Exception.php';
         throw new Zend_View_Exception('Invalid value passed to offsetSet; please use offsetSetStyle()');
     }
     return parent::offsetSet($index, $value);
 }
Exemple #3
0
 /**
  * offsetSet()
  * 
  * @param  string|int $index 
  * @param  array $value 
  * @return void
  */
 public function offsetSet($index, $value)
 {
     if (!$this->_isValid($value)) {
         require_once 'Zend/View/Exception.php';
         throw new Zend_View_Exception('offsetSet() expects a data token; please use one of the custom offsetSet*() methods');
     }
     return parent::offsetSet($index, $value);
 }