Return the context formated for DynamoDB
@return array
176543
public function getForDynamoDB()
    {
        $parameters = array();

        $expected = $this->expected;
        if (null !== $expected) {
            $expectedParameters = array();
            foreach ($expected as $name => $attribute) {
                /** @var $attribute \Riverline\DynamoDB\Attribute */
                $expectedParameters[$name] = $attribute->getForDynamoDB();
            }
            $parameters['Expected'] = $expectedParameters;
        }

        $returnValues = $this->returnValues;
        if (null !== $returnValues) {
            $parameters['ReturnValues'] = $returnValues;
        }
        
        return $parameters;
    }
1137131
public function getBusinessEntityExtends()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $aExtends = [];

        foreach ($this->_aBusinessEntityExtends as $sExtend) {
            $aExtends[$sExtend] = $myConfig->getConfigParam($sExtend);
        }

        return $aExtends;
    }
763721
private function getResourceContext()
    {
        if (null === $this->httpProxy["host"] || null === $this->httpProxy["port"]) {
            return null;
        }

        $options = array();
        foreach (array("http", "https") as $protocol) {
            $options[$protocol] = array(
                "method"          => "GET",
                "proxy"           => sprintf("tcp://%s:%s", $this->httpProxy["host"], $this->httpProxy["port"]),
                "request_fulluri" => true
            );

            if (null !== $this->httpProxy["auth"]) {
                $options[$protocol]["header"] = sprintf("Proxy-Authorization: Basic %s", base64_encode($this->httpProxy["auth"]));
            }
        }

        return stream_context_create($options);
    }
1275886
public function getSchemaDataDefaults()
    {
        return [
            'name' => $this->getName(),
            'id' => $this->ID(),
            'type' => $this->getInputType(),
            'schemaType' => $this->getSchemaDataType(),
            'component' => $this->getSchemaComponent(),
            'holderId' => $this->HolderID(),
            'title' => $this->obj('Title')->getSchemaValue(),
            'source' => null,
            'extraClass' => $this->extraClass(),
            'description' => $this->obj('Description')->getSchemaValue(),
            'rightTitle' => $this->obj('RightTitle')->getSchemaValue(),
            'leftTitle' => $this->obj('LeftTitle')->getSchemaValue(),
            'readOnly' => $this->isReadonly(),
            'disabled' => $this->isDisabled(),
            'customValidationMessage' => $this->getCustomValidationMessage(),
            'validation' => $this->getSchemaValidation(),
            'attributes' => [],
            'autoFocus' => $this->isAutofocus(),
            'data' => [],
        ];
    }
5403
public static function get()
    {
        // Use DynamoDB for distributed session storage if it's configured
        $awsDynamoDBSessionTable = Environment::getEnv('AWS_DYNAMODB_SESSION_TABLE');
        if (!empty($awsDynamoDBSessionTable)) {
            $awsRegionName = Environment::getEnv('AWS_REGION_NAME');
            $awsDynamoDBEndpoint = Environment::getEnv('AWS_DYNAMODB_ENDPOINT');
            $awsAccessKey = Environment::getEnv('AWS_ACCESS_KEY');
            $awsSecretKey = Environment::getEnv('AWS_SECRET_KEY');

            $dynamoOptions = array('region' => $awsRegionName);

            // This endpoint can be set for locally testing DynamoDB.
            // see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
            if (!empty($awsDynamoDBEndpoint)) {
                $dynamoOptions['endpoint'] = $awsDynamoDBEndpoint;
            }

            if (!empty($awsAccessKey) && !empty($awsSecretKey)) {
                $dynamoOptions['credentials']['key'] = $awsAccessKey;
                $dynamoOptions['credentials']['secret'] = $awsSecretKey;
            } else {
                // cache credentials when IAM fetches the credentials from EC2 metadata service
                // this will use doctrine/cache (included via composer) to do the actual caching into APCu
                // http://docs.aws.amazon.com/aws-sdk-php/guide/latest/performance.html#cache-instance-profile-credentials
                $dynamoOptions['credentials'] = new DoctrineCacheAdapter(new ApcuCache());
            }

            return new static($dynamoOptions, $awsDynamoDBSessionTable);
        }

        return null;
    }
1318900
protected function getContext()
	{
		$lang = 'en';
        $config = \Aimeos\Aimeos\Base::getConfig();
		$context = \Aimeos\Aimeos\Base::getContext( $config );

		if( isset( $GLOBALS['BE_USER']->uc['lang'] ) && $GLOBALS['BE_USER']->uc['lang'] != '' ) {
			$lang = $GLOBALS['BE_USER']->uc['lang'];
		}

		$locale = \Aimeos\Aimeos\Base::getLocaleBackend( $context, 'default' );
		$context->setLocale( $locale );

		$i18n = \Aimeos\Aimeos\Base::getI18n( [$lang, 'en'], $config->get( 'i18n', [] ) );
		$context->setI18n( $i18n );

		return $context;
	}
466803
public function getDbCredentials()
    {
        return array(
            'user' => ee()->db->username,
            'password' => ee()->db->password,
            'database' => ee()->db->database,
            'host' => ee()->db->hostname,
            'prefix' => ee()->db->dbprefix,
            'settings_table_name' => ee()->db->dbprefix . $this->getSettingsTable()
        );
    }
509674
public function getCMSFields()
    {
        $fields = $this->scaffoldFormFields(
            array(
                // Don't allow has_many/many_many relationship editing before the record is first saved
                'includeRelations' => ($this->ID > 0),
                'tabbed' => true,
                'ajaxSafe' => true
            )
        );
        $fields->removeByName(
            array(
                'Title',
                'Instance',
                'Style',
                'Objects'
            )
        );
        if (!$this->IsMain) {
            $fields->addFieldsToTab(
                'Root.Main',
                array(
                    TextField::create(
                        'Title',
                        _t('PlaceableObject_Preset.TITLE', 'Title')
                    ),
                    DropdownField::create(
                        'Instance',
                        _t('PlaceableObject_Preset.INSTANCE', 'Instance'),
                        singleton('PlaceableObject_Preset')->dbObject('Instance')->enumValues()
                    )
                )
            );
        }
        if ($this->Styles) {
            $fields->addFieldToTab(
                'Root.Main',
                DropdownField::create(
                    'Style',
                    _t('PlaceableObject_Preset.STYLE', 'Style'),
                    $this->Styles
                )->setEmptyString(_t('PlaceableObject_Preset.DEFAULTSTYLE', 'Default'))
            );
        }
        $fields->addFieldsToTab(
            'Root.Objects',
            array(
                LabelField::create(
                    'ObjectsDescription',
                    _t('PlaceableObject_Preset.OBJECTSDESCRIPTION', 'List of all objects that use this use this preset.')
                ),
                GridField::create(
                    'Objects',
                    _t('PlaceableObject_Preset.OBJECTS', 'Objects'),
                    $this->Objects(),
                    GridFieldConfig_Base::create()
                )
            )
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
1096901
public function getSchemaDataDefaults()
    {
        $schema = array_merge(
            parent::getSchemaDataDefaults(),
            [
                'name' => $this->getName() . '[]',
                'lazyLoad' => $this->getShouldLazyLoad(),
                'creatable' => $this->getCanCreate(),
                'multi' => $this->getIsMultiple(),
                'value' => $this->formatOptions($this->Value()),
                'disabled' => $this->isDisabled() || $this->isReadonly(),
            ]
        );

        if (!$this->getShouldLazyLoad()) {
            $schema['options'] = $this->getOptions()->toNestedArray();
        } else {
            $schema['optionUrl'] = $this->getSuggestURL();
        }

        return $schema;
    }
334259
public function getContext()
    {
        if ($this->context === null) {
            $this->context = array_map(
                'League\JsonGuard\as_string',
                [
                    self::KEYWORD     => $this->keyword,
                    self::PARAMETER   => $this->parameter,
                    self::DATA        => $this->data,
                    self::DATA_PATH   => $this->dataPath,
                    self::SCHEMA      => $this->schema,
                    self::SCHEMA_PATH => $this->schemaPath,
                    self::CAUSE       => $this->getCause(),
                ]
            );
        }

        return $this->context;
    }
1214103
public function get_context() {
        if ($this->coursecontext === null) {
            $this->coursecontext = \context_course::instance($this->course->id);
        }
        return $this->coursecontext;
    }
171058
public function toArray(): array
    {
        return [
            'uuid' => $this->uuid->toArray(),
            'app_id' => $this->appUUID->toArray(),
            'is_ok' => $this->isOK,
            'doc_count' => $this->docCount,
            'size' => $this->size,
            'shards' => $this->shards,
            'replicas' => $this->replicas,
            'fields' => $this->fields,
            'metadata' => $this->metadata,
        ];
    }
931659
public function getContext()
    {
        return [
            'username' => $this->username,
            'requestPath' => $this->requestPath,
            'errors' => $this->errors,
            'groups' => $this->groups,
            'successful' => !$this->errors
        ];
    }
284936
public function getContext()
    {
        $context = [];
        foreach ($this->contextProviders as $contextProvider) {
            $context[] = $contextProvider->getContext();
        }

        return empty($context) ? $context : call_user_func_array('array_merge', $context);
    }
105175
protected function buildStreamContext()
    {
        $opts = [];

        // If we have a logger defined, merge the context options from our logger with the context array
        if ($this->logQueries() && $logger = $this->logger()) {
            $opts['mongodb'] = $logger->getContext();
        }

        $context = stream_context_create($opts);
        return ['context' => $context];
    }
1278094
public function get_setting() {
        $roles = role_fix_names(get_all_roles());
        $result = array();
        foreach ($roles as $role) {
            $contexts = $this->config_read('contexts_role'.$role->id);
            $memberattribute = $this->config_read('memberattribute_role'.$role->id);
            $result[] = array('id' => $role->id,
                              'name' => $role->localname,
                              'contexts' => $contexts,
                              'memberattribute' => $memberattribute);
        }
        return $result;
    }
487447
public function getContext()
    {
        return array_filter(array(
            'subject' => $this->getSubject(),
            'from' => $this->addressToString((array) $this->getSender()),
            'to' => $this->addressToString((array) $this->getRecipients()),
            'cc' => $this->addressToString((array) $this->getCc()),
            'bcc' => $this->addressToString((array) $this->getBcc())
        ));
    }