Sets the content tags used for the compiler.

@deprecated This feature was removed from Laravel (https://github.com/laravel/framework/issues/17736)

@param  string  $openTag
@param  string  $closeTag
@param  bool    $escaped
@return void
961685
public function setRawTags($openTag, $closeTag, $escaped = true)
    {
        $this->rawTags = [preg_quote($openTag), preg_quote($closeTag)];
    }
1134185
protected function _tag_open_PAGE($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }
        if (!is_null($this->debug)) {
            $this->debug->addStep('PAGE '.($this->_page+1), true);
        }

        $newPageSet= (!isset($param['pageset']) || $param['pageset'] !== 'old');

        $resetPageNumber = (isset($param['pagegroup']) && $param['pagegroup'] === 'new');

        if (array_key_exists('hideheader', $param) && $param['hideheader'] !== 'false' && !empty($param['hideheader'])) {
            $this->_hideHeader = (array) array_merge($this->_hideHeader, explode(',', $param['hideheader']));
        }

        if (array_key_exists('hidefooter', $param) && $param['hidefooter'] !== 'false' && !empty($param['hidefooter'])) {
            $this->_hideFooter = (array) array_merge($this->_hideFooter, explode(',', $param['hidefooter']));
        }

        $this->_maxH = 0;

        // if new page set asked
        if ($newPageSet) {
            $this->_subHEADER = array();
            $this->_subFOOTER = array();

            // orientation
            $orientation = '';
            if (isset($param['orientation'])) {
                $param['orientation'] = strtolower($param['orientation']);
                if ($param['orientation'] === 'p') {
                    $orientation = 'P';
                }
                if ($param['orientation'] === 'portrait') {
                    $orientation = 'P';
                }

                if ($param['orientation'] === 'l') {
                    $orientation = 'L';
                }
                if ($param['orientation'] === 'paysage') {
                    $orientation = 'L';
                }
                if ($param['orientation'] === 'landscape') {
                    $orientation = 'L';
                }
            }

            // format
            $format = null;
            if (isset($param['format'])) {
                $format = (string) $param['format'];
                if (preg_match('/^([0-9]+)x([0-9]+)$/isU', $format, $match)) {
                    $format = array((int)$match[1], (int)$match[2]);
                }
            }

            // background
            $background = array();
            if (isset($param['backimg'])) {
                $background['img']    = isset($param['backimg'])  ? $param['backimg']  : '';       // src of the image
                $background['posX']   = isset($param['backimgx']) ? $param['backimgx'] : 'center'; // horizontal position of the image
                $background['posY']   = isset($param['backimgy']) ? $param['backimgy'] : 'middle'; // vertical position of the image
                $background['width']  = isset($param['backimgw']) ? $param['backimgw'] : '100%';   // width of the image (100% = page width)

                // convert the src of the image, if parameters
                $background['img'] = str_replace('&amp;', '&', $background['img']);

                // convert the positions
                if ($background['posX'] === 'left') {
                    $background['posX'] = '0%';
                }
                if ($background['posX'] === 'center') {
                    $background['posX'] = '50%';
                }
                if ($background['posX'] === 'right') {
                    $background['posX'] = '100%';
                }
                if ($background['posY'] === 'top') {
                    $background['posY'] = '0%';
                }
                if ($background['posY'] === 'middle') {
                    $background['posY'] = '50%';
                }
                if ($background['posY'] === 'bottom') {
                    $background['posY'] = '100%';
                }

                if ($background['img']) {
                    // get the size of the image
                    // WARNING : if URL, "allow_url_fopen" must turned to "on" in php.ini
                    $infos=@getimagesize($background['img']);
                    if (is_array($infos) && count($infos)>1) {
                        $background['img'] = [
                            'file'   => $background['img'],
                            'width'  => (int) $infos[0],
                            'height' => (int) $infos[1]
                        ];
                    } else {
                        $background = array();
                    }
                } else {
                    $background = array();
                }
            }

            // margins of the page
            $background['top']    = isset($param['backtop'])    ? $param['backtop']    : '0';
            $background['bottom'] = isset($param['backbottom']) ? $param['backbottom'] : '0';
            $background['left']   = isset($param['backleft'])   ? $param['backleft']   : '0';
            $background['right']  = isset($param['backright'])  ? $param['backright']  : '0';

            // if no unit => mm
            if (preg_match('/^([0-9]*)$/isU', $background['top'])) {
                $background['top']    .= 'mm';
            }
            if (preg_match('/^([0-9]*)$/isU', $background['bottom'])) {
                $background['bottom'] .= 'mm';
            }
            if (preg_match('/^([0-9]*)$/isU', $background['left'])) {
                $background['left']   .= 'mm';
            }
            if (preg_match('/^([0-9]*)$/isU', $background['right'])) {
                $background['right']  .= 'mm';
            }

            // convert to mm
            $background['top']    = $this->cssConverter->convertToMM($background['top'], $this->pdf->getH());
            $background['bottom'] = $this->cssConverter->convertToMM($background['bottom'], $this->pdf->getH());
            $background['left']   = $this->cssConverter->convertToMM($background['left'], $this->pdf->getW());
            $background['right']  = $this->cssConverter->convertToMM($background['right'], $this->pdf->getW());

            // get the background color
            $res = false;
            $background['color'] = isset($param['backcolor']) ? $this->cssConverter->convertToColor($param['backcolor'], $res) : null;
            if (!$res) {
                $background['color'] = null;
            }

            $this->parsingCss->save();
            $this->parsingCss->analyse('PAGE', $param);
            $this->parsingCss->setPosition();
            $this->parsingCss->fontSet();

            // new page
            $this->_setNewPage($format, $orientation, $background, null, $resetPageNumber);

            // automatic footer
            if (isset($param['footer'])) {
                $lst = explode(';', $param['footer']);
                foreach ($lst as $key => $val) {
                    $lst[$key] = trim(strtolower($val));
                }
                $page    = in_array('page', $lst);
                $date    = in_array('date', $lst);
                $time    = in_array('time', $lst);
                $form    = in_array('form', $lst);
            } else {
                $page    = null;
                $date    = null;
                $time    = null;
                $form    = null;
            }
            $this->pdf->SetMyFooter($page, $date, $time, $form);
        // else => we use the last page set used
        } else {
            $this->parsingCss->save();
            $this->parsingCss->analyse('PAGE', $param);
            $this->parsingCss->setPosition();
            $this->parsingCss->fontSet();

            $this->_setNewPage(null, null, null, null, $resetPageNumber);
        }

        return true;
    }
532282
public static function tags( $element, $attribs = null, $contents ) {
		return self::openElement( $element, $attribs ) . $contents . "</$element>";
	}
822932
protected function element($tag, $contents, $attr = array(), $escape = true)
    {
        return $this->start($tag, $attr) .
            ($escape ? $this->escape($contents) : $contents) .
            $this->end($tag);
    }
658513
public function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $eZTags = eZTags::createFromAttribute( $originalContentObjectAttribute, $contentObjectAttribute->attribute( 'language_code' ) );
            $eZTags->store( $contentObjectAttribute );
        }
    }
693395
public static function filterTag(Tag $tag, Parser $parser, array $tagsConfig, array $openTags)
	{
		$tagName   = $tag->getName();
		$tagConfig = $tagsConfig[$tagName];

		// Record the tag being processed into the logger it can be added to the context of
		// messages logged during the execution
		$logger = $parser->getLogger();
		$logger->setTag($tag);

		// Prepare the variables that are accessible to filters
		$vars = [
			'logger'         => $logger,
			'openTags'       => $openTags,
			'parser'         => $parser,
			'registeredVars' => $parser->registeredVars,
			'tag'            => $tag,
			'tagConfig'      => $tagConfig,
			'text'           => $parser->getText()
		];
		foreach ($tagConfig['filterChain'] as $filter)
		{
			if ($tag->isInvalid())
			{
				break;
			}
			self::executeFilter($filter, $vars);
		}

		// Remove the tag from the logger
		$logger->unsetTag();
	}
655303
protected function setTagsContext()
    {
        $objectManager = Bootstrap::$staticObjectManager;
        $environment = $objectManager->get(Environment::class);

        $tags = [
            'php_version' => phpversion(),
            'flow_context' => (string)$environment->getContext(),
            'flow_version' => FLOW_VERSION_BRANCH
        ];

        $this->client->tags_context($tags);
    }
552311
public static function run($script, $openTag, $closeChar, $phpFunc, $phpClose)
    {
        return self::open($script, $openTag, $closeChar, $phpFunc, $phpClose);
    }
518223
private function tag_open($tag, $attrs)
	{
		if($this->current_tag instanceof Node_Container_Tag)
		{
			$closing_tags = $this->bbcodes[$this->current_tag->tag()]->closing_tags();

			if(in_array($tag, $closing_tags))
				$this->tag_close($this->current_tag->tag());
		}

		if($this->current_tag instanceof Node_Container_Tag)
		{
			$accepted_children = $this->bbcodes[$this->current_tag->tag()]->accepted_children();

			if(!empty($accepted_children) && !in_array($tag, $accepted_children))
				return false;

			if($this->throw_errors && !$this->bbcodes[$tag]->is_inline()
				&& $this->bbcodes[$this->current_tag->tag()]->is_inline())
				throw new Exception_InvalidNesting("Block level tag [{$tag}] was opened within an inline tag [{$this->current_tag->tag()}]");
		}

		$node = new Node_Container_Tag($tag, $attrs);
		$this->current_tag->add_child($node);

		if(!$this->bbcodes[$tag]->is_self_closing())
			$this->current_tag = $node;

		return true;
	}
418815
function _tag_open( &$parser, $tag, $attributes ) {
		$this->currentElement = strtoupper( $tag );

		switch( $this->currentElement ) {
			case 'QUERY':
				// Create a new query in a SQL queryset.
				// Ignore this query set if a platform is specified and it's different than the
				// current connection platform.
				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
					$this->newQuery();
				} else {
					$this->discardQuery();
				}
				break;
			default:
				// print_r( array( $tag, $attributes ) );
		}
	}
1361736
protected function _tag_open_OPTION($param)
    {
        // get the content of the option : it is the text of the option
        $level = $this->parsingHtml->getLevel($this->_parsePos);
        $this->_parsePos+= count($level);
        $value = isset($param['value']) ? $param['value'] : 'aut_tag_open_opt_'.(count($this->_lstSelect)+1);

        $this->_lstSelect['options'][$value] = $level[0]->getParam('txt', '');

        return true;
    }
501031
protected function _tag_open_DRAW($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }
        if (!is_null($this->debug)) {
            $this->debug->addStep('DRAW', true);
        }

        $this->parsingCss->save();
        $this->parsingCss->analyse('draw', $param);
        $this->parsingCss->fontSet();

        $alignObject = null;
        if ($this->parsingCss->value['margin-auto']) {
            $alignObject = 'center';
        }

        $overW = $this->parsingCss->value['width'];
        $overH = $this->parsingCss->value['height'];
        $this->parsingCss->value['old_maxX'] = $this->_maxX;
        $this->parsingCss->value['old_maxY'] = $this->_maxY;
        $this->parsingCss->value['old_maxH'] = $this->_maxH;

        $w = $this->parsingCss->value['width'];
        $h = $this->parsingCss->value['height'];

        if (!$this->parsingCss->value['position']) {
            if ($w < ($this->pdf->getW() - $this->pdf->getlMargin()-$this->pdf->getrMargin()) &&
                $this->pdf->GetX() + $w>=($this->pdf->getW() - $this->pdf->getrMargin())
                ) {
                $this->_tag_open_BR(array());
            }

            if (($h < ($this->pdf->getH() - $this->pdf->gettMargin()-$this->pdf->getbMargin())) &&
                    ($this->pdf->GetY() + $h>=($this->pdf->getH() - $this->pdf->getbMargin())) &&
                    !$this->_isInOverflow
                ) {
                $this->_setNewPage();
            }

            $old = $this->parsingCss->getOldValues();
            $parentWidth = $old['width'] ? $old['width'] : $this->pdf->getW() - $this->pdf->getlMargin() - $this->pdf->getrMargin();

            if ($parentWidth>$w) {
                if ($alignObject === 'center') {
                    $this->pdf->SetX($this->pdf->GetX() + ($parentWidth-$w)*0.5);
                } elseif ($alignObject === 'right') {
                    $this->pdf->SetX($this->pdf->GetX() + $parentWidth-$w);
                }
            }

            $this->parsingCss->setPosition();
        } else {
            $old = $this->parsingCss->getOldValues();
            $parentWidth = $old['width'] ? $old['width'] : $this->pdf->getW() - $this->pdf->getlMargin() - $this->pdf->getrMargin();

            if ($parentWidth>$w) {
                if ($alignObject === 'center') {
                    $this->pdf->SetX($this->pdf->GetX() + ($parentWidth-$w)*0.5);
                } elseif ($alignObject === 'right') {
                    $this->pdf->SetX($this->pdf->GetX() + $parentWidth-$w);
                }
            }

            $this->parsingCss->setPosition();
            $this->_saveMax();
            $this->_maxX = 0;
            $this->_maxY = 0;
            $this->_maxH = 0;
            $this->_maxE = 0;
        }

        $this->_drawRectangle(
            $this->parsingCss->value['x'],
            $this->parsingCss->value['y'],
            $this->parsingCss->value['width'],
            $this->parsingCss->value['height'],
            $this->parsingCss->value['border'],
            $this->parsingCss->value['padding'],
            0,
            $this->parsingCss->value['background']
        );

        $marge = array();
        $marge['l'] = $this->parsingCss->value['border']['l']['width'];
        $marge['r'] = $this->parsingCss->value['border']['r']['width'];
        $marge['t'] = $this->parsingCss->value['border']['t']['width'];
        $marge['b'] = $this->parsingCss->value['border']['b']['width'];

        $this->parsingCss->value['width'] -= $marge['l']+$marge['r'];
        $this->parsingCss->value['height']-= $marge['t']+$marge['b'];

        $overW-= $marge['l']+$marge['r'];
        $overH-= $marge['t']+$marge['b'];

        // clipping to draw only in the size opf the DRAW tag
        $this->pdf->clippingPathStart(
            $this->parsingCss->value['x']+$marge['l'],
            $this->parsingCss->value['y']+$marge['t'],
            $this->parsingCss->value['width'],
            $this->parsingCss->value['height']
        );

        // left and right of the DRAW tag
        $mL = $this->parsingCss->value['x']+$marge['l'];
        $mR = $this->pdf->getW() - $mL - $overW;

        // position of the DRAW tag
        $x = $this->parsingCss->value['x']+$marge['l'];
        $y = $this->parsingCss->value['y']+$marge['t'];

        // prepare the drawing area
        $this->_saveMargin($mL, 0, $mR);
        $this->pdf->SetXY($x, $y);

        $this->svgDrawer->startDrawing(
            array(
                'x' => $x,
                'y' => $y,
                'w' => $overW,
                'h' => $overH,
            )
        );

        return true;
    }
161999
private function parseTag($tag, $context)
    {
        // ensure tag is an object
        $this->instantiatTag($tag);
        // extract context
        $value = isset($context['value']) ? $context['value'] : false;
        $sub = isset($context['sub']) ? $context['sub'] : false;
        // the sub value can contain escaped values, those values must be parsed back into the original state.
        if ($sub) {
            $sub = str_replace(['\)', '\('], [')', '('], $sub);
        }
        // run parse method inside the tag object.
        return $this->tags[$tag]->parse($value, $sub);
    }
996053
public static function closeOpenTags($html)
    {
        preg_match_all("#<([a-z]+)( .*)?(?!/)>#iU", $html, $result);
        $openedTags = $result[1];
        preg_match_all("#</([a-z]+)>#iU", $html, $result);
        $closedTags = $result[1];
        $lenOpened = count($openedTags);

        if (count($closedTags) == $lenOpened) {
            return $html;
        }

        $openedTags = array_reverse($openedTags);
        for ($i = 0; $i < $lenOpened; $i++) {
            if (!in_array($openedTags[$i], $closedTags)) {
                $html .= '</' . $openedTags[$i] . '>';
            } else {
                unset($closedTags[array_search($openedTags[$i], $closedTags)]);
            }
        }

        return $html;
    }
692166
public function tag($name, Array $options = array(), $content = null, $open = false)
    {
        if (!$name) {
            return '';
        }
        $htmlOptions = '';
        foreach ($options as $key => $value) {
            $htmlOptions .= ' ' . $key . '="' . \htmlspecialchars($value, \ENT_COMPAT) . '"';
        }
        if ($content !== null) {
            return '<' . $name . $htmlOptions . '>' . $content . '</' . $name . '>';
        } else {
            return '<' . $name . $htmlOptions . (($open) ? '>' : ' />');
        }
    }
533685
protected function tag_open($parser, $tag, $attributes) {
        switch ($tag) {
            case 'moodle_database' :
                if (empty($attributes['version']) || empty($attributes['timestamp'])) {
                    throw new dbtransfer_exception('malformedxmlexception');
                }
                $this->begin_database_import($attributes['version'], $attributes['timestamp']);
                break;
            case 'table' :
                if (isset($this->current_table)) {
                    throw new dbtransfer_exception('malformedxmlexception');
                }
                if (empty($attributes['name']) || empty($attributes['schemaHash'])) {
                    throw new dbtransfer_exception('malformedxmlexception');
                }
                $this->current_table = $attributes['name'];
                $this->begin_table_import($this->current_table, $attributes['schemaHash']);
                break;
            case 'record' :
                if (isset($this->current_row) || !isset($this->current_table)) {
                    throw new dbtransfer_exception('malformedxmlexception');
                }
                $this->current_row = new stdClass();
                break;
            case 'field' :
                if (isset($this->current_field) || !isset($this->current_row)) {
                    throw new dbtransfer_exception('malformedxmlexception');
                }
                $this->current_field = $attributes['name'];
                $this->current_data = '';
                if (isset($attributes['value']) and $attributes['value'] === 'null') {
                    $this->current_data_is_null = true;
                } else {
                    $this->current_data_is_null = false;
                }
                break;
            default :
                throw new dbtransfer_exception('malformedxmlexception');
        }
    }
330177
public void openTagSameLine(final QName tag,
                              final String attrName,
                              final String attrVal) throws IOException {
    lb();
    emitQName(tag);
    attribute(attrName, attrVal);
    endOpeningTag();
  }