CairoSvgSurface::getVersions

cairo_svg_surface_get_versions

(PECL cairo >= 0.1.0)

CairoSvgSurface::getVersions -- cairo_svg_surface_get_versionsUsed to retrieve a list of supported SVG versions

Opis

Styl obiektowy (method):

public static CairoSvgSurface::getVersions ( void ) : array

Styl proceduralny:

cairo_svg_get_versions ( void ) : array

Returns a numerically indexed array of currently available CairoSvgVersion constants. In order to retrieve the string values for each item, use CairoSvgSurface::versionToString().

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

Returns a numerically indexed array of integer values.

Przykłady

Przykład #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;
}
?>

Powyższy przykład wyświetli coś podobnego do:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

Przykład #2 Styl proceduralny

<?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;
}
?>

Powyższy przykład wyświetli coś podobnego do:

array(2) {
  [0]=>
  int(0)
  [1]=>
  int(1)
}
SVG 1.1
SVG 1.2

Zobacz też:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top