src/Encoder/StringEncoder.php
private function getComplexString($value, array $options)
    {
        if ($this->isBinaryString($value, $options)) {
            return $this->encodeBinaryString($value);
        }

        if ($options['string.escape']) {
            return $this->getDoubleQuotedString($value, $options);
        }

        return $this->getSingleQuotedString($value);
    }
private function getComplexString($value, array $options)
    {
        if ($this->isBinaryString($value, $options)) {
            return $this->encodeBinaryString($value);
        }

        if ($options['string.escape']) {
            return $this->getDoubleQuotedString($value, $options);
        }

        return $this->getSingleQuotedString($value);
    }
private function getComplexString ( $ value , array $ options ) { if ( $ this -> isBinaryString ( $ value , $ options ) ) { return $ this -> encodeBinaryString ( $ value ) ; } if ( $ options [ 'string.escape' ] ) { return $ this -> getDoubleQuotedString ( $ value , $ options ) ; } return $ this -> getSingleQuotedString ( $ value ) ; }
Returns the PHP code representation for the string that is not just simple ascii characters.
@param string $value The string to encode
@param array $options The string encoding options
@return string The PHP code representation for the complex string
Returns the PHP code representation for the string that is not just simple ascii characters .