Source for file Url.php
Documentation is available at Url.php
class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
'img_ext' => array ('jpg', 'jpeg', 'gif', 'png')
* Renders a token into text matching the requested format.
* @param array $options The "options" portion of the token (second
* @return string The text rendered from the token options.
// create local variables from the options array (text,
// find the rightmost dot and determine the filename
// does the filename extension indicate an image file?
if ($this->getConf ('images') &&
in_array($ext, $this->getConf ('img_ext', array ()))) {
// create alt text for the image
if (! isset ($text) || $text == '') {
$output = " <img src=\"$href\" alt=\"$text\" />";
// allow for alternative targets
$target = $this->getConf ('target', '');
$target = 'target="$target"';
// generate a regular link (not an image)
$output = " <a $target href=\"$href\">$text</a>";
// make numbered references look like footnotes
if ($type == 'footnote') {
$output = '<sup>' . $output . '</sup>';
Documentation generated on Mon, 11 Mar 2019 13:51:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|