Returns the StringSyntax instance.

@return Tarsana\Syntax\StringSyntax
3425
public static function instance() : StringSyntax
    {
        if (self::$instance === null)
            self::$instance = new StringSyntax;
        return self::$instance;
    }
905534
public function ucfirst(){
		
		if($this->isNullOrWhitespace()){
			return clone $this;
		}
		else if($this->count() === 1){
			return new static(\mb_strtoupper($this->_Value, $this->_Encoding),
					$this->_Encoding);
		}
		
		$str = $this[0]->ucfirst() . $this->substring(1);
		
		return new static($str, $this->_Encoding);
		
	}
25293
public function toString()
    {
        $matchToString = function ($key, $value) {
            return ' "' . $key . '" is "' . $value . '"';
        };

        $matchesToString = function ($matches) use ($matchToString) {
            $matchesAsString = implode(' and ', array_map(
                $matchToString,
                array_keys($matches),
                array_values($matches)
            ));

            return '(' . $matchesAsString . ')';
        };

        $allMatchesAsString = implode(
            "\n or ",
            array_map($matchesToString, $this->matches)
        );


        return $this->getStubForToString() . $allMatchesAsString;
    }
794766
public function getStringPacker()
    {
        if ($this->stringPacker === null) {
            $packer = new StringPacker();
            $this->stringPacker = $packer;
        }
        return $this->stringPacker;
    }
1185999
function ToString()
    {
        $result = (string)$this->type;
        if ($this->value)
        {
            $result .= '=' . $this->value;
        }
        return $result;
    }
1089254
function ToString()
    {
        $resultArr = array((string)$this->tables[0]);
        foreach ($this->tables as $key=>$table)
        {
            if ($key == 0)
                 continue;
                
            $part = (string)$this->joins[$key - 1]; 
            $part .= ' ' . (string)$table;
            $part .= ' ON ' . (string)$this->conditions[$key - 1];

            $resultArr[] = $part;
        }
        return join(' ', $resultArr);
    }
1369363
public function asString(): string
    {
        $parts = [];
        foreach ($this->acceptables as $acceptable => $priority) {
            if (1.0 === $priority) {
                $parts[] = $acceptable;
            } else {
                $parts[] = $acceptable . ';q=' . $priority;
            }
        }

        return join(',', $parts);
    }
1130438
public function asDotSyntax()
    {
        $dotSyntax = $this->applyDotSyntax($this->compressed);
        $this->compressed = $dotSyntax;

        return $dotSyntax;
    }
1171639
public function toString()
    {
        $options = $this->toArray();

        //Transforms values as strings
        array_walk($options, function (&$value, $key) {
            if (is_array($value)) {
                $value = implode(' ', $value);
            } elseif (is_bool($value)) {
                $value = $value ? 'true' : 'false';
            } elseif (is_null($value)) {
                $value = 'null';
            }

            $value = $key . '="' . $value . '"';
        });

        return implode(' ', $options);
    }
991728
public function toString()
    {
        $constraints = [];
        foreach ($this->constraints as $name=>$constraint) {
            $constraints[] = "$constraint";
        }
        return implode($this->toStringSeparator, $constraints);
    }
201039
public function getDefaultStringFormat()
    {
        if (!$this->defaultStringFormat && $this->getDatabase() && $this->getDatabase()->getDefaultStringFormat()) {
            return $this->getDatabase()->getDefaultStringFormat();
        }

        return $this->defaultStringFormat;
    }
105050
public function toString()
	{
		$this->_generateBaseString();
		$this->_addName();
		$this->_addType();
		$this->_addRestriction();
		$this->_addDefault();

		return $this->_asString;
	}
183118
public function getHmacString()
    {
        $retval = "";
        $retval .= $this->expandString($this->merchant);
        $retval .= $this->expandString($this->orderRef);
        $retval .= $this->expandString($this->orderDate);
        $retval .= $this->expandArray($this->orderPName);
        $retval .= $this->expandArray($this->orderPCode);
        if (is_array($this->orderPInfo) && !empty($this->orderPInfo)) {
            $retval .= $this->expandArray($this->orderPInfo);
        }
        $retval .= $this->expandArray($this->orderPrice);
        $retval .= $this->expandArray($this->orderQty);
        $retval .= $this->expandArray($this->orderVAT);
        if (is_array($this->orderVer) && !empty($this->orderVer)) {
            $retval .= $this->expandArray($this->orderVer);
        }

        //if(!empty($this->orderShipping))
        if (is_numeric($this->orderShipping) && $this->orderShipping >= 0) {
            $retval .= $this->expandString($this->orderShipping);
        }

        if (is_string($this->pricesCurrency) && !empty($this->pricesCurrency)) {
            $retval .= $this->expandString($this->pricesCurrency);
        }
        if (is_numeric($this->discount) && !empty($this->discount)) {
            $retval .= $this->expandString($this->discount);
        }
        if (is_string($this->destinationCity) && !empty($this->destinationCity)) {
            $retval .= $this->expandString($this->destinationCity);
        }
        if (is_string($this->destinationState) && !empty($this->destinationState)) {
            $retval .= $this->expandString($this->destinationState);
        }
        if (is_string($this->destinationCountry) && !empty($this->destinationCountry)) {
            $retval .= $this->expandString($this->destinationCountry);
        }
        if (is_string($this->payMethod) && !empty($this->payMethod)) {
            $retval .= $this->expandString($this->payMethod);
        }
        if (is_array($this->orderPGroup) && count($this->orderPGroup)) {
            $retval .= $this->expandArray($this->orderPGroup);
        }
        if (is_array($this->orderPType) && count($this->orderPType)) {
            $retval .= $this->expandArray($this->orderPType);
        }

        return $retval;
    }
355347
public function getStmt()
    {
        // Make sure there are no nested arrays
        if (ArrayUtils::hasAtLeastOneArrayValue($this->bindings)) {
            throw new RuntimeException('PDO bindings can not contain nested arrays');
        }

        // Build target query before bindings are cleared purely for logging purpose
        $log = str_replace(array_keys($this->bindings), array_values($this->bindings), $this->queryBuilder->getQueryString());

        // Execute it
        $stmt = $this->pdo->prepare($this->queryBuilder->getQueryString());
        $stmt->execute($this->bindings);

        // Log target query
        $this->queryLogger->add($log);

        // Clear the buffer
        $this->clear();

        return $stmt;
    }
1212037
public function getSyntaxHighlighterStrings() {

        $strings = new SyntaxHighlighterStrings();
        $strings->setAlert($this->getTranslator()->trans("strings.alert", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setBrushNotHtmlScript($this->getTranslator()->trans("strings.brush_no_html_script", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setCopyToClipboard($this->getTranslator()->trans("strings.copy_to_clipboard", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setCopyToClipboardConfirmation($this->getTranslator()->trans("strings.copy_to_clipboard_confirmation", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setExpandSource($this->getTranslator()->trans("strings.expand_source", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setHelp($this->getTranslator()->trans("strings.help", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setNoBrush($this->getTranslator()->trans("strings.no_brush", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setPrint($this->getTranslator()->trans("strings.print", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));
        $strings->setViewSource($this->getTranslator()->trans("strings.view_source", [], "WBWSyntaxHighlighterBundle", $this->getTranslator()->getLocale()));

        return $strings;
    }
1248182
public function getSqlString() {
        $sql = $this->getSQL();
        if ($sql && $this->values) {
            foreach ($this->values as $value) {
                list ($name, $val, $type, , $rkey) = $value;
                if ($this->whereData) {
                    $val = isset($this->whereData[ $rkey ]) ? $this->whereData[ $rkey ] : (isset($this->whereData[ $name ]) ? $this->whereData[ $name ] : $val);
                }
                if ($type == \PDO::PARAM_STR) {
                    $sql = str_replace($name, $this->dialect->quote($val), $sql);
                } else {
                    $sql = str_replace($name, $val, $sql);
                }
            }
        }

        return $sql;
    }
139534
public function getBaseStringBuilder()
    {
        if ($this->baseStringBuilder instanceof BaseStringBuilderInterface) {
            return $this->baseStringBuilder;
        }

        return $this->baseStringBuilder = new BaseStringBuilder(new UriParser());
    }