本文整理汇总了PHP中Parser::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Parser::__construct方法的具体用法?PHP Parser::__construct怎么用?PHP Parser::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parser
的用法示例。
在下文中一共展示了Parser::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fclose
/**
* Constructor
*/
function __construct($path = '', $distribution = '', $debug = false)
{
parent::__construct($path, $distribution);
$this->_flag_debug = $debug;
$this->parse();
fclose($this->handle);
parent::__destruct();
}
示例2: __construct
/**
* Constructor
*
* Sets up the Graph class with an image width and height defaults to
* 640x480
*
* @param Integer $width Image width
* @param Integer $height Image height
*/
public function __construct($width = 640, $height = 480)
{
// default width and height equal to that of a poor monitor (in early 2000s)
$this->width = $width;
$this->height = $height;
//initialize main class variables
parent::__construct();
}
示例3: __construct
/**
* Konstruktor
* @param string $path
* @param array $options
*/
public function __construct($path, $options = [])
{
parent::__construct($path, $options);
$this->delimiter = $this->optionLoadVar($options, 'delimiter', ',');
$this->enclosure = $this->optionLoadVar($options, 'enclosure', '"');
$this->is_header = $this->optionLoadVar($options, 'is_header', false);
$this->escape = $this->optionLoadVar($options, 'escape', '\\');
}
示例4: __construct
/**
* @param Input $input the input
* @param bool $trackLineNumber track line number 1/0
*/
public function __construct(Input $input, $trackLineNumber = true)
{
parent::__construct();
// set vars
$this->input = $input;
$this->trackLineNumber = $trackLineNumber;
// initial state
$this->rewind();
}
示例5: foreach
function __construct()
{
global $wgParser;
parent::__construct();
$wgParser->firstCallInit();
foreach ($wgParser->getTags() as $h) {
if (!in_array($h, array('pre'))) {
$this->setHook($h, array($this, 'fck_genericTagHook'));
}
}
}
示例6: __construct
public function __construct($no_markup = FALSE)
{
#
# Constructor function. Initialize the parser object.
#
# Add extra escapable characters before parent constructor
# initialize the table.
$this->escape_chars .= ':|';
# Insert extra document, block, and span transformations.
# Parent constructor will do the sorting.
$this->document_gamut += array("doFencedCodeBlocks" => 5, "stripFootnotes" => 15, "stripAbbreviations" => 25, "appendFootnotes" => 50);
$this->block_gamut += array("doFencedCodeBlocks" => 5, "doTables" => 15, "doDefLists" => 45);
$this->span_gamut += array("doFootnotes" => 5, "doAbbreviations" => 70);
parent::__construct($no_markup);
}
示例7: firstCallInit
/**
* Do various kinds of initialisation on the first call of the parser
*/
function firstCallInit()
{
parent::__construct();
if (!$this->mFirstCall) {
return;
}
$this->mFirstCall = false;
wfProfileIn(__METHOD__);
$this->setHook('pre', array($this, 'renderPreTag'));
CoreParserFunctions::register($this);
CoreLinkFunctions::register($this);
$this->initialiseVariables();
wfRunHooks('ParserFirstCallInit', array(&$this));
wfProfileOut(__METHOD__);
}
示例8: foreach
function __construct()
{
global $wgParser;
parent::__construct();
$wgParser->firstCallInit();
foreach ($wgParser->getTags() as $h) {
if (in_array($h, array('pre'))) {
continue;
}
if (strtolower($h) == 'webservice' && defined('SMW_DI_VERSION')) {
$this->setHook($h, array($this, 'replaceWebserviceDefinition'));
continue;
}
$this->setHook($h, array($this, 'fck_genericTagHook'));
}
}
示例9: __construct
/**
* Constructor
*
* @param type param1
*/
public function __construct($source = NULL, $is_path = FALSE)
{
parent::__construct($source, $is_path);
// Headings
for ($i = 1; $i <= 10; ++$i) {
$this->addAction(new HTMLTagParseAction("h{$i}", str_repeat('=', $i)));
}
// Formatters
$this->addAction(new HTMLTagParseAction('strong', "'''"));
$this->addAction(new HTMLTagParseAction('b', "'''"));
$this->addAction(new HTMLTagParseAction('em', "''"));
$this->addAction(new HTMLTagParseAction('i', "''"));
// Structure
$this->addAction(new HTMLTagParseAction('p', '', "\n"));
// Lists, links, etc
$this->addAction(new ListParseAction('# ', '* '));
$this->addAction(new LinkParseAction('[$1 $2]'));
}
示例10: __construct
public function __construct($url)
{
parent::__construct($url);
$urlParameter = parse_url($this->getUrl());
$this->processWishListUrl($urlParameter);
}
示例11: __construct
/**
* Text constructor.
* @param $text
*/
public function __construct($text)
{
//TODO: определение переноса строки
self::$rows = explode("\n", str_replace("\r\n", "\n", $text));
parent::__construct($text);
}
示例12: __construct
/**
* File constructor.
* @param $value
*/
public function __construct($value)
{
$this->path = $value;
parent::__construct($value);
}
示例13:
function __construct()
{
$this->MessageClass = MessageClass::getMessageClasses();
parent::__construct();
}
示例14: __construct
public function __construct($lexer)
{
parent::__construct($lexer);
$this->command_stack = array();
}
示例15: ilMWFakery
function __construct()
{
parent::__construct();
$this->mOptions = new ilMWFakery();
$this->mTitle = new ilMWFakery();
$this->mOutput = new ilMWFakery();
}