@param mixed  $object
@param mixed  $statusType
@param string $default

@return string
167999
public function statusClass($object, $statusType = null, $default = '')
    {
        foreach ($this->statusServices as $statusService) {
            \assert($statusService instanceof StatusClassRendererInterface);

            if ($statusService->handlesObject($object, $statusType)) {
                return $statusService->getStatusClass($object, $statusType, $default);
            }
        }

        return $default;
    }
25500
protected static function renderObjectDump($object, int $level, bool $renderProperties = true, bool $plaintext = false, bool $ansiColors = false): string
    {
        $dump = '';
        $scope = '';
        $additionalAttributes = '';

        if ($object instanceof \Doctrine\Common\Collections\Collection || $object instanceof \ArrayObject) {
            // The doctrine Debug utility usually returns a \stdClass object that we need to cast to array.
            return self::renderArrayDump((array)\Doctrine\Common\Util\Debug::export($object, 3), $level, $plaintext, $ansiColors);
        }

        // Objects returned from Doctrine's Debug::export function are stdClass with special properties:
        try {
            $objectIdentifier = ObjectAccess::getProperty($object, 'Persistence_Object_Identifier', true);
        } catch (\Neos\Utility\Exception\PropertyNotAccessibleException $exception) {
            $objectIdentifier = spl_object_hash($object);
        }
        $className = ($object instanceof \stdClass && isset($object->__CLASS__)) ? $object->__CLASS__ : get_class($object);
        if (isset(self::$renderedObjects[$objectIdentifier]) || preg_match(self::getIgnoredClassesRegex(), $className) !== 0) {
            $renderProperties = false;
        }
        self::$renderedObjects[$objectIdentifier] = true;

        if (self::$objectManager !== null) {
            $objectName = self::$objectManager->getObjectNameByClassName(get_class($object));
            if ($objectName !== false) {
                switch (self::$objectManager->getScope($objectName)) {
                    case Configuration::SCOPE_PROTOTYPE:
                        $scope = 'prototype';
                        break;
                    case Configuration::SCOPE_SINGLETON:
                        $scope = 'singleton';
                        break;
                    case Configuration::SCOPE_SESSION:
                        $scope = 'session';
                        break;
                }
            } else {
                $additionalAttributes .= ' debug-unregistered';
            }
        }

        if ($renderProperties === true && !$plaintext) {
            if ($scope === '') {
                $scope = 'prototype';
            }
            $scope .= '<a id="o' . $objectIdentifier . '"></a>';
        }

        if ($plaintext) {
            $dump .= $className;
            $dump .= ($scope !== '') ? ' ' . self::ansiEscapeWrap($scope, '44;37', $ansiColors) : '';
        } else {
            $dump .= '<span class="debug-object' . $additionalAttributes . '" title="' . $objectIdentifier . '">' . $className . '</span>';
            $dump .= ($scope !== '') ? '<span class="debug-scope">' . $scope . '</span>' : '';
        }

        if (property_exists($object, 'Persistence_Object_Identifier')) {
            $persistenceIdentifier = $objectIdentifier;
            $persistenceType = 'persistable';
        } elseif ($object instanceof \Closure) {
            $persistenceIdentifier = 'n/a';
            $persistenceType = 'closure';
        } else {
            $persistenceIdentifier = 'unknown';
            $persistenceType = 'object';
        }

        if ($plaintext) {
            $dump .= ' ' . self::ansiEscapeWrap($persistenceType, '42;37', $ansiColors);
        } else {
            $dump .= '<span class="debug-ptype" title="' . $persistenceIdentifier . '">' . $persistenceType . '</span>';
        }

        if ($object instanceof ProxyInterface || (property_exists($object, '__IS_PROXY__') && $object->__IS_PROXY__ === true)) {
            if ($plaintext) {
                $dump .= ' ' . self::ansiEscapeWrap('proxy', '41;37', $ansiColors);
            } else {
                $dump .= '<span class="debug-proxy" title="' . $className . '">proxy</span>';
            }
        }

        if ($renderProperties === true) {
            if ($object instanceof \SplObjectStorage) {
                $dump .= ' (' . (count($object) ?: 'empty') . ')';
                foreach ($object as $value) {
                    $dump .= chr(10);
                    $dump .= str_repeat(' ', $level);
                    $dump .= self::renderObjectDump($value, 0, false, $plaintext, $ansiColors);
                }
            } else {
                $objectReflection = new \ReflectionObject($object);
                $properties = $objectReflection->getProperties();
                foreach ($properties as $property) {
                    if (preg_match(self::$blacklistedPropertyNames, $property->getName())) {
                        continue;
                    }
                    $dump .= chr(10);
                    $dump .= str_repeat(' ', $level) . ($plaintext ? '' : '<span class="debug-property">') . self::ansiEscapeWrap($property->getName(), '36', $ansiColors) . ($plaintext ? '' : '</span>') . ' => ';
                    $property->setAccessible(true);
                    $value = $property->getValue($object);
                    if (is_array($value)) {
                        $dump .= self::renderDump($value, $level + 1, $plaintext, $ansiColors);
                    } elseif (is_object($value)) {
                        $dump .= self::renderObjectDump($value, $level + 1, true, $plaintext, $ansiColors);
                    } else {
                        $dump .= self::renderDump($value, $level, $plaintext, $ansiColors);
                    }
                }
            }
        } elseif (isset(self::$renderedObjects[$objectIdentifier])) {
            if (!$plaintext) {
                $dump = '<a href="#o' . $objectIdentifier . '" onclick="document.location.hash=\'#o' . $objectIdentifier . '\'; return false;" class="debug-seeabove" title="see above">' . $dump . '</a>';
            }
        }

        return $dump;
    }
333052
private static function fetch410Timestamp(int $statusCode, string $body): string
    {
        if($statusCode === 410) {
            return (string)(json_decode($body, true)['timestamp'] ?: '');
        }
        return '';
    }
58858
private function ensureDefaults(ContentObject $object)
    {
        $defaultProperties = ['main_language_code'];

        foreach ($defaultProperties as $defaultOption) {
            if (!$object->getProperty($defaultOption)) {
                $object->setProperty($defaultOption, $this->options[$defaultOption]);
            }
        }
    }
646164
public function getPayload(string $key, $default = null)
    {
        if ($this->payload === null) {
            $contentType = $this->getHeader('Content-Type', '');
            if (!$contentType) {
                $contentType = $this->getHeader('Content-type');
            }

            if ($contentType) {
                $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType);
                $contentType = $contentTypeParts[0];
                $contentType = strtolower($contentType);
                if (isset($this->bodyParsers[$contentType])) {
                    $parser = $this->bodyParsers[$contentType];
                    $this->payload = $parser($this->body);
                }
            }
        }

        return $this->payload[$key] ?? $default;
    }
687132
public static function post($key = null, $type = 'string', $defaultValue = '')
    {
        if (!$key) {
            return $_POST;
        }
        return self::typeConvert(isset($_POST[$key]) ? $_POST[$key] : $defaultValue, $type);
    }
779352
public static function json($data, $status = NULL) {
        if ($status) {
            parent::setStatus($status);
        }
        parent::setContentType('application/json');
        return json_encode($data);
    }
366316
public function get($property, $type = null, $default = null)
    {
        if (!isset($this->param[$property])) {
            return $default;
        }

        if (isset($type)) {
            $method = TypeCast::METHODPREFIX . $type;

            return TypeCast::$method($this->param[$property]);
        }

        return $this->param[$property];
    }
1260999
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->inputType) && ($filter === null || isset($filter['inputType']))) {
			$output .= "\x12";
			$output .= Binary::encodeVarint(strlen($object->inputType));
			$output .= $object->inputType;
		}

		if (isset($object->outputType) && ($filter === null || isset($filter['outputType']))) {
			$output .= "\x1a";
			$output .= Binary::encodeVarint(strlen($object->outputType));
			$output .= $object->outputType;
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x22";
			$buffer = MethodOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		if (isset($object->clientStreaming) && ($filter === null || isset($filter['clientStreaming']))) {
			$output .= "\x28";
			$output .= Binary::encodeVarint((int)$object->clientStreaming);
		}

		if (isset($object->serverStreaming) && ($filter === null || isset($filter['serverStreaming']))) {
			$output .= "\x30";
			$output .= Binary::encodeVarint((int)$object->serverStreaming);
		}

		return $output;
	}
60987
public static function fd($object, $type = 'log')
    {
        $types = array('log', 'debug', 'info', 'warn', 'error', 'assert');

        if (!\in_array($type, $types, true)) {
            $type = 'log';
        }

        $data = json_encode($object);

        echo '<script type="text/javascript">console.' . $type . '(' . $data . ');</script>';
    }
277118
function status( $asObject = false )
    {
        if ( $asObject )
            return eZOrderStatus::fetch( $this->StatusID );
        else
            return $this->StatusID;
    }
819511
public static function statusToStr($status) {
        if (!is_int($status)) throw new IllegalTypeException('Illegal type of parameter $status: '.gettype($status));

        switch ($status) {
            case PGSQL_EMPTY_QUERY   : return 'PGSQL_EMPTY_QUERY';
            case PGSQL_COMMAND_OK    : return 'PGSQL_COMMAND_OK';
            case PGSQL_TUPLES_OK     : return 'PGSQL_TUPLES_OK';
            case PGSQL_COPY_OUT      : return 'PGSQL_COPY_OUT';
            case PGSQL_COPY_IN       : return 'PGSQL_COPY_IN';
            case PGSQL_BAD_RESPONSE  : return 'PGSQL_BAD_RESPONSE';
            case PGSQL_NONFATAL_ERROR: return 'PGSQL_NONFATAL_ERROR';
            case PGSQL_FATAL_ERROR   : return 'PGSQL_FATAL_ERROR';
        }
        return (string) $status;
    }
850282
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->number) && ($filter === null || isset($filter['number']))) {
			$output .= "\x18";
			$output .= Binary::encodeVarint($object->number);
		}

		if (isset($object->label) && ($filter === null || isset($filter['label']))) {
			$output .= "\x20";
			$output .= Binary::encodeVarint($object->label);
		}

		if (isset($object->type) && ($filter === null || isset($filter['type']))) {
			$output .= "\x28";
			$output .= Binary::encodeVarint($object->type);
		}

		if (isset($object->typeName) && ($filter === null || isset($filter['typeName']))) {
			$output .= "\x32";
			$output .= Binary::encodeVarint(strlen($object->typeName));
			$output .= $object->typeName;
		}

		if (isset($object->extendee) && ($filter === null || isset($filter['extendee']))) {
			$output .= "\x12";
			$output .= Binary::encodeVarint(strlen($object->extendee));
			$output .= $object->extendee;
		}

		if (isset($object->defaultValue) && ($filter === null || isset($filter['defaultValue']))) {
			$output .= "\x3a";
			$output .= Binary::encodeVarint(strlen($object->defaultValue));
			$output .= $object->defaultValue;
		}

		if (isset($object->oneofIndex) && ($filter === null || isset($filter['oneofIndex']))) {
			$output .= "\x48";
			$output .= Binary::encodeVarint($object->oneofIndex);
		}

		if (isset($object->jsonName) && ($filter === null || isset($filter['jsonName']))) {
			$output .= "\x52";
			$output .= Binary::encodeVarint(strlen($object->jsonName));
			$output .= $object->jsonName;
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x42";
			$buffer = FieldOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		return $output;
	}
1197537
protected function updateStatus( $post, $status ) {

		// Update Post Status
		$this->modelService->updateStatus( $post, $status );

		return $this->checkStatus( $post );
	}
425478
protected function getPropertyValue($object, string $propertyName, $default = null)
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('The first argument should be an object');
        }

        if (!property_exists($object, $propertyName)) {
            return $default;
        }

        try {
            $reflectionProperty = new ReflectionProperty($object, $propertyName);
            $reflectionProperty->setAccessible(true);

            return $reflectionProperty->getValue($object);
        } catch (ReflectionException $e) {
            return $default;
        }
    }
127469
public function getStatusClass($status)
    {
        switch ($status) {
            case static::Status_Success:
                $result = 'success';
                break;
            case static::Status_Info:
                $result = 'info';
                break;
            case static::Status_Warning:
                $result = 'warning';
                break;
            case static::Status_Error:
            default:
                $result = 'error';
                break;
        }
        return $result;
    }
47566
public static function objectToString($object): string {
        //TODO do type hinting when possible
        if (!\is_object($object)) {
            throw new InvalidKeyTypeException("key has to be an object, " . \gettype($object) . "given");
        }
        return \serialize($object);
    }