當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MarkdownExtra::__construct方法代碼示例

本文整理匯總了PHP中Michelf\MarkdownExtra::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP MarkdownExtra::__construct方法的具體用法?PHP MarkdownExtra::__construct怎麽用?PHP MarkdownExtra::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Michelf\MarkdownExtra的用法示例。


在下文中一共展示了MarkdownExtra::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct(Application $app)
 {
     $this->app = $app;
     $this->app['publishing.active_item.toc'] = array();
     $this->admonitionTypes = array('A' => 'aside', 'N' => 'note', 'W' => 'warning', 'T' => 'tip', 'E' => 'error', 'I' => 'information', 'Q' => 'question', 'D' => 'discussion');
     $this->span_gamut += array('doPageBreaks' => 20);
     $this->block_gamut += array('doAdmonitions' => 55);
     parent::__construct();
 }
開發者ID:jlaso,項目名稱:easybook,代碼行數:9,代碼來源:EasybookMarkdownParser.php

示例2: __construct

 public function __construct()
 {
     $this->running = false;
     $this->empty_element_suffix = '>';
     $this->hardWrap = false;
     $this->document_gamut = array_merge($this->document_gamut, array('doConvertPlugins' => 27));
     $this->block_gamut = array_merge($this->block_gamut, array('doConvertPlugins' => 10));
     $this->span_gamut = array_merge($this->span_gamut, array('doInlinePlugins' => 2));
     parent::__construct();
 }
開發者ID:toiee,項目名稱:haik-markdown,代碼行數:10,代碼來源:HaikMarkdown.php

示例3: __construct

 /**
  * Create a new instance and enable or disable features.
  * @param array $features   enabled or disabled features
  *
  * You can pass an array of features to disable some of them for performance improvement.
  * E.g.
  * $features = array(
  *     'table' => false,
  *     'definition_list' => false
  * )
  */
 public function __construct(array $features = array())
 {
     parent::__construct();
     $this->features = array_merge($this->features, $features);
     if (!$this->features['header']) {
         unset($this->block_gamut['doHeaders']);
     }
     if (!$this->features['list']) {
         unset($this->block_gamut['doLists']);
     }
     if (!$this->features['horizontal_rule']) {
         unset($this->block_gamut['doHorizontalRules']);
     }
     if (!$this->features['table']) {
         unset($this->block_gamut['doTables']);
     }
     if (!$this->features['foot_note']) {
         unset($this->document_gamut['stripFootnotes']);
         unset($this->document_gamut['appendFootnotes']);
         unset($this->span_gamut['doFootnotes']);
     }
     if (!$this->features['fenced_code_block']) {
         unset($this->document_gamut['doFencedCodeBlocks']);
         unset($this->block_gamut['doFencedCodeBlocks']);
     }
     if (!$this->features['abbreviation']) {
         unset($this->document_gamut['stripAbbreviations']);
         unset($this->span_gamut['doAbbreviations']);
     }
     if (!$this->features['definition_list']) {
         unset($this->block_gamut['doDefLists']);
     }
     if (!$this->features['reference_link']) {
         unset($this->document_gamut['stripLinkDefinitions']);
     }
     if (!$this->features['images']) {
         unset($this->span_gamut['doImages']);
     }
     if (!$this->features['block_quote']) {
         unset($this->block_gamut['doBlockQuotes']);
     }
     if (!$this->features['code_block']) {
         unset($this->block_gamut['doCodeBlocks']);
     }
     if (!$this->features['auto_link']) {
         unset($this->span_gamut['doAutoLinks']);
     }
     if (false === $this->features['entities']) {
         $this->no_entities = true;
     }
     if (true === $this->features['no_html']) {
         $this->no_markup = true;
     }
 }
開發者ID:lunetics,項目名稱:KnpMarkdownBundle,代碼行數:65,代碼來源:MarkdownParser.php

示例4: __construct

 /**
  * Insert function calls inbetween the standard markdown calls
  *
  * @return  void
  */
 public function __construct()
 {
     // doImage is 10, add image url just before
     $this->span_gamut['doImageURL'] = 9;
     // doLink is 20, add base url just before
     $this->span_gamut['doBaseURL'] = 19;
     // Add API links
     $this->span_gamut['doAPI'] = 90;
     // Add note spans last
     $this->span_gamut['doNotes'] = 100;
     // PHP4 makes me sad.
     parent::__construct();
 }
開發者ID:braf,項目名稱:phalcana-userguide,代碼行數:18,代碼來源:Markdown.php

示例5: __construct

 public function __construct($sInputGroupTemplate = '', $sCheckboxGroupTemplate = '', $sTextareaGroupTemplate = '')
 {
     #
     # Constructor function. Initialize the parser object.
     #
     # Insert extra document, block, and span transformations.
     # Parent constructor will do the sorting.
     $this->span_gamut += array("doInputs" => 70);
     # Set form to span element to prevent extra <p> tags
     $this->contain_span_tags_re .= '|form';
     if (!empty($sInputGroupTemplate)) {
         $this->sInputGroupTemplate = $sInputGroupTemplate;
     }
     if (!empty($sCheckboxGroupTemplate)) {
         $this->sCheckboxGroupTemplate = $sCheckboxGroupTemplate;
     }
     if (!empty($sTextareaGroupTemplate)) {
         $this->sTextareaGroupTemplate = $sTextareaGroupTemplate;
     }
     parent::__construct();
 }
開發者ID:rbnvrw,項目名稱:markdown-forms,代碼行數:21,代碼來源:MarkdownForms.php

示例6: __construct

 public function __construct(array $options = null)
 {
     #
     # Constructor function. Initialize the parser object.
     #
     $this->escape_chars .= '';
     $this->document_gamut += array();
     $this->block_gamut += array("doBlockTitles" => 11, "doDocBreaks" => 20);
     $this->span_gamut += array("doPageNums" => 9, "doRubies" => 50, "doTcys" => 50);
     parent::__construct();
     // Harusame options
     if (false === is_null($options)) {
         if (array_key_exists("autoTcy", $options)) {
             if (is_bool($options["autoTcy"])) {
                 $this->autoTcy = $options["autoTcy"];
             } else {
                 trigger_error("autoTcy should be boolean.");
             }
         }
         if (array_key_exists("tcyDigit", $options)) {
             if (is_int($options["tcyDigit"])) {
                 if ($options["tcyDigit"] < 2) {
                     trigger_error("tcyDigit should be 2 or greater.", E_USER_ERROR);
                 } else {
                     $this->tcyDigit = $options["tcyDigit"];
                 }
             } else {
                 trigger_error("tcyDigit should be int.");
             }
         }
         if (array_key_exists("autoTextOrientation", $options)) {
             if (is_bool($options["autoTextOrientation"])) {
                 $this->autoTextOrientation = $options["autoTextOrientation"];
             } else {
                 trigger_error("autoTextOrientation should be boolean.");
             }
         }
     }
 }
開發者ID:denshoch,項目名稱:dendenmarkdown,代碼行數:39,代碼來源:DenDenMarkdown.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->span_gamut['doParseIncidentVariables'] = 7;
     $this->mappingIncidentVariables = ['{{IP}}' => '{{incident.hostAddress}}', '{{hostAddress}}' => '{{incident.hostAddress}}', '{{reporter}}' => '{{incident.reporter}}', '{{type}}' => '{{incident.type}}', '{{network}}' => '{{incident.network}}', '{{networkAdmin}}' => '{{incident.network.networkAdmin}}'];
 }
開發者ID:CERTUNLP,項目名稱:NgenBundle,代碼行數:6,代碼來源:IncidentMarkdowReportParser.php

示例8: __construct

	public function __construct(){

		// Add a few features to the default Markdown formatter.

		// This will use Core to generate a unique ID for header fields.
		$this->header_id_func = [$this, 'generateHeaderID'];

		// This will add the [TOC] tag to MD.
		$this->document_gamut += ['doTOC' => 55];
		
		// Process all metadata on this document
		$this->document_gamut += ['doMeta' => 1];
		$this->document_gamut += ['doMetaPost' => 99];
		
		$this->url_filter_func = [$this, 'doLink'];
		
		parent::__construct();
	}
開發者ID:nicholasryan,項目名稱:CorePlus,代碼行數:18,代碼來源:MarkdownProcessor.php


注:本文中的Michelf\MarkdownExtra::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。