MediaWiki
REL1_19
|
Public Member Functions | |
__construct ($source) | |
Constructor. | |
getMetadata () | |
Static Public Member Functions | |
static | scaleSVGUnit ($length, $viewportSize=512) |
Return a rounded pixel equivalent for a labeled CSS/SVG length. | |
Public Attributes | |
const | DEFAULT_HEIGHT = 512 |
const | DEFAULT_WIDTH = 512 |
const | NS_SVG = 'http://www.w3.org/2000/svg' |
Protected Member Functions | |
read () | |
Read the SVG. | |
Private Member Functions | |
animateFilter ($name) | |
Filter all children, looking for animate elements. | |
debug ($data) | |
handleSVGAttribs () | |
Parse the attributes of an SVG element. | |
notice ($data) | |
readField ($name, $metafield=null) | |
Read a textelement from an element. | |
readXml ($metafield=null) | |
Read an XML snippet from an element. | |
throwXmlError ($err) | |
warn ($data) | |
Private Attributes | |
$mDebug = false | |
$metadata = Array() | |
$reader = null |
Definition at line 35 of file SVGMetadataExtractor.php.
SVGReader::__construct | ( | $ | source | ) |
Constructor.
Creates an SVGReader drawing from the source provided
$source | String: URI from which to read |
Definition at line 50 of file SVGMetadataExtractor.php.
References $size, $wgSVGMetadataCutoff, debug(), DEFAULT_HEIGHT, DEFAULT_WIDTH, read(), wfRestoreWarnings(), and wfSuppressWarnings().
SVGReader::animateFilter | ( | $ | name | ) | [private] |
Filter all children, looking for animate elements.
String | $name | of the element that we are reading from |
Definition at line 206 of file SVGMetadataExtractor.php.
References debug().
Referenced by read().
SVGReader::debug | ( | $ | data | ) | [private] |
Definition at line 241 of file SVGMetadataExtractor.php.
References wfDebug().
Referenced by __construct(), animateFilter(), read(), readField(), readXml(), and throwXmlError().
Definition at line 103 of file SVGMetadataExtractor.php.
SVGReader::handleSVGAttribs | ( | ) | [private] |
Parse the attributes of an SVG element.
The parser has to be in the start element of <svg>
Definition at line 260 of file SVGMetadataExtractor.php.
References DEFAULT_HEIGHT, DEFAULT_WIDTH, and scaleSVGUnit().
Referenced by read().
SVGReader::notice | ( | $ | data | ) | [private] |
Definition at line 251 of file SVGMetadataExtractor.php.
References wfDebug().
SVGReader::read | ( | ) | [protected] |
Read the SVG.
Definition at line 110 of file SVGMetadataExtractor.php.
References animateFilter(), debug(), handleSVGAttribs(), NS_SVG, readField(), and readXml().
Referenced by __construct().
SVGReader::readField | ( | $ | name, |
$ | metafield = null |
||
) | [private] |
Read a textelement from an element.
String | $name | of the element that we are reading from |
String | $metafield | that we will fill with the result |
Definition at line 166 of file SVGMetadataExtractor.php.
References debug().
Referenced by read().
SVGReader::readXml | ( | $ | metafield = null | ) | [private] |
Read an XML snippet from an element.
String | $metafield | that we will fill with the result |
Definition at line 187 of file SVGMetadataExtractor.php.
References debug().
Referenced by read().
static SVGReader::scaleSVGUnit | ( | $ | length, |
$ | viewportSize = 512 |
||
) | [static] |
Return a rounded pixel equivalent for a labeled CSS/SVG length.
http://www.w3.org/TR/SVG11/coords.html#UnitIdentifiers
$length | String: CSS/SVG length. |
$viewportSize,: | Float optional scale for percentage units... |
Definition at line 309 of file SVGMetadataExtractor.php.
References $matches.
Referenced by handleSVGAttribs().
SVGReader::throwXmlError | ( | $ | err | ) | [private] |
Definition at line 236 of file SVGMetadataExtractor.php.
References debug(), and wfDebug().
SVGReader::warn | ( | $ | data | ) | [private] |
Definition at line 247 of file SVGMetadataExtractor.php.
References wfDebug().
SVGReader::$mDebug = false [private] |
Definition at line 41 of file SVGMetadataExtractor.php.
SVGReader::$metadata = Array() [private] |
Definition at line 42 of file SVGMetadataExtractor.php.
SVGReader::$reader = null [private] |
Definition at line 40 of file SVGMetadataExtractor.php.
const SVGReader::DEFAULT_HEIGHT = 512 |
Definition at line 37 of file SVGMetadataExtractor.php.
Referenced by __construct(), and handleSVGAttribs().
const SVGReader::DEFAULT_WIDTH = 512 |
Definition at line 36 of file SVGMetadataExtractor.php.
Referenced by __construct(), and handleSVGAttribs().
const SVGReader::NS_SVG = 'http://www.w3.org/2000/svg' |
Definition at line 38 of file SVGMetadataExtractor.php.
Referenced by read().