public function setHead(THead $value) { if ($this->_head) { throw new TInvalidOperationException('page_head_duplicated'); } $this->_head = $value; if ($this->_title !== null) { $this->_head->setTitle($this->_title); $this->_title = null; } }