29 lines
666 B
PHP
29 lines
666 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2013-2017 2amigOS! Consulting Group LLC
|
|
* @link http://2amigos.us
|
|
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
|
|
*/
|
|
namespace dosamigos\arrayquery\conditions;
|
|
|
|
|
|
/**
|
|
* Like checks if value is matches any words in theå data searched.
|
|
*
|
|
* @author Antonio Ramirez <hola@2amigos.us>
|
|
* @link http://www.ramirezcobos.com/
|
|
* @link http://www.2amigos.us/
|
|
* @package dosamigos\arrayquery\conditions
|
|
*/
|
|
class Like extends Condition
|
|
{
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function matches($data)
|
|
{
|
|
return is_string($data) && mb_stripos($data, $this->value) !== false;
|
|
}
|
|
}
|