Iber\Generator\Utilities\RuleProcessor::ends PHP Method

ends() public method

Check if a value ends in any of the given values.
public ends ( $options, $value ) : boolean
$options
$value
return boolean
    public function ends($options, $value)
    {
        foreach ($options as $option) {
            $passed = substr($value, -strlen($option)) === $option;
            if ($passed) {
                return true;
            }
        }
        return false;
    }