Function __global->_opened_tag

Definitions

sources/comcode_compiler.php

  • Helper function for setting up and juggling variables after reaching a new Comcode tag.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$as_admin boolean No No required parameter N/A N/A Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
$source_member MEMBER No No required parameter N/A N/A The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
$attribute_map array No No required parameter N/A N/A The attribute map of the tag
$current_tag string No No required parameter N/A N/A The identifier for the tag
$pos integer No No required parameter N/A N/A The offset of the tag in the Comcode
$comcode_dangerous boolean No No required parameter N/A N/A Whether the parser allows dangerous Comcode
$comcode_dangerous_html boolean No No required parameter N/A N/A Whether the parser allows dangerous HTML
$in_separate_parse_section boolean No No required parameter N/A N/A Whether the parser is/was in a separate parse section (e.g. a 'code' tag)
$in_html boolean No No required parameter N/A N/A Whether the parser is/was in an HTML region
$in_semihtml boolean No No required parameter N/A N/A Whether the parser is/was in a Semi-HTML region
$close boolean No No required parameter N/A N/A Whether the tag is a closing tag
&$len integer Yes No required parameter N/A N/A The length of the Comcode
&$comcode LONG_TEXT Yes No required parameter N/A N/A The Comcode being parsed

Returns

  • A tuple of new parser settings
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Helper function for setting up and juggling variables after reaching a new Comcode tag.
 *
 * @param  boolean $as_admin Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
 * @param  MEMBER $source_member The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
 * @param  array $attribute_map The attribute map of the tag
 * @param  string $current_tag The identifier for the tag
 * @param  integer $pos The offset of the tag in the Comcode
 * @param  boolean $comcode_dangerous Whether the parser allows dangerous Comcode
 * @param  boolean $comcode_dangerous_html Whether the parser allows dangerous HTML
 * @param  boolean $in_separate_parse_section Whether the parser is/was in a separate parse section (e.g. a 'code' tag)
 * @param  boolean $in_html Whether the parser is/was in an HTML region
 * @param  boolean $in_semihtml Whether the parser is/was in a Semi-HTML region
 * @param  boolean $close Whether the tag is a closing tag
 * @param  integer $len The length of the Comcode
 * @param  LONG_TEXT $comcode The Comcode being parsed
 * @return array A tuple of new parser settings
 */

function _opened_tag(bool $as_admin, int $source_member, array $attribute_map, string $current_tag, int $pos, bool $comcode_dangerous, bool $comcode_dangerous_html, bool $in_separate_parse_section, bool $in_html, bool $in_semihtml, bool $close, int &$len, string &$comcode) : array