@param string $contentKey
@param string $className
@param array  $inputData

@return array|null
354580
public function setRepeaters($contentKey, $className, $inputData = null)
    {
        $standalone = false;

        if ($inputData === null && !isset($this->contenttypes[$contentKey])) {
            return null;
        }

        if ($inputData === null) {
            $inputData = $this->contenttypes[$contentKey]['fields'];
        } else {
            $standalone = true;
        }

        foreach ($inputData as $key => $data) {
            $mapping = [
                'fieldname'        => $key,
                'attribute'        => $this->camelize($key),
                'type'             => 'null',
                'fieldtype'        => $this->typemap['repeater'],
                'tables'           => [
                    'field'        => $this->schemaManager->getTableName('field'),
                    'field_value'  => $this->schemaManager->getTableName('field_value'),
                ],
            ];

            if (in_array($data['type'], ['repeater', 'block'])) {
                if ($data['type'] === 'repeater') {
                    $this->normalizeFieldTypes($data['fields']);
                }
                if ($data['type'] === 'block') {
                    foreach ($data['fields'] as $block => &$fields) {
                        $this->normalizeFieldTypes($fields['fields']);
                    }
                    $mapping['fieldtype'] = $this->typemap['block'];
                }

                if ($standalone) {
                    return $data;
                }

                $this->metadata[$className]['fields'][$key] = $mapping;
                foreach ((array) $data['fields'] as &$field) {
                    $this->postProcessField($field);
                }

                $this->metadata[$className]['fields'][$key]['data'] = $data;
            }
        }

        return null;
    }
124000
public function getContent(?string $contentType = null, ?string $contentKey = null): Core\ViewResource
    {
        return new Core\ViewResource($this->_getContent(@$this->content[$contentType][$contentKey]));
    }
813298
private function resolveContentCreateForm(
        ContentCreateData $contentCreateData,
        string $languageCode
    ): FormInterface {
        return $this->formFactory->create(ContentEditType::class, $contentCreateData, [
            'languageCode' => $languageCode,
            'mainLanguageCode' => $languageCode,
            'drafts_enabled' => true,
        ]);
    }
1298357
public static function KeyExists($key = null, array $inputArrayToSearch = null){

		//check for the existance of the implementation class
		self::setImplmentationClass();

		//set the input parameters in a try...catch block for better error handling
		try {

			//set the value of the key paramter to use for searching in the input array
			$key = ( ! is_null($key)) ? $key : self::$ArrayHelperClassInstance->getMethodArgs('key');

			//set the value fo the $inputArray parameter
			$inputArrayToSearch = ( ! is_null($inputArrayToSearch)) ? $inputArrayToSearch : self::$ArrayHelperClassInstance->getOutputElement();

			//check if null was supplied for the $key parameter
			if($key === null) throw new ArrayHelperException("NULL \$key value passed to ArrayHelper::KeyExists() method which checks if an array key exists. A valid string is expected!", 1);

			//check if null value was set for the inputArray paramter
			if($inputArrayToSearch === null) throw new ArrayHelperException("NULL \$array value passed to ArrayHelper::KeyExists() method which checks if an array key exists. A valid array is expected!", 1);
			
			//call the implementation class to check for defined key in the input array
			self::$ArrayHelperClassInstance->KeyExists($key, $inputArrayToSearch);

			//return the static instance
			return new static;

		} 

		//catch the error messages here
		catch (ArrayHelperException $ArrayHelperExceptionInstance) {

			//diplay the error message
			$ArrayHelperExceptionInstance->errorShow();
			
		}

	}
756199
protected function wrapData($dataArray, $dataKey = null)
    {
        if (!$dataKey) $dataKey = $this->getResourcePostKey();

        return array($dataKey => $dataArray);
    }
129840
public function countRecords($contentTypeName = null, DataDimensions $dataDimensions = null)
    {
        if ($contentTypeName == null) {
            $contentTypeName = $this->getCurrentContentTypeName();
        }

        if ($dataDimensions == null) {
            $dataDimensions = $this->getCurrentDataDimensions();
        }

        $tableName = $this->getContentTypeTableName($contentTypeName);

        $sql = 'SELECT COUNT(*) AS C FROM ' . $tableName . ' WHERE workspace = ? AND language = ? AND deleted = 0 AND validfrom_timestamp <= ? AND validuntil_timestamp > ?';

        $timestamp = TimeShifter::getTimeshiftTimestamp($dataDimensions->getTimeShift());

        $row = $this->getDatabase()
                    ->fetchOneSQL($sql, [$dataDimensions->getWorkspace(), $dataDimensions->getLanguage(), $timestamp, $timestamp]);

        return $row['C'];
    }
1102350
public function input(string $key = null, $default = null)
    {
        $inputs = $this->getQueryParams() + $this->getParsedBody();
        if (is_null($key)) {
            return $inputs;
        }
        return $inputs[$key] ?? $default;
    }
442057
private function processBeginRequestRecord(int $requestId, ?string $contentData): void
    {
        if (isset($this->requests[$requestId])) {
            throw new ProtocolException('Unexpected FCGI_BEGIN_REQUEST record');
        }

        $contentFormat = 'nrole/Cflags/x5';

        $content = unpack($contentFormat, $contentData);

        $keepAlive = DaemonInterface::FCGI_KEEP_CONNECTION & $content['flags'];

        $this->requests[$requestId] = [
            'keepAlive' => $keepAlive,
            'stdin'     => fopen('php://temp', 'r+'),
            'params'    => [],
        ];

        if ($this->shutdown) {
            $this->endRequest($requestId, 0, DaemonInterface::FCGI_OVERLOADED);

            return;
        }

        if (DaemonInterface::FCGI_RESPONDER !== $content['role']) {
            $this->endRequest($requestId, 0, DaemonInterface::FCGI_UNKNOWN_ROLE);

            return;
        }
    }
520481
protected function parseData( array $data, $arrayKey = null )
	{
		if ( is_null( $arrayKey ) )
		{
			$this->files = [];
		}

		foreach ( $data as $key => $value )
		{
			$key = ( $arrayKey ) ? "$arrayKey.$key" : $key;

			// If this value is an instance of the HttpFoundation File class we will
			// remove it from the data array and add it to the files array, which
			// we use to conveniently separate out these files from other data.
			if ( $value instanceof File )
			{
				$this->files[$key] = $value;

				unset( $data[$key] );
			}
			elseif ( is_array( $value ) )
			{
				$this->parseData( $value, $key );
			}
		}

		return $data;
	}
565817
protected function getSetterParameter($mappedClassName, $key)
    {
        $reflection = $this->getMethodReflection($mappedClassName, $this->getSetterName($key));
        $params = $reflection->getParameters();
        if (count($params) !== 1) {
            throw new InvalidClassMappingException('Wrong Argument Count in Setter for property ' . $key);
        }

        return reset($params);
    }
1124826
public function revert(AbstractClassContent $content, array $data = [])
    {
        if (0 === count($data)) {
            $data['parameters'] = array_keys($content->getAllParams());
            if ($content instanceof ContentSet) {
                $data['elements'] = true;
            } else {
                $data['elements'] = array_keys($content->getData());
            }
        }

        if (!isset($data['parameters']) && !isset($data['elements'])) {
            throw new \InvalidArgumentException('Provided data are not valids for ClassContentManager::revert.');
        }

        if (null === $draft = $this->getDraft($content)) {
            throw new InvalidArgumentException(sprintf(
                '%s with identifier "%s" has not draft, nothing to revert.',
                $content->getContentType(),
                $content->getUid()
            ));
        }

        $this->executeRevert($content, $draft, $data);
        $this->revertPostProcess($content, $draft);

        return $this;
    }
378304
public function removeContentKeyFromAsset($asset, $contentKey)
    {
        $assetId = Utilities::getEntityId(
            $asset,
            'WindowsAzure\MediaServices\Models\Asset'
        );

        $contentKeyId = Utilities::getEntityId(
            $contentKey,
            'WindowsAzure\MediaServices\Models\ContentKey'
        );

        $method = Resources::HTTP_DELETE;
        $path = "Assets('{$assetId}')/\$links/ContentKeys('{$contentKeyId}')";
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_NO_CONTENT;

        $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode
        );
    }
1324329
public function decode(string $data, string $contentType): array
    {
        return $this->decoder->decode($data, $contentType);
    }
1012563
public function loadInlineFields($parentKey)
    {
        $json = $this->load();
        $inlineFields = array();
        foreach ($json as $table) {
            if ($table["tca"]) {
                foreach ($table["tca"] as $key => $tca) {
                    if ($tca["inlineParent"] == $parentKey) {
                        if ($tca["config"]["type"] == "inline") {
                            $tca["inlineFields"] = $this->loadInlineFields($key);
                        }
                        $tca["maskKey"] = "tx_mask_" . $tca["key"];
                        $inlineFields[] = $tca;
                    }
                }
            }
        }
        return $inlineFields;
    }
994145
function contentActionList()
    {
        $dataType = $this->dataType();
        if ( $dataType )
        {
            return $dataType->contentActionList( $this->contentClassAttribute() );
        }
        return false;
    }
923713
public function commit(AbstractClassContent $content, array $data = [])
    {
        foreach ($this->getAllClassContentClassnames() as $classname) {
            class_exists($classname);
        }

        if (null === $draft = $this->getDraft($content)) {
            throw new InvalidArgumentException(sprintf(
                '%s with identifier "%s" has not draft, nothing to commit.',
                $content->getContentType(),
                $content->getUid()
            ));
        }

        if (isset($data['parameters']) || isset($data['elements'])) {
            $cleanDraft = clone $draft;
            $this->prepareDraftForCommit($content, $draft, $data);
            $this->executeCommit($content, $draft);
            $this->commitPostProcess($content, $cleanDraft);
        } else {
            $this->executeCommit($content, $draft);
        }

        return $this;
    }
337814
public function push(AbstractClassContent $var)
    {
        if (!($this->_content instanceof ContentSet)) {
            throw new ClassContentException(
                sprintf('Can not push in a content %s.', get_class($this)),
                ClassContentException::UNKNOWN_ERROR
            );
        }

        if ($this->isAccepted($var)) {
            $this->_data[] = array(get_class($var) => $var->getUid());
        }

        return $this->getContent();
    }