Source for file SvgTransform.php
Documentation is available at SvgTransform.php
* $Source: /cvsroot/svggrapher/svggrapher/mains/SvgTransform.php,v $
* @version $Id: SvgTransform.php,v 1.3 2007/10/20 22:22:53 geelweb Exp $
* @author Guillaume L. <guillaume@geelweb.org>
* @copyright Copyright © 2006, Guillaume Luchet.
* @license http://opensource.org/licenses/bsd-license.php BSD License
* @author Guillaume L. <guillaume@geelweb.org>
* @link http://www.geelweb.org
* @license http://opensource.org/licenses/bsd-license.php BSD License
* @copyright Copyright © 2006, Guillaume Luchet.
* @version CVS: $Id: SvgTransform.php,v 1.3 2007/10/20 22:22:53 geelweb Exp $
// Transform::__construct() {{{
* @param mixed $transform
* Set the value of a transformation.
* @param string $transformName Transformation name.
* @param string $transformValue Transformation value.
public function set($transformName, $transformValue=
NULL)
if(isset
($transformValue) &&
is_null($transformValue)) {
* Get the value of a transformation.
* @param string $transformName Transformation name.
public function get($transformName)
// Transform::fromString() {{{
* Initialize the object from a string.
* @param string $str Transformation string.
$transformPairs =
explode(')', $str);
foreach($transformPairs as $pair) {
list
($transformName, $transformValue) =
explode('(', $pair);
// Transfrom::toString() {{{
* Get the sting representation of the object.
foreach($this->_transforms as $transformName =>
$transformValue) {
$retStr .=
$padding .
$transformName .
'(' .
$transformValue .
')';
* Allow direct acces to set transformation value.
* @param mixed $transformName transformation name
* @param mixed $transformValue transformation value
public function __set($transformName, $transformValue=
NULL)
$this->set($transformName, $transformValue);
* Allow direct acces to get a transformation.
* @param mixed $transformName transformation name
public function __get($transformName)
$this->get($transformName);
Documentation generated on Tue, 23 Oct 2007 11:32:19 +0200 by phpDocumentor 1.4.0