*/ /** * patTemplate modfifier Sprintf * * Possible attributes are: * - format (string) */ class patTemplate_Modifier_Sprintf extends patTemplate_Modifier { /** * Modify the Value * * @param string * @param array * @return string */ public function modify($value, $params = array()) { if (!isset($params['format']) || empty($params['format'])) { return $value; } return sprintf($params['format'], $value); } }