@param array $profileSettings

@throws \Kerox\Messenger\Exception\MessengerException

@return \Kerox\Messenger\Response\ProfileResponse
161613
public function get(array $profileSettings): ProfileResponse
    {
        $this->isValidFields($profileSettings);

        $profileSettings = implode(',', $profileSettings);

        $request = new ProfileRequest($this->pageToken, $profileSettings);
        $response = $this->client->get('me/messenger_profile', $request->build());

        return new ProfileResponse($response);
    }
149555
public function validateFieldSettings($fieldSettings)
    {
        $validationErrors = array();

        foreach ($fieldSettings as $settingKey => $settingValue) {
            switch ($settingKey) {
                case 'isMultiple':
                    if (!is_bool($settingValue)) {
                        $validationErrors[] = new ValidationError(
                            "FieldType '%fieldType%' expects setting '%setting%' to be of type '%type%'",
                            null,
                            array(
                                '%fieldType%' => $this->getFieldTypeIdentifier(),
                                '%setting%' => $settingKey,
                                '%type%' => 'bool',
                            ),
                            "[$settingKey]"
                        );
                    }
                    break;
                case 'options':
                    if (!is_array($settingValue)) {
                        $validationErrors[] = new ValidationError(
                            "FieldType '%fieldType%' expects setting '%setting%' to be of type '%type%'",
                            null,
                            array(
                                '%fieldType%' => $this->getFieldTypeIdentifier(),
                                '%setting%' => $settingKey,
                                '%type%' => 'hash',
                            ),
                            "[$settingKey]"
                        );
                    }
                    break;
                case 'multilingualOptions':
                    if (!is_array($settingValue) && !is_array(reset($settingValue))) {
                        $validationErrors[] = new ValidationError(
                            "FieldType '%fieldType%' expects setting '%setting%' to be of type '%type%'",
                            null,
                            array(
                                '%fieldType%' => $this->getFieldTypeIdentifier(),
                                '%setting%' => $settingKey,
                                '%type%' => 'hash',
                            ),
                            "[$settingKey]"
                        );
                    }
                    break;
                default:
                    $validationErrors[] = new ValidationError(
                        "Setting '%setting%' is unknown",
                        null,
                        array(
                            '%setting%' => $settingKey,
                        ),
                        "[$settingKey]"
                    );
            }
        }

        return $validationErrors;
    }
1335127
protected function loadConfigDefaults($userSettings)
    {
        $parser = $this['config-parser'];
        $defaults = $parser->parseFile(__DIR__ . '/slender.yml');
        $userSettings = array_merge_recursive($defaults, $userSettings);
        $this['settings']->setArray($userSettings);
    }
1070478
public function setSettings( $settings )
    {
        if ( ! empty( $settings ) )
        {
            foreach ( $settings as $name => $value )
            {
                $this->setSetting( $name, $value );
            }
        }

        return $this;
    }
519608
public function setProfile($profile)
	{
		$this->_profile = $profile;

		// Set the parser configs.
		$this->setConfig($this->getProfileConfig('parser'));
        $this->reset($this->_string, true);
        $this->defaults();

        return $this;
	}
511665
protected function setProcessors(OptionsInterface $options, ProfileInterface $profile)
    {
        if (isset($options->prefix) && $profile instanceof RedisProfile) {
            // NOTE: directly using __get('prefix') is actually a workaround for
            // HHVM 2.3.0. It's correct and respects the options interface, it's
            // just ugly. We will remove this hack when HHVM will fix re-entrant
            // calls to __get() once and for all.

            $profile->setProcessor($options->__get('prefix'));
        }
    }
1374679
public function setProfileOG($profileObj)
    {
        Meta::set("profile:first_name", $profileObj->firstName, "property");
        Meta::set("profile:last_name", $profileObj->lastName, "property");
        if(isset($profileObj->gender)) {
            Meta::set("profile:gender", $profileObj->gender, "property");
        }
        return $this;
    }
264477
public function registerServices(array $userSettings = [])
    {
        $defaultSettings = $this->defaultSettings;

        $this['settings'] = function () use ($userSettings, $defaultSettings) {
            return new Collection(array_merge($defaultSettings, $userSettings));
        };

        $serviceProvider = new ServiceProvider();
        $serviceProvider->register($this);
    }
550277
public function get(string $profile)
    {
        if (!$this->has($profile)) {
            throw new Exception("Profile {$profile} does not exist.");
        }

        return $this->children[$profile];
    }
570235
public function setProfile(AccountProfile $profile)
    {
        $request = new SetAccountProfileRequest($this->identifier);
        $request->setProfileItem($profile);
        $response = new SetAccountProfileResponse();
        return $this->client->sendRequest($request, $response);
    }
857016
public function resolve(array $settings = [])
    {
        $driver         = new FluentDriver(Arr::get($settings, 'mappings', []));

        $namingStrategy = $this->getNamingStrategy($settings);

        $driver->setFluentFactory(function (ClassMetadataInfo $meta) use ($namingStrategy) {
            return new Builder(new ClassMetadataBuilder($meta), $namingStrategy);
        });

        return $driver;
    }
1144832
public function settings(array $settings)
    {
        $this->settings = array_merge($this->settings, $settings);
        if ($this->serviceClient) $this->buildClient();
        return $this;
    }
129307
public function register(SettingsInterface $settings): InstanceSettingsProvider
    {
        $className = get_class($settings);
        if (array_key_exists($className, $this->instances) === true) {
            throw new AlreadyRegisteredSettingsException($className);
        }

        $this->instances[$className] = $settings;
        $this->isProcessed           = false;

        return $this;
    }
287634
public function profile($config = null) {
		if ($config === null) {
			return $this->getProfile();
		}

		return $this->setProfile($config);
	}
720245
public function updateProfile( CustomerVault\Profile $profile )
    {
        $profile->setRequiredFields(array('id'));
        $profile->checkRequiredFields();
        $profile->setRequiredFields(array(
            'merchantCustomerId',
            'locale'
        ));
        $profile->setOptionalFields(array(
            'firstName',
            'middleName',
            'lastName',
            'dateOfBirth',
            'ip',
            'gender',
            'nationality',
            'email',
            'phone',
            'cellPhone'
        ));

        $request = new Request(array(
            'method' => Request::PUT,
            'uri' => $this->prepareURI("/profiles/" . $profile->id),
            'body' => $profile
        ));
        $response = $this->client->processRequest($request);

        return new CustomerVault\Profile($response);
    }
258215
public void setProfiles(java.util.Collection<ProfileData> profiles) {
        if (profiles == null) {
            this.profiles = null;
            return;
        }

        this.profiles = new java.util.ArrayList<ProfileData>(profiles);
    }
18876
protected function sendProfile($message, $type = self::TYPE_POST)
    {
        return new HandleMessageResponse($this->call('me/messenger_profile', $message, $type));
    }