CairoSvgSurface::getVersions
cairo_svg_surface_get_versions
(PECL cairo >= 0.1.0)
CairoSvgSurface::getVersions -- cairo_svg_surface_get_versions — Used to retrieve a list of supported SVG versions
Description
Object oriented style (method):
Procedural style:
Returns a numerically indexed array of currently available CairoSvgVersion constants. In order to retreive the string values for each item, use CairoSvgSurface::versionToString().
Parameters
This function has no parameters.
Return Values
Returns a numerically indexed array of integer values.
Examples
Example #1 CairoSvgSurface::getVersions() example
<?php
/* Grab our list of versions */
$versions = CairoSvgSurface::getVersions();
var_dump($versions);
/* echo the string name of each version */
foreach($versions as $id) {
echo CairoSvgSurface::versionToString($id), PHP_EOL;
}
?>
The above example will output something similar to:
array(2) { [0]=> int(0) [1]=> int(1) } SVG 1.1 SVG 1.2
Example #2 Procedural style
<?php
/* Grab our list of versions */
$versions = cairo_svg_surface_get_versions();
var_dump($versions);
/* echo the string name of each version */
foreach($versions as $id) {
echo cairo_svg_surface_version_to_string($id), PHP_EOL;
}
?>
The above example will output something similar to:
array(2) { [0]=> int(0) [1]=> int(1) } SVG 1.1 SVG 1.2
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Обработка и генерация изображений
- Cairo
- Функция CairoSvgSurface::__construct() - The __construct purpose
- Функция CairoSvgSurface::getVersions() - Used to retrieve a list of supported SVG versions
- Функция CairoSvgSurface::restrictToVersion() - The restrictToVersion purpose
- Функция CairoSvgSurface::versionToString() - The versionToString purpose
Коментарии
404 Not Found