public function __construct($namespace, $elem, $parent)
 {
     parent::__construct($elem, $parent);
     $class = strtolower(get_class($this));
     $this->meta->name = substr($class, strrpos($class, '\\') + 1);
     $this->meta->namespace = $namespace;
     /*
      * Object will has attributes as property
      */
     foreach ($this->meta->attributes as $key => $value) {
         $annotations = Annotations::ofProperty($this, $key);
         $propertyType = self::SIMPLE_PROPERTY;
         foreach ($annotations as $annotation) {
             if (get_class($annotation) == 'Annotation\\Standard\\MethodAnnotation') {
                 $propertyType = self::METHOD_PROPERTY;
                 break;
             }
             if (get_class($annotation) == 'Annotation\\Standard\\BindingAnnotation') {
                 $propertyType = self::BINDING_PROPERTY;
                 break;
             }
         }
         switch ($propertyType) {
             case self::METHOD_PROPERTY:
                 $val = $this->evaluateZXAsMethod($value, $this);
                 break;
             case self::BINDING_PROPERTY:
                 $val = $this->bindValue($value, $this);
                 break;
             case self::SIMPLE_PROPERTY:
             default:
                 $val = $this->evaluateZX($value, $this);
                 break;
         }
         $this->{$key} = $val;
         unset($val);
     }
     $this->meta->attributes = array();
     $this->init();
 }
 protected function preRenderChildren()
 {
     // must reset before filling
     $this->renderedChildren = array();
     if (is_array($this->children)) {
         foreach ($this->children as $child) {
             if (is_string($child)) {
                 $this->renderedChildren[] = $this->evaluateZX($child);
             } else {
                 $childElem = new ZXmlElement($child, $this);
                 $rendered = $childElem->render();
                 $this->renderedChildren[] = $rendered;
             }
         }
     }
 }