public function nameContains($needle, $caseSensitive = null)
    {
        if ('' === $needle) {
            return true;
        }
        if (null === $caseSensitive) {
            $caseSensitive = false;
        }

        if ($caseSensitive) {
            return false !== mb_strpos($this->name(), $needle);
        }

        return false !== mb_stripos($this->name(), $needle);
    }
public function nameContains($needle, $caseSensitive = null)
    {
        if ('' === $needle) {
            return true;
        }
        if (null === $caseSensitive) {
            $caseSensitive = false;
        }

        if ($caseSensitive) {
            return false !== mb_strpos($this->name(), $needle);
        }

        return false !== mb_stripos($this->name(), $needle);
    }
public function nameContains ( $ needle , $ caseSensitive = null ) { if ( '' === $ needle ) { return true ; } if ( null === $ caseSensitive ) { $ caseSensitive = false ; } if ( $ caseSensitive ) { return false !== mb_strpos ( $ this -> name ( ) , $ needle ) ; } return false !== mb_stripos ( $ this -> name ( ) , $ needle ) ; }
Determine if this path's name contains a substring.

@param string       $needle        The substring to search for.
@param boolean|null $caseSensitive True if case sensitive.

@return boolean True if this path's name contains the substring.
Determine if this path s name contains a substring .