*/ /** * patTemplate modfifier Multiply * */ class patTemplate_Modifier_Multiply extends patTemplate_Modifier { /** * Modify the Value * * @param string value * @param array attributes * @return string modified value */ public function modify($value, $params = array()) { $defParams = array( 'factor' => 1 ); if (!is_numeric($value)) { return $value; } $params = array_merge($defParams, $params); $value *= floatval($params['factor']); return $value; } }