toString

@param boolean $forcePair

@return  string
971101
public function toString($forcePair = false)
    {
        if ($this->getAttribute('disabled')) {
            $this->disabled = true;
            $this->setAttribute('disabled', null);
        }

        if ($this->getAttribute('readonly')) {
            $this->readonly = true;
            $this->setAttribute('readonly', null);
        }

        $this->prepareOptions();

        $attrs = $this->getAttributes();
        $attrs['id'] = $this->getAttribute('id');
        $attrs['class'] = $this->type . '-inputs ' . $this->getAttribute('class');

        $attrs['name'] = null;
        $attrs['onchange'] = null;
        $attrs['size'] = null;

        return HtmlBuilder::create($this->name, $this->content, $attrs, $forcePair);
    }
357636
public function getQueryFieldsSet(DataAbstract $data, $forceCheck = true)
    {
        //~ List of fields to update.
        $queryFields = array();

        //~ Check for updated fields.
        foreach ($this->fields as $field) {

            //~ Skip fields that are not updated
            if ($forceCheck && !$this->isDataUpdated($data, $field)) {
                continue;
            }

            $queryFields[] = $field . ' = :' . strtolower($field);

            $this->binds[':' . strtolower($field)] = $this->getDataValue($data, $field);
        }

        $set = '';
        if (!empty($queryFields)) {
            $set = 'SET ' . implode(', ', $queryFields);
        }

        return $set;
    }
822059
protected function valueToString($value) : string
    {
        if ($value === null) {
            $def_value = 'null';
        } elseif ($value === false) {
            $def_value = 'false';
        } elseif ($value === true) {
            $def_value = 'true';
        } elseif (is_string($value)) {
            $def_value = '"' . str_replace('"', '\\"', $value) . '"';
        } elseif (is_numeric($value)) {
            $def_value = '' . $value;
        }

        return $def_value;
    }
1030399
public function getServiceClass(string $serviceName, bool $forced = true): ?string {
        if(!isset($this->serviceClassNames[$serviceName])) {
            if($this->serviceExists($serviceName)) {
                /** @var ContainerInterface $container */
                $container = $this->serviceData[$serviceName];
                if($container->isInstanceLoaded()) {
                    $this->serviceClassNames[$serviceName] = get_class( $container->getInstance() );
                    goto finish;
                }

                if($container instanceof ServiceAwareContainerInterface) {
                    $this->serviceClassNames[$serviceName] = $container->getServiceClass();
                    goto finish;
                } elseif($container instanceof ConfiguredServiceContainer) {
                    $cfg = $container->getConfiguration();
                    // In case of a direct instance fonciguration, get this classname
                    if($cn = $cfg[AbstractFileConfiguration::SERVICE_CLASS] ?? NULL) {
                        $this->serviceClassNames[$serviceName] = $cn;
                        goto finish;

                    } elseif($cn = $cfg[AbstractFileConfiguration::CONFIG_SERVICE_TYPE_KEY] ?? NULL) {
                        // If the developer defined the class by configuration in case of container or file initialisation, use this.
                        $this->serviceClassNames[$serviceName] = $cn;
                        goto finish;
                    }
                }

                // If nothing worked before, finally load the instance
                if($forced)
                    $this->serviceClassNames[$serviceName] = get_class( $container->getInstance() );
            } else {
                // Mark as not existing
                $this->serviceClassNames[$serviceName] = false;
            }
        }

        finish:

        return $this->serviceClassNames[$serviceName] ?: NULL;
    }
94442
public static function toString($data, bool $dump = true): string
    {
        if (is_callable($data)) {
            return static::toString($data());
        }

        if (is_stringable($data)) {
            return (string) $data;
        }

        if (is_array($data)) {
            $data = $dump ? Arr::dump($data) : 'Array()';
        }

        if (is_object($data)) {
            $data = $dump ? Arr::dump($data) : sprintf('[Object %s]', get_class($data));
        }

        return (string) $data;
    }
1001654
public function ToString( $provider = null )
	{
		$result = "";
		if ( $this->S ) $result .= "-";
		if ( $this->IsLocal )
			$result .= $this->Value->format("--m-d");
		else
			if ( $this->Value->getOffset() == 0 )
				$result .= $this->Value->format("--m-d\Z");
			else
				$result .= $this->Value->format("--m-dP");

		return $result;
	}
188048
public function toString(bool $compact = false): string
    {
        if ($compact) {
            return \bin2hex($this->value);
        }
        
        return \vsprintf('%s%s-%s-%s-%s-%s%s%s', \str_split(\bin2hex($this->value), 4));
    }
280251
public function domain($forceBase = false)
    {
        $pattern = $this->domain;

        if ($pattern === null && $forceBase === true) {
            $pattern = $this->baseUrl;
        } elseif (Str::contains($pattern, '{{domain}}')) {
            $pattern = str_replace('{{domain}}', $this->baseUrl, $pattern);
        }

        return $pattern;
    }
163323
public function getDataChangeset($forceRecompute = false)
    {
        if (null === $this->dataChangeset || $forceRecompute) {
            $this->computeDataChangeset();
        }

        return $this->dataChangeset;
    }
130481
public function toString($indent = null)
    {
        $indent = ($indent !== null)
                ? $this->getWhitespace($indent)
                : $this->getIndent();

        $return    = $this->prefix;
        $keys      = array_keys($this->container);
        $lastIndex = end($keys);
        foreach ($this->container as $index => $item) {
            $item = array_merge($this->defaultParams, (array) $item);
            $return .= vsprintf($this->wrapper, $item);
            if ($index !== $lastIndex) {
                $return .= $this->separator;
            }
        }
        $return .= $this->postfix;

        return preg_replace("/(\r\n?|\n)[ ]*/", '$1' . $indent, $return);
    }
390621
public function toString($forcePair = false)
    {
        $tmpContent = clone $this->getContent();
        $tmpName = $this->getAttribute('name');

        $this->prepareOptions();

        if ($this->multiple) {
            $this->setAttribute('name', $this->getAttribute('name') . '[]');
        }

        $html = parent::toString($forcePair);

        $this->setAttribute('name', $tmpName);
        $this->setContent($tmpContent);

        return $html;
    }
1008376
public static function toString($value): string
    {
        if ($value === null) {
            return 'NULL';
        }

        if ($value === true) {
            return 'TRUE';
        }

        if ($value === false) {
            return 'FALSE';
        }

        if (is_object($value)) {
            return static::readObject($value);
        }

        if (is_array($value)) {
            return static::readArray($value);
        }

        if (is_resource($value)) {
            return static::readResource($value);
        }

        return (string) $value;
    }
768436
public function get_force_ltr() {
        $forceltr = parent::get_force_ltr();
        if ($forceltr === null) {
            return !is_rtl_compatible($this->paramtype);
        }
        return $forceltr;
    }
1227266
public function message($str, $force = false) {
        $pastMaxLevel = $this->currentLevel() > $this->getMaxLevel();

        if ($pastMaxLevel) {
            if ($force) {
                // Trace down the task list and output everything that hasn't already been output.
                foreach ($this->taskStack as $indent => $task) {
                    list($taskStr, $taskTimestamp, $taskOutput) = $this->taskStack[$indent];
                    if (!$taskOutput) {
                        if (!$this->isNewline) {
                            $this->write($this->eol);
                            $this->isNewline = true;
                        }
                        $this->write($this->fullMessageStr($taskTimestamp, $taskStr, $indent, true));
                        $this->taskStack[$indent][2] = true;
                    } else {
                        continue;
                    }
                }
            } else {
                return $this;
            }
        }

        if (!$this->isNewline) {
            $this->write($this->eol);
            $this->isNewline = true;
        }
        $this->write($this->messageStr($str, true));
        return $this;
    }
261732
public static function cleanRut(string $rut, bool $forceUppercase = true)
    {
        // Filter the RUT string and return only numbers and verification digit.
        $filtered = preg_filter('/(?!\d|k)./i', '', $rut) ?? $rut;

        // If the filtered RUT is not empty and over the 6 characters, we're good.
        if (!empty($filtered))
            return $forceUppercase ? strtoupper($filtered) : strtolower($filtered);
    }
1216567
public function getValue(FedoraResource $res, array $transformations = []): string {
        $overwrite = filter_input(INPUT_GET, $this->getName());
        if ($overwrite !== null) {
            $valueProp = '';
            $default = $overwrite;
        } else {
            $meta      = $this->getMetadata();
            $default   = $meta->all(RC::get('fedoraServiceParamDefaultValueProp'));
            $default   = count($default) > 0 ? (string) $default[0] : '';
            $valueProp = $meta->all(RC::get('fedoraServiceParamRdfPropertyProp'));
            if (count($valueProp) > 0) {
                $valueProp = (string) $valueProp[0];
            } else {
                $valueProp = '';
            }
        }
        return self::value($res, $valueProp, $default, $transformations);
    }
655809
public function toString(): string
    {
        $parts = array_map(
            function (RDN $rdn) {
                return $rdn->toString();
            }, array_reverse($this->_rdns));
        return implode(",", $parts);
    }