public function keys($search = null, $caseSensitive = false)
    {
        if ($search === null) {
            return array_keys($this->identifierParts);
        }

        if ($caseSensitive === true) {
            return array_keys($this->identifierParts, $search);
        }

        $search = strtolower($search);
        $keys = array_keys($this->identifierParts);

        $keys = array_filter($keys, function ($key) use ($search) {
            return strtolower($this->identifierParts[$key]) === $search;
        });

        return array_values($keys);
    }
public function keys($search = null, $caseSensitive = false)
    {
        if ($search === null) {
            return array_keys($this->identifierParts);
        }

        if ($caseSensitive === true) {
            return array_keys($this->identifierParts, $search);
        }

        $search = strtolower($search);
        $keys = array_keys($this->identifierParts);

        $keys = array_filter($keys, function ($key) use ($search) {
            return strtolower($this->identifierParts[$key]) === $search;
        });

        return array_values($keys);
    }
public function keys ( $ search = null , $ caseSensitive = false ) { if ( $ search === null ) { return array_keys ( $ this -> identifierParts ) ; } if ( $ caseSensitive === true ) { return array_keys ( $ this -> identifierParts , $ search ) ; } $ search = strtolower ( $ search ) ; $ keys = array_keys ( $ this -> identifierParts ) ; $ keys = array_filter ( $ keys , function ( $ key ) use ( $ search ) { return strtolower ( $ this -> identifierParts [ $ key ] ) === $ search ; } ) ; return array_values ( $ keys ) ; }
Get the keys of the identifier parts that match the specified string, or
the keys of all parts if no string provided

@param string|null $search        The value of the identifier part to
match
@param bool        $caseSensitive Perform a case-sensitive comparison.
Defaults to FALSE

@return array The array of matching integer keys
Get the keys of the identifier parts that match the specified string or the keys of all parts if no string provided