mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add 'in' modifier
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user