Wrapper method for RiakCursor::hint().

@see http://php.net/manual/en/mongocursor.hint.php
@param array|string $keyPattern
@return self
972646
public function hint($keyPattern)
    {
        $this->hint = $keyPattern;
        $this->riakCursor->hint($keyPattern);
        return $this;
    }
1332048
public function notRegexp($pattern, $msg)
    {
        if(preg_match($pattern, (string)$this->_value)) {
            $this->_errors[] = $msg;
        }
        return $this;
    }
806669
protected static function isCallbackPattern($patternKey) {
		$patternKeyPrefix = self::getPatternKeyPrefix($patternKey);
		$patternPrefixesOptions = self::getFunctionalPatternPrefixesOptions();
		return ArrayHelper::keyExists($patternKeyPrefix, $patternPrefixesOptions);
	}
928529
public function setPropertiesHints(Array $hints) {
    foreach ($hints as $propertyName => $hint) {
      $this->getPropertyMeta($propertyName)
        ->setHint($hint);
    }
    return $this;
  }
754906
public function suggest($pattern)
    {
        $menuItems = $this->repository->createQueryBuilder('m')
            ->andWhere('m.name LIKE :pattern')
            ->getQuery()
            ->execute(array('pattern' => '%' . $pattern . '%'));

        $suggestions = array();
        foreach ($menuItems as $item) {
            $suggestions[]= array(
                'value' => $item->getName(),
                'label' => sprintf('%s (menu item)', $item)
            );
        }

        return $suggestions;
    }
237674
public function hscan($key, $cursor, $pattern = null, $count = null) {
        $params = [$key, $cursor];
        if (isset($pattern)) {
            $params[] = 'MATCH';
            $params[] = $pattern;
        }
        if (isset($count)) {
            $params[] = 'COUNT';
            $params[] = $count;
        }
        return $this->returnCommand(['HSCAN'], $key, $params);
    }
1243157
protected function keyReplacementPattern($keyName)
    {
        $key = $this->laravel['config']['webpush.vapid'];

        if ($keyName === 'VAPID_PUBLIC_KEY') {
            $key = $key['public_key'];
        } else {
            $key = $key['private_key'];
        }

        $escaped = preg_quote('='.$key, '/');

        return "/^{$keyName}{$escaped}/m";
    }
465402
public function addPattern($pattern, $childRuleName = null) {
        preg_match_all(
            '/\\\\.|' . // match \.
            '\(\?|[()]|' . // match "(" or ")"
            '\[\^?\]?(?:\\\\.|\[:[^]]*:\]|[^]\\\\])*\]|' . // match combination of "[]"
            '[^[()\\\\]+/', // match not in list "()\"
            $pattern, $matches);

        $groupDeep = 0;
        $pattern = '(';

        foreach ($matches[0] as $match) {
            switch ($match) {
                case '(':
                    $pattern .= '\\(';
                    break;

                case ')':
                    if ($groupDeep > 0) {
                        $groupDeep--;
                    } else {
                        $pattern .= '\\';
                    }
                    $pattern .= ')';
                    break;

                case '(?':
                    $groupDeep++;
                    $pattern .= '(?';
                    break;

                default:
                    $pattern .= substr($match, 0, 1) == '\\'
                        ? $match
                        : str_replace('/', '\\/', $match);
                    break;
            }
        }

        $pattern .= ')';

        $this->patterns[] = [
            'pattern'       => $pattern,
            'childRuleName' => $childRuleName,
        ];
    }
1250023
public function whereKeysLike($patterns)
    {
        if (! $patterns instanceof Collection) {
            $patterns = new Collection((array) $patterns);
        }

        /* @var Collection $patterns */

        if ($patterns->filter()->isEmpty()) {
            return new static($this->all());
        }

        /**
         * Return a subset of pairs that match any of the given patterns.
         */
        return $this->pairs()->filter(function (LineInterface $line) use ($patterns) {
            return $patterns->contains(function ($index, $pattern) use ($line) {
                return fnmatch($pattern, $line->key());
            });
        });
    }
333121
public function setRegexp($pattern)
    {
        $regexp = new RegularExpression();
        $regexp->setPattern($pattern);
        $this->_regexps[] = $regexp;
    }
343668
protected function writeln($pattern = null, ...$args)
    {
        if (!$this->hasOutput()) {
            return $this;
        }

        $this->getOutput()->writeln(vsprintf($pattern, $args));

        return $this;
    }
489542
public function iushrn($bits, $hint = 0, &$extended = null) {
        if( $hint != 0 )
            throw new Exception("Not implemented");

        assert(is_integer($bits) && $bits >= 0);

        if( $extended != null )
            $extended = $this->maskn($bits);
               
        if ($bits < 54) {
            $this->bi = $this->bi->div(1 << $bits);
        } else {
            $this->bi = $this->bi->div((new BigInteger(2))->pow($bits));
        }
        return $this;
    }
462632
private Map<String, String> getCustomMap(Pattern keyPattern) {
		Map<String, String> map = new HashMap<>();

		for (Iterator<Object> it = props.keySet().iterator(); it.hasNext();) {
			String key = (String) it.next();
			Matcher matcher = keyPattern.matcher(key);
			if (matcher.matches()) {

				String id = matcher.group(2);
				String propertyValue = props.getProperty(key);
				map.put(id, propertyValue);
			}
		}
		return map;
	}
917711
public function findByPattern($rulePattern) {
        $logger = $GLOBALS['logger'];
        $path    = 'rules/';
        $request = $this->_remoteServer->get($path);
        $query = $request->getQuery();
        $query->set('pattern',$rulePattern);
        $logger->info(print_r($query,1));
        //$request = $this->_remoteServer->get($path, array(), array('pattern'=>urlencode($rulePattern))); 
        try {
            $response = $request->send();
            if ($response->getStatusCode() !== 200) {
                throw new \Exception('Unable to handle request');
            }
            $rawResponse = $response->getBody('true');
            return $rawResponse;
        } catch (\Exception $e) {
            throw $e; 
        }
        
    }
1016988
public function pattern($pattern, $attr = null)
    {
        if (is_array($pattern)) {
            foreach ($pattern as $key => $value) {
                if (! in_array('{' . $key . '}', array_keys($this->patterns))) {
                    $this->patterns['{' . $key . '}'] = '(' . $value . ')';
                } else {
                    return $this->exception($key . ' pattern cannot be changed.');
                }
            }
        } else {
            if (! in_array('{' . $pattern . '}', array_keys($this->patterns))) {
                $this->patterns['{' . $pattern . '}'] = '(' . $attr . ')';
            } else {
                return $this->exception($pattern . ' pattern cannot be changed.');
            }
        }

        return true;
    }
431636
public function hScan($key, $cursor, $pattern = null, $count = null) {
        return $this->_scan('hscan', $key, $cursor, $pattern, $count);
    }
1017699
function setPattern(ptnMap, pattern) {
      if (ptnMap && isStr(ptnMap)) {
        isReg(pattern) ? patterns[ptnMap] = pattern : throwErr('reg');
      } else if (isObj(ptnMap)) {
        forIn(ptnMap, function (ptn, ptnVal) {
          isReg(ptnVal) ? patterns[ptn] = ptnVal : throwErr('reg');
        });
      };
    }