@param string $operatorString

@return IColumnComponentOperator
@throws InvalidArgumentException
426604
public function getOperator(string $operatorString) : \Dms\Core\Table\IColumnComponentOperator
    {
        if (!isset($this->validOperators[$operatorString])) {
            throw InvalidArgumentException::format(
                    'Invalid operator string for column component type for \'%s\': expecting one of (%s), %s given',
                    $this->phpType->asTypeString(), Debug::formatValues(array_keys($this->validOperators)), $operatorString
            );
        }

        return $this->validOperators[$operatorString];
    }
627752
public function whereCmp($field, $operator, $value)
    {
        if ($operator === '=') {
            $this->_filters[] = [$field => $this->normalizeValue($field, $value)];
        } elseif ($operator === '~=') {
            if ($this->_types && !isset($this->_types[$field])) {
                throw new InvalidArgumentException(['`:field` field is not exist in `:collection` collection',
                    'field' => $field,
                    'collection' => $this->getSource()
                ]);
            }

            if (is_scalar($value)) {
                if (is_int($value)) {
                    $this->_filters[] = [$field => ['$in' => [(string)$value, (int)$value]]];
                } elseif (is_float($value)) {
                    $this->_filters[] = [$field => ['$in' => [(string)$value, (float)$value]]];
                } else {
                    $this->_filters[] = [$field => ['$in' => [(string)$value, (int)$value, (float)$value]]];
                }
            } else {
                throw new InvalidValueException(['`:operator` operator is not  valid: value must be scalar value', 'operator' => $operator]);
            }
        } else {
            $operator_map = ['>' => '$gt', '>=' => '$gte', '<' => '$lt', '<=' => '$lte', '!=' => '$ne', '<>' => '$ne'];
            if (!isset($operator_map[$operator])) {
                throw new InvalidValueException(['unknown `:operator` operator', 'operator' => $operator]);
            }
            $this->_filters[] = [$field => [$operator_map[$operator] => $this->normalizeValue($field, $value)]];
        }

        return $this;
    }
1189315
public function getInlineOperator(string $operator): callable
    {
        if (!$this->hasInlineOperator($operator)) {
            throw new OperatorNotFoundException($operator, sprintf('Inline operator "%s" does not exist.', $operator));
        }

        return $this->inlineOperators[$operator];
    }
188916
public static function fromString(string $versionString) : Version
    {
        if (!preg_match(
            '#^'
            . '(v|release\-)?'
            . '(?P<core>(?:[0-9]|[1-9][0-9]+)(?:\.(?:[0-9]|[1-9][0-9]+)){2})'
            . '(?:\-(?P<preRelease>[0-9A-Za-z\-\.]+))?'
            . '(?:\+(?P<build>[0-9A-Za-z\-\.]+))?'
            . '$#',
            $versionString,
            $parts
        )) {
            throw InvalidVersionStringException::forVersionString($versionString);
        }

        [$major, $minor, $patch] = explode('.', $parts['core']);
        $preRelease = !empty($parts['preRelease']) ? PreRelease::fromIdentifiersString($parts['preRelease']) : new NoPreRelease();
        $build = !empty($parts['build']) ? Build::fromIdentifiersString($parts['build']) : new NoBuild();

        return static::fromParts((int) $major, (int) $minor, (int) $patch, $preRelease, $build);
    }
996049
public function slug($string) {
		if ($this->_config['slugger']) {
			$callable = $this->_config['slugger'];
			if (!is_callable($callable)) {
				throw new RuntimeException('Invalid callable passed as slugger.');
			}

			return $callable($string);
		}

		return Inflector::slug($string);
	}
860973
public static function endsWithInsensitive($stringOrStrings, $optionOrOptions)
    {
        return self::startsWithInternal($stringOrStrings, $optionOrOptions, true, false, true);
    }
32450
static function operatorHint( $tpl, $operatorName )
    {
        if ( isset( $tpl->Operators[$operatorName] ) and
             is_array( $tpl->Operators[$operatorName] ) )
        {
            $tpl->loadAndRegisterOperators( $tpl->Operators[$operatorName] );
        }
        $operatorObject =& $tpl->Operators[$operatorName];
        $operatorHint = false;
        if ( is_object( $operatorObject ) )
        {
            if ( method_exists( $operatorObject, 'operatorTemplateHints' ) )
            {
                $operatorHintArray = $operatorObject->operatorTemplateHints();
                if ( isset( $operatorHintArray[$operatorName] ) )
                {
                    $operatorHint = $operatorHintArray[$operatorName];
                }
            }
        }
        else if ( $tpl->testCompile() )
        {
            $tpl->warning( '', "Operator '$operatorName' is not registered." );
        }

        return $operatorHint;
    }
155389
private function mapOperator($operator)
    {
        if (array_key_exists($operator, $this->shortOperators)) {
            $operator = $this->shortOperators[$operator];
        }

        if (!in_array($operator, $this->allowedOperators)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid operator `%s` given. Valid operators are %s.',
                $operator,
                implode(', ', $this->allowedOperators)
            ));
        }

        return $operator;
    }
311096
public function unserialize($string)
    {
        if (version_compare($this->productMetadata->getVersion(), '2.2.0', '>=')) {
            $objManager = \Magento\Framework\App\ObjectManager::getInstance();
            /** @var \Magento\Framework\Serialize\Serializer\Json $serializer */
            $serializer = $objManager->create('Magento\Framework\Serialize\Serializer\Json');
            return $serializer->unserialize($string);
        }

        $result = json_decode($string, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \InvalidArgumentException('Unable to unserialize value.');
        }
        return $result;
    }
1141715
public static function FromString( $objectString )
   {

      if ( false !== ( $rgb = ColorTool::Color2Rgb( $objectString ) ) )
      {
         return new Color(
            ColorTool::Rgb2Hex(
               $rgb[ 0 ],
               $rgb[ 1 ],
               $rgb[ 2 ]
            )
         );
      }

      if ( false !== ( $hex = self::RgbStringToHex( $objectString ) ) )
      {
         return new Color( $hex );
      }

      return new Color();

   }
616554
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
    {
        $operatorValue = str_replace( "\n",
                                      "<br />",
                                      $operatorValue );
    }
217733
@Override
    protected String naryOperator(final NAryOperator operator, final String opString) {
        final List<Formula> operands = new ArrayList<>();
        for (final Formula op : operator) {
            operands.add(op);
        }
        final int size = operator.numberOfOperands();
        Collections.sort(operands, this.comparator);
        final StringBuilder sb = new StringBuilder();
        int count = 0;
        Formula last = null;
        for (final Formula op : operands) {
            if (++count == size) {
                last = op;
            } else {
                sb.append(operator.type().precedence() < op.type().precedence() ? toString(op) : bracket(op));
                sb.append(opString);
            }
        }
        if (last != null) {
            sb.append(operator.type().precedence() < last.type().precedence() ? toString(last) : bracket(last));
        }
        return sb.toString();
    }
914509
public function rawRun($commandString)
    {
        $this->validateCommand($commandString);

        /** @var $process \Symfony\Component\Process\Process */
        $process = new $this->processClass($commandString);
        $process->setTimeout($this->timeout);
        $process->run();

        if (!$process->isSuccessful()) {
            throw new RuntimeException($process->getErrorOutput());
        }

        return $process->getOutput();
    }
116843
public function setToString($toString)
    {
        if (!is_string($toString) && null !== $toString) {
            throw new \InvalidArgumentException('The attribute toString on the class Entity has to be string or null (' . gettype($toString) . ('object' === gettype($toString) ? ' ' . get_class($toString) : '') . ' given).');
        }

        $this->toString = $toString;

        return $this;
    }
177045
public function createServiceManagementService($connectionString)
    {
        $settings = ServiceManagementSettings::createFromConnectionString(
            $connectionString
        );

        $certificatePath = $settings->getCertificatePath();
        $httpClient = new HttpClient($certificatePath);
        $serializer = $this->serializer();
        $uri = Utilities::tryAddUrlScheme(
            $settings->getEndpointUri(),
            Resources::HTTPS_SCHEME
        );

        $serviceManagementWrapper = new ServiceManagementRestProxy(
            $httpClient,
            $settings->getSubscriptionId(),
            $uri,
            $serializer
        );

        // Adding headers filter
        $headers = [];

        $headers[Resources::X_MS_VERSION] = Resources::SM_API_LATEST_VERSION;

        $headersFilter = new HeadersFilter($headers);
        $serviceManagementWrapper = $serviceManagementWrapper->withFilter(
            $headersFilter
        );

        return $serviceManagementWrapper;
    }
672156
public static function createFromConnectionString($connectionString)
    {
        $tokenizedSettings = self::parseAndValidateKeys($connectionString);

        // Devstore case
        $matchedSpecs = self::matchedSpecification(
            $tokenizedSettings,
            self::allRequired(self::$_useDevelopmentStorageSetting),
            self::optional(self::$_developmentStorageProxyUriSetting)
        );
        if ($matchedSpecs) {
            $proxyUri = Utilities::tryGetValueInsensitive(
                Resources::DEVELOPMENT_STORAGE_PROXY_URI_NAME,
                $tokenizedSettings
            );

            return self::_getDevelopmentStorageAccount($proxyUri);
        }

        // Automatic case
        $matchedSpecs = self::matchedSpecification(
            $tokenizedSettings,
            self::allRequired(
                self::$_defaultEndpointsProtocolSetting,
                self::$_accountNameSetting,
                self::$_accountKeySetting
            ),
            self::optional(
                self::$_blobEndpointSetting,
                self::$_queueEndpointSetting,
                self::$_tableEndpointSetting
            )
        );
        if ($matchedSpecs) {
            return self::_createStorageServiceSettings(
                $tokenizedSettings,
                self::_getDefaultServiceEndpoint(
                    $tokenizedSettings,
                    Resources::BLOB_BASE_DNS_NAME
                ),
                self::_getDefaultServiceEndpoint(
                    $tokenizedSettings,
                    Resources::QUEUE_BASE_DNS_NAME
                ),
                self::_getDefaultServiceEndpoint(
                    $tokenizedSettings,
                    Resources::TABLE_BASE_DNS_NAME
                )
            );
        }

        // Explicit case
        $matchedSpecs = self::matchedSpecification(
            $tokenizedSettings,
            self::atLeastOne(
                self::$_blobEndpointSetting,
                self::$_queueEndpointSetting,
                self::$_tableEndpointSetting
            ),
            self::allRequired(
                self::$_accountNameSetting,
                self::$_accountKeySetting
            )
        );
        if ($matchedSpecs) {
            return self::_createStorageServiceSettings($tokenizedSettings);
        }

        self::noMatch($connectionString);
        return null;
    }
1330357
public function setOperatorValue(\Sulu\Bundle\ResourceBundle\Entity\OperatorValue $operatorValue)
    {
        $this->operatorValue = $operatorValue;

        return $this;
    }