Ну вообще-то можно было бы посмотреть в родительский класс, как это там реализовано:
class CComponent
{
private $_e;
private $_m;
/**
* Returns a property value, an event handler list or a behavior based on its name.
* Do not call this method. This is a PHP magic method that we override
* to allow using the following syntax to read a property or obtain event handlers:
* <pre>
* $value=$component->propertyName;
* $handlers=$component->eventName;
* </pre>
* @param string the property name or event name
* @return mixed the property value, event handlers attached to the event, or the named behavior (since version 1.0.2)
* @throws CException if the property or event is not defined
* @see __set
*/
public function __get($name)
{
$getter='get'.$name;
if(method_exists($this,$getter))
return $this->$getter();
else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
// duplicating getEventHandlers() here for performance
$name=strtolower($name);
if(!isset($this->_e[$name]))
$this->_e[$name]=new CList;
return $this->_e[$name];
}
else if(isset($this->_m[$name]))
return $this->_m[$name];
else
throw new CException(Yii::t('yii','Property "{class}.{property}" is not defined.',
array('{class}'=>get_class($this), '{property}'=>$name)));
}
/**
* Sets value of a component property.
* Do not call this method. This is a PHP magic method that we override
* to allow using the following syntax to set a property or attach an event handler
* <pre>
* $this->propertyName=$value;
* $this->eventName=$callback;
* </pre>
* @param string the property name or the event name
* @param mixed the property value or callback
* @throws CException if the property/event is not defined or the property is read only.
* @see __get
*/
public function __set($name,$value)
{
$setter='set'.$name;
if(method_exists($this,$setter))
$this->$setter($value);
else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
// duplicating getEventHandlers() here for performance
$name=strtolower($name);
if(!isset($this->_e[$name]))
$this->_e[$name]=new CList;
$this->_e[$name]->add($value);
}
else if(method_exists($this,'get'.$name))
throw new CException(Yii::t('yii','Property "{class}.{property}" is read only.',
array('{class}'=>get_class($this), '{property}'=>$name)));
else
throw new CException(Yii::t('yii','Property "{class}.{property}" is not defined.',
array('{class}'=>get_class($this), '{property}'=>$name)));
}
.....
}
Если перегружать так, как этот делаешь ты, то теряется куча функционала компонента.
Ошибка проиходит потому, что если ВНИМАТЕЛЬНО посмотреть на строку 17, то увидим:
print_r($this->zones);
Тебе, вообще-то, об этом и пишут - вывод начат на строке 17. Закомментируй и будет тебе счастье.
А вообще-то таким подходом ты убиваешь идею фреймворка - практически весь удобный функционал компонента. Подумай, может можно как-то обойтись без этого?