src/Core/Db/Expression/Condition.php
public function like(ColumnInterface $column, ReferencesInterface $value, $level = 0)
	{
		$columnName = ($column->getAlias()) ?: $column->getColumnName();
		if($level === 0)
		{
			$condition = $columnName . ' LIKE ' . $value->getValue();
		}
		elseif($level === 1)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelOne($value);
		}
		elseif($level === 2)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelTwo($value);
		}
		elseif($level === 3)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelThree($value);
		}
		else
		{
			throw new \Exception('invalid level argument');
		}
		$this->_addCondition($condition);

		return $this;
	}
public function like(ColumnInterface $column, ReferencesInterface $value, $level = 0)
	{
		$columnName = ($column->getAlias()) ?: $column->getColumnName();
		if($level === 0)
		{
			$condition = $columnName . ' LIKE ' . $value->getValue();
		}
		elseif($level === 1)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelOne($value);
		}
		elseif($level === 2)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelTwo($value);
		}
		elseif($level === 3)
		{
			$condition = $columnName . ' LIKE ' . $this->_likeLevelThree($value);
		}
		else
		{
			throw new \Exception('invalid level argument');
		}
		$this->_addCondition($condition);

		return $this;
	}
public function like ( ColumnInterface $ column , ReferencesInterface $ value , $ level = 0 ) { $ columnName = ( $ column -> getAlias ( ) ) ? : $ column -> getColumnName ( ) ; if ( $ level === 0 ) { $ condition = $ columnName . ' LIKE ' . $ value -> getValue ( ) ; } elseif ( $ level === 1 ) { $ condition = $ columnName . ' LIKE ' . $ this -> _likeLevelOne ( $ value ) ; } elseif ( $ level === 2 ) { $ condition = $ columnName . ' LIKE ' . $ this -> _likeLevelTwo ( $ value ) ; } elseif ( $ level === 3 ) { $ condition = $ columnName . ' LIKE ' . $ this -> _likeLevelThree ( $ value ) ; } else { throw new \ Exception ( 'invalid level argument' ) ; } $ this -> _addCondition ( $ condition ) ; return $ this ; }
Add a like condition to the condition array.
The order of the method call is important, in which way the condition string will
concatenate.

@param ColumnInterface     $column Name of the column.
@param ReferencesInterface $value  Value for the expression.
@param int                 $level  The several levels of a like expression, see private likeLevel - methods.

@see Alcys\Core\Db\Condition\Condition::_likeLevelOne
@see Alcys\Core\Db\Condition\Condition::_likeLevelTwo
@see Alcys\Core\Db\Condition\Condition::_likeLevelThree

@return $this The current condition instance to concatenate method invokes.
@throws \Exception
Add a like condition to the condition array . The order of the method call is important in which way the condition string will concatenate .