Exemplo n.º 1
0
 /**
  * Get the markup name
  *
  * @param Zend_Markup_Token
  *
  * @return string
  */
 protected function _getMarkupName(Zend_Markup_Token $token)
 {
     $name = $token->getName();
     if (empty($name)) {
         return false;
     }
     return $this->_resolveMarkupName($name);
 }
 /**
  * Check if a tag is a stopper
  *
  * @param array $token
  * @param Zend_Markup_Token $current
  *
  * @return bool
  */
 protected function _isStopper(array $token, Zend_Markup_Token $current)
 {
     switch ($current->getName()) {
         case 'h1':
         case 'h2':
         case 'h3':
         case 'h4':
         case 'h5':
         case 'h6':
         case 'list':
         case 'li':
             if ($token['type'] == Zend_Markup_Token::TYPE_TAG && ($token['name'] == 'break' || $token['name'] == 'p')) {
                 return true;
             }
             break;
         case 'break':
             return false;
             break;
         default:
             if ($token['type'] == Zend_Markup_Token::TYPE_TAG && $token['name'] == $current->getName()) {
                 return true;
             }
             break;
     }
     return false;
 }
 /**
  * Remove from searched stoppers
  *
  * @param  Zend_Markup_Token $token
  * @return void
  */
 protected function _removeFromSearchedStoppers(Zend_Markup_Token $token)
 {
     $this->_checkTagDeclaration($token->getName());
     foreach ($this->_tags[$token->getName()]['stoppers'] as $stopper) {
         --$this->_searchedStoppers[$stopper];
     }
 }