public function setStringContains($parameterIndex, $string)
    {
        if (!is_string($string)) {
            throw new CmisInvalidArgumentException('Parameter string must be of type string!');
        }

        $this->setParameter($parameterIndex, $this->escapeContains($string));
    }
public function setStringContains($parameterIndex, $string)
    {
        if (!is_string($string)) {
            throw new CmisInvalidArgumentException('Parameter string must be of type string!');
        }

        $this->setParameter($parameterIndex, $this->escapeContains($string));
    }
public function setStringContains ( $ parameterIndex , $ string ) { if ( ! is_string ( $ string ) ) { throw new CmisInvalidArgumentException ( 'Parameter string must be of type string!' ) ; } $ this -> setParameter ( $ parameterIndex , $ this -> escapeContains ( $ string ) ) ; }
Sets the designated parameter to the given string in a CMIS contains statement.

Note that the CMIS specification requires two levels of escaping. The first level escapes ', ", \ characters
to \', \" and \\. The characters *, ? and - are interpreted as text search operators and are not escaped
on first level.
If *, ?, - shall be used as literals, they must be passed escaped with \*, \? and \- to this method.

For all statements in a CONTAINS() clause it is required to isolate those from a query statement.
Therefore a second level escaping is performed. On the second level grammar ", ', - and \ are escaped with a \.
See the spec for further details.

Summary (input --> first level escaping --> second level escaping and output):
* --> * --> *
? --> ? --> ?
- --> - --> -
\ --> \\ --> \\\\
(for any other character following other than * ? -)
\* --> \* --> \\*
\? --> \? --> \\?
\- --> \- --> \\-
' --> \' --> \\\'
" --> \" --> \\\"

@param integer $parameterIndex the parameter index (one-based)
@param string $string the CONTAINS string
@throws CmisInvalidArgumentException If given value is not a string
Sets the designated parameter to the given string in a CMIS contains statement .