Customer data like e-mail, ip, web browser used for transaction etc

@param Options $options Options must include the ip address of
customer.
965494
private function addCustomerData($options)
    {
        $this->post['customer_ip'] = $options->ip;

        if ($options->first_name && $options->last_name) {
            $this->post['first_name'] = $options->first_name;
            $this->post['last_name'] = $options->last_name;
        }

        if ($options->email) {
            $this->post['email'] = $options->email;
        }
    }
1264188
protected function handleOptions(array &$options = [])
    {
        parent::handleOptions($options);
        if (isset($options['reason_phrase'])) {
            $this->reasonPhrase = $options['reason_phrase'];
        }
    }
1214972
public function set_option($options = array()) {
        global $DB;

        if (!empty($options['name'])) {
            $r = new stdClass();
            $r->id   = $this->id;
            $r->name = $options['name'];
            $DB->update_record('repository_instances', $r);
            unset($options['name']);
        }
        foreach ($options as $name=>$value) {
            if ($id = $DB->get_field('repository_instance_config', 'id', array('name'=>$name, 'instanceid'=>$this->id))) {
                $DB->set_field('repository_instance_config', 'value', $value, array('id'=>$id));
            } else {
                $config = new stdClass();
                $config->instanceid = $this->id;
                $config->name   = $name;
                $config->value  = $value;
                $DB->insert_record('repository_instance_config', $config);
            }
        }
        cache::make('core', 'repositories')->purge();
        return true;
    }
646762
public function setOptions(array $options)
    {
        if (isset($options['uniqueId'])) {
            $this->sessionId = $options['uniqueId'];
        }

        $this->options = $options;
    }
1025974
protected function configure(array $options): void
    {
        $options = array_merge([
            'socket_class' => ClientSocket::class,
            'on_data_callback' => null,
            'socket_options' => [],
        ], $options);

        parent::configure($options);
    }
310952
public function fromArray($options)
    {
        if (isset($options['IP'])) {
            Validate::isArray($options['IP'], 'options[IP]');
            $this->_ip = IPAccessControl::createFromOptions($options['IP']);
        }
    }
868823
public static function customerChurnRate(array $options = [], ClientInterface $client = null)
    {
        return Metrics\CustomerChurnRates::all($options, $client);
    }
288509
public function setUp($options = [])
    {
        if (array_key_exists('ver', $options)) {
            $this->protoVersion = $options['ver'];
            $this->prefix       = 'v'.round($this->protoVersion).'/c/';
        }

        if (array_key_exists('companyUrl', $options)) {
            $options = array_merge(self::companyUrlToOptions($options['companyUrl']),
                $options);
        }

        $this->setupProperty($options, 'company', 'FLEXIBEE_COMPANY');
        $this->setupProperty($options, 'url', 'FLEXIBEE_URL');
        $this->setupProperty($options, 'user', 'FLEXIBEE_LOGIN');
        $this->setupProperty($options, 'password', 'FLEXIBEE_PASSWORD');
        $this->setupProperty($options, 'authSessionId', 'FLEXIBEE_AUTHSESSID');
        $this->setupProperty($options, 'timeout', 'FLEXIBEE_TIMEOUT');
        if (!empty($this->authSessionId)) {
            $this->defaultHttpHeaders['X-authSessionId'] = $this->authSessionId;
        }
        if (isset($options['evidence'])) {
            $this->setEvidence($options['evidence']);
        }
        $this->setupProperty($options, 'defaultUrlParams');
        if (isset($options['prefix'])) {
            $this->setPrefix($options['prefix']);
        }
        if (array_key_exists('detail', $options)) {
            $this->defaultUrlParams['detail'] = $options['detail'];
        }
        $this->setupProperty($options, 'filter');
        if (array_key_exists('offline', $options)) {
            $this->offline = (boolean) $options['offline'];
        }

        if (array_key_exists('ignore404', $options)) {
            $this->ignore404($options['ignore404']);
        }

        $this->setupProperty($options, 'debug');
        $this->updateApiURL();
    }
501375
protected function addCustomer(array $params, array $options)
    {
        $params['customer_name'] = Arr::get($options, 'name', '');
        $params['customer_email'] = Arr::get($options, 'email', '');

        return $params;
    }
1221497
private function setUserOptions($options)
    {
        if (is_array($options)) {
            foreach ($options as $property => $value) {
                $this->$property = $value;
            }
        }
    }
195197
public function getData(array $options)
    {
        $provider = $this->getProvider();

        $ownerDetails = $provider->getResourceOwner($this->accessToken);

        $json = $ownerDetails->toArray();

        $data = [
            'externalId' => null,
            'name'       => null,
            'profileUrl' => null,
            'photoUrl'   => null,
            'birthday'   => null,
            'email'      => null,
            'gender'     => null,
            'location'   => null,
            'language'   => null
        ];
        if (isset($json['id']) && $json['id']) {
            $data['externalId'] = $json['id'];
            $data['photoUrl'] = sprintf($this->imageUrlTemplate, $json['id']);
        }
        if (isset($json['name']) && $json['name']) {
            $data['name'] = $json['name'];
        }
        if (isset($json['link']) && $json['link']) {
            $data['profileUrl'] = $json['link'];
        }
        if (isset($json['birthday']) && $json['birthday']) {
            $data['birthday'] = DateTime::createFromFormat('m/d/Y', $json['birthday']);
        }
        if (isset($json['email']) && $json['email']) {
            $data['email'] = $json['email'];
        }
        if (isset($json['gender']) && $json['gender']) {
            $data['gender'] = $json['gender'];
        }
        if (isset($json['location']['name']) && $json['location']['name']) {
            $data['location'] = $json['location']['name'];
        }
        if (isset($json['hometown']['name']) && $json['hometown']['name']) {
            $data['location'] = $json['hometown']['name'];
        }
        if (isset($json['locale']) && $json['locale']) {
            $data['language'] = Locale::getPrimaryLanguage($json['locale']);
        }
        return new Result($data);
    }
1032167
public function fromArray($options)
    {
        if (isset($options['ClientAccessPolicy'])) {
            Validate::isString($options['ClientAccessPolicy'], 'options[ClientAccessPolicy]');
            $this->_clientAccessPolicy = $options['ClientAccessPolicy'];
        }

        if (isset($options['CrossDomainPolicy'])) {
            Validate::isString($options['CrossDomainPolicy'], 'options[CrossDomainPolicy]');
            $this->_crossDomainPolicy = $options['CrossDomainPolicy'];
        }
    }
1010302
public static function init($options) {
		self::$debug = !empty($options['debug']) ? true : false;
		if (self::$debug) {
			self::$email = !empty($options['email']) ? $options['email'] : null;
			self::$toolbar = !empty($options['toolbar']) ? true : false;
			self::benchmark('application start');
		}
	}
470571
public function options(array $options = [])
    {
        $request = $this->_View->getRequest();

        if (!empty($options['paging'])) {
            $request = $request->withParam(
                'paging',
                $options['paging'] + $request->getParam('paging', [])
            );
            unset($options['paging']);
        }

        $model = $this->defaultModel();
        if (!empty($options[$model])) {
            $request = $request->withParam(
                'paging.' . $model,
                $options[$model] + (array)$request->getParam('paging.' . $model, [])
            );
            unset($options[$model]);
        }

        $this->_View->setRequest($request);

        $this->_config['options'] = array_filter($options + $this->_config['options']);
        if (empty($this->_config['options']['url'])) {
            $this->_config['options']['url'] = [];
        }
        if (!empty($this->_config['options']['model'])) {
            $this->defaultModel($this->_config['options']['model']);
        }
    }
733386
public function fromArray($options)
    {
        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['Address'])) {
            Validate::isString($options['Address'], 'options[Address]');
            $this->_address = $options['Address'];
        }

        if (isset($options['SubnetPrefixLength'])) {
            Validate::isString($options['SubnetPrefixLength'], 'options[SubnetPrefixLength]');
            $this->_subnetPrefixLength = $options['SubnetPrefixLength'];
        }
    }
1248387
public function optionsAction() {
        $this->response->setHeader('Access-Control-Allow-Methods', 'POST, GET, PUT, DELETE, OPTIONS');
        $allowedHeaders = array_merge(
            ['X-Requested-With', 'X-HTTP-Method-Override', 'Content-Type', 'Accept', 'Cache-Control'],
            $this->getExtraAllowedHeaders()
        );
        $this->response->setHeader('Access-Control-Allow-Headers', implode(', ', $allowedHeaders));
        $this->setStatusCode(200);
    }
240136
protected function configureOptions(OptionsResolver $options): void
    {
        $distanceAllowedValues = function ($value) {
            return !($value < 500 || $value > 20000);
        };

        $options->setRequired(['origin', 'dest']);

        $options->setDefined([
            'via',
            'useTog', 'useBus', 'useMetro', 'useBicycle',
            'maxWalkingDistanceDep', 'maxWalkingDistanceDest',
            'maxCyclingDistanceDep', 'maxCyclingDistanceDest',
            'date',
        ]);

        $options->setAllowedTypes('origin', [LocationResponse::class, StopLocationResponse::class]);
        $options->setAllowedTypes('dest', [LocationResponse::class, StopLocationResponse::class]);
        $options->setAllowedTypes('via', [LocationResponse::class, StopLocationResponse::class]);

        $options->setAllowedValues('useTog', [0, 1]);
        $options->setAllowedValues('useBus', [0, 1]);
        $options->setAllowedValues('useMetro', [0, 1]);
        $options->setAllowedValues('useBicycle', [0, 1]);

        $options->setAllowedValues('maxWalkingDistanceDep', $distanceAllowedValues);
        $options->setAllowedValues('maxWalkingDistanceDest', $distanceAllowedValues);
        $options->setAllowedValues('maxCyclingDistanceDep', $distanceAllowedValues);
        $options->setAllowedValues('maxCyclingDistanceDest', $distanceAllowedValues);

        $options->setAllowedTypes('date', \DateTime::class);
    }