function __construct($text = '', $preformated = false) { parent::__construct(); $this->text = $text; $this->preformated = $preformated; if (!self::$const_tw) { self::$const_tw = $tw = new Text_Wiki(); // Désactivation de certaine fonctionnalité peu sécurisé ou utiles dans // le cadre d'un wiki uniquement. $disable = array('phplookup', 'interwiki', 'wikilink', 'freelink', 'bold', 'italic', 'embed', 'include', 'toc'); foreach ($disable as $rule) { $tw->disableRule($rule); } $enable = array('code', 'translatehtml'); foreach ($enable as $rule) { $tw->enableRule($rule); } // Ajouter la gestion des url relative. $options = array('/', './', '../', 'http://', 'https://', 'ftp://', 'gopher://', 'news://', 'file://', 'irc://', 'mailto:', 'xmpp:', 'tel:'); $tw->setParseConf('Url', 'schemes', $options); //$tw->setFormatConf('Xhtml', 'charset', 'utf-8'); $tw->setFormatConf('Xhtml', 'translate', HTML_SPECIALCHARS); $tw->setRenderConf('Xhtml', 'image', 'base', './'); } $this->tw = clone self::$const_tw; }
function __construct($child0 = null) { parent::__construct(); $this->children = array(); $children = is_array($child0) ? $child0 : func_get_args(); foreach ($children as $child) { $this->addChild($child); } }
function __construct($url, $alt, $title, $width = NULL, $height = NULL) { parent::__construct(); $this->url = $url; $this->alt = $alt; $this->title = $title instanceof Wtk_Metas ? $title->title : $title; $i = !$width || !$height ? file_exists($url) ? getimagesize($url) : null : null; $width = $width ? $width : $i[0]; $height = $height ? $height : $i[1]; $this->setSize($width, $height); }
function __construct(Wtk_Form_Model_Instance $instance) { parent::__construct(); $this->instance = $instance; if ($instance->valid === FALSE) { $this->addFlags('invalid'); } else { if ($instance->valid === TRUE) { $this->addFlags('valid'); } } $this->useLabel(); $this->setReadonly($instance->readonly); $this->name = $this->getName(); $this->value = $this->instance->get(); $this->wtkConstraint = array(); $this->setId(wtk_strtoid($this->instance->path)); }
function __construct($text = '') { parent::__construct(); $this->text = $text; }