Source for file Image.php
Documentation is available at Image.php
* Parse for images in the source text.
* @author Tomaiuolo Michele <tomamic@yahoo.it>
* @version $Id: Image.php 243106 2007-09-28 22:02:50Z mic $
* Constructor. Overrides the Text_Wiki_Parse constructor so that we
* can set the $regex property dynamically (we need to include the
* Text_Wiki $delim character).
* @param object &$obj The calling "parent" Text_Wiki object.
* @param string $name The token name to use for this rule.
parent ::Text_Wiki_Parse ($obj);
$this->regex = '/{{([^' . $this->wiki->delim . ']*)(\|([^' . $this->wiki->delim . ']*))?}}/U';
* Generates a replacement token for the matched text.
* @param array &$matches The array of matches from parse().
* @return string A token marking the horizontal rule.
$src = trim($matches[1 ]);
$alt = isset ($matches[3 ]) ? trim($matches[3 ]) : $src;
return $this->wiki->addToken (
'attr' => array ('alt' => $alt, 'title' => $alt)
Documentation generated on Mon, 11 Mar 2019 15:40:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|