Add 'in' modifier

This commit is contained in:
bzick
2013-02-23 17:37:04 +04:00
parent 7631e3508d
commit c45c6dc2d2
3 changed files with 28 additions and 6 deletions

View File

@ -129,4 +129,17 @@ class Modifier {
return count((array)$item);
}
}
/**
*
* @param $value
* @param $list
* @return bool
*/
public static function in($value, $list) {
if(is_array($list)) {
return in_array($value, $list);
}
return false;
}
}