本文整理汇总了PHP中Texy::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Texy::__construct方法的具体用法?PHP Texy::__construct怎么用?PHP Texy::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texy
的用法示例。
在下文中一共展示了Texy::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Construct
*/
public function __construct($baseUri)
{
parent::__construct();
// output
$this->setOutputMode(self::HTML5);
$this->htmlOutputModule->removeOptional = false;
self::$advertisingNotice = false;
// headings
$this->headingModule->balancing = TexyHeadingModule::FIXED;
// phrases
$this->allowed['phrase/ins'] = true;
// ++inserted++
$this->allowed['phrase/del'] = true;
// --deleted--
$this->allowed['phrase/sup'] = true;
// ^^superscript^^
$this->allowed['phrase/sub'] = true;
// __subscript__
$this->allowed['phrase/cite'] = true;
// ~~cite~~
$this->allowed['deprecated/codeswitch'] = true;
// `=code
// images
$this->imageModule->fileRoot = WWW_DIR . "/files";
$this->imageModule->root = $baseUri . "/files/";
// flash, youtube.com, stream.cz, gravatar handlers
$this->addHandler('image', array($this, 'youtubeHandler'));
$this->addHandler('image', array($this, 'streamHandler'));
$this->addHandler('image', array($this, 'flashHandler'));
$this->addHandler("phrase", array($this, "netteLink"));
$this->addHandler('image', array($this, 'gravatarHandler'));
}
示例2:
function __construct()
{
parent::__construct();
// some configurations
$this->alignClasses['left'] = 'left';
$this->alignClasses['right'] = 'right';
}
示例3: __construct
public function __construct()
{
parent::__construct();
// output
$this->setOutputMode(self::HTML4_TRANSITIONAL);
$this->htmlOutputModule->removeOptional = false;
self::$advertisingNotice = false;
// headings
$this->headingModule->balancing = TexyHeadingModule::FIXED;
// phrases
$this->allowed['phrase/ins'] = true;
// ++inserted++
$this->allowed['phrase/del'] = true;
// --deleted--
$this->allowed['phrase/sup'] = true;
// ^^superscript^^
$this->allowed['phrase/sub'] = true;
// __subscript__
$this->allowed['phrase/cite'] = true;
// ~~cite~~
$this->allowed['deprecated/codeswitch'] = true;
// `=code
// images
$this->imageModule->fileRoot = __DIR__ . "/images";
$this->imageModule->root = "images/";
// přidávání youtube.com, stream.cz videa, flash a gravatar
$this->addHandler('image', array(__CLASS__, 'youtubeHandler'));
$this->addHandler('image', array(__CLASS__, 'streamHandler'));
$this->addHandler('image', array(__CLASS__, 'flashHandler'));
$this->addHandler('image', array(__CLASS__, 'gravatarHandler'));
}
示例4: __construct
public function __construct()
{
parent::__construct();
// safe mode
\TexyConfigurator::safeMode($this);
// output
$this->setOutputMode(self::HTML4_TRANSITIONAL);
$this->htmlOutputModule->removeOptional = false;
self::$advertisingNotice = false;
$this->allowed['heading/surrounded'] = false;
$this->allowed['heading/underlined'] = false;
$this->allowed['link/definition'] = false;
$this->allowed['image/definition'] = false;
$this->mergeLines = false;
$this->addHandler('phrase', array(__CLASS__, 'linkHandler'));
}
示例5: __construct
public function __construct()
{
parent::__construct();
// output
$this->setOutputMode(self::HTML4_TRANSITIONAL);
$this->htmlOutputModule->removeOptional = false;
self::$advertisingNotice = false;
// safe mode
TexyConfigurator::safeMode($this);
$this->allowed['heading/surrounded'] = false;
$this->allowed['heading/underlined'] = false;
$this->allowed['link/definition'] = false;
$this->allowed['image/definition'] = false;
// spojování textu v odstavcích po enteru
$this->mergeLines = true;
// přidání target="_blank" k odkazům
// $this->addHandler('phrase', array(__CLASS__, 'addTargetHandler'));
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->cache = SS_Cache::factory('SS_Texy');
$this->addHandler('script', array($this, 'scriptHandler'));
}