public function setProperty($key, $value)
    {
        if(null === $this->properties)
        {
            $this->properties = array();
        }
        $key   = (string) $key;
        $value = (string) $value;

        $this->properties[$key] = $value;

        if((substr($key, 0, 5) == 'tree_') && $this->hasChildren())
        {
            foreach($this->children as $child)
            {
                if(!$child->hasProperty($key))
                {
                    $child->setProperty($key, $value);
                }
            }
        }
    }