MediaWiki
REL1_22
|
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 41 of file SVGMetadataExtractor.php.
SVGReader::__construct | ( | $ | source | ) |
Constructor.
Creates an SVGReader drawing from the source provided
string | $source | URI from which to read |
MWException|Exception |
Definition at line 57 of file SVGMetadataExtractor.php.
References $size, $source, debug(), DEFAULT_HEIGHT, DEFAULT_WIDTH, global, 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 229 of file SVGMetadataExtractor.php.
References $name, and debug().
Referenced by read().
SVGReader::debug | ( | $ | data | ) | [private] |
Definition at line 269 of file SVGMetadataExtractor.php.
References wfDebug().
Referenced by __construct(), animateFilter(), read(), readField(), readXml(), and throwXmlError().
Definition at line 118 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 288 of file SVGMetadataExtractor.php.
References DEFAULT_HEIGHT, DEFAULT_WIDTH, and scaleSVGUnit().
Referenced by read().
SVGReader::notice | ( | $ | data | ) | [private] |
Definition at line 279 of file SVGMetadataExtractor.php.
References wfDebug().
SVGReader::read | ( | ) | [protected] |
Read the SVG.
MWException |
Definition at line 127 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 188 of file SVGMetadataExtractor.php.
References $name, and 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 |
MWException |
Definition at line 210 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
string | $length | CSS/SVG length. |
$viewportSize,: | Float optional scale for percentage units... |
Definition at line 339 of file SVGMetadataExtractor.php.
References $matches, and array().
Referenced by handleSVGAttribs().
SVGReader::throwXmlError | ( | $ | err | ) | [private] |
Definition at line 264 of file SVGMetadataExtractor.php.
SVGReader::warn | ( | $ | data | ) | [private] |
Definition at line 275 of file SVGMetadataExtractor.php.
References wfDebug().
SVGReader::$mDebug = false [private] |
Definition at line 47 of file SVGMetadataExtractor.php.
SVGReader::$metadata = Array() [private] |
Definition at line 48 of file SVGMetadataExtractor.php.
SVGReader::$reader = null [private] |
Definition at line 46 of file SVGMetadataExtractor.php.
const SVGReader::DEFAULT_HEIGHT = 512 |
Definition at line 43 of file SVGMetadataExtractor.php.
Referenced by __construct(), and handleSVGAttribs().
const SVGReader::DEFAULT_WIDTH = 512 |
Definition at line 42 of file SVGMetadataExtractor.php.
Referenced by __construct(), and handleSVGAttribs().
const SVGReader::NS_SVG = 'http://www.w3.org/2000/svg' |
Definition at line 44 of file SVGMetadataExtractor.php.
Referenced by read().