src/Norm/Cursor.php
public function match($q)
    {
        if (is_null($q)) {
            return $this;
        }

        $orCriteria = array();

        $schema = $this->collection->schema();

        if (empty($schema)) {
            throw new \Exception('[Norm\Cursor] Cannot use match for schemaless collection');
        }

        foreach ($schema as $key => $value) {
            $orCriteria[] = array($key.'!like' => $q);
        }

        $this->criteria = $this->translateCriteria(array('!or' => $orCriteria));

        return $this;
    }
public function match($q)
    {
        if (is_null($q)) {
            return $this;
        }

        $orCriteria = array();

        $schema = $this->collection->schema();

        if (empty($schema)) {
            throw new \Exception('[Norm\Cursor] Cannot use match for schemaless collection');
        }

        foreach ($schema as $key => $value) {
            $orCriteria[] = array($key.'!like' => $q);
        }

        $this->criteria = $this->translateCriteria(array('!or' => $orCriteria));

        return $this;
    }
public function match ( $ q ) { if ( is_null ( $ q ) ) { return $ this ; } $ orCriteria = array ( ) ; $ schema = $ this -> collection -> schema ( ) ; if ( empty ( $ schema ) ) { throw new \ Exception ( '[Norm\Cursor] Cannot use match for schemaless collection' ) ; } foreach ( $ schema as $ key => $ value ) { $ orCriteria [ ] = array ( $ key . '!like' => $ q ) ; } $ this -> criteria = $ this -> translateCriteria ( array ( '!or' => $ orCriteria ) ) ; return $ this ; }
Set query to match on every field exists in schema. Beware this will override criteria

@param string $q String to query

@return \Norm\Cursor Chainable object
Set query to match on every field exists in schema . Beware this will override criteria