PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty2/plugins/function.constraint.php

http://zoop.googlecode.com/
PHP | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | 998a8ad58230986faf34b6152449c33f MD5 | raw file
 1<?php
 2function smarty_function_constraint($params, &$smarty)
 3{
 4	$type = $params['type'];
 5	$name = $params['name'];
 6	$value = $params['value'];
 7	$inline = $params['inline'];
 8	
 9	$types = array('minlen' => 'minlen', 'sameas' => 'sameas');
10	$type = $types[$type];
11	
12	return '<constraint type="' . $type . '" name="' . $name . '" value="' . $value . '" inline="' . $inline . '" />';
13}