Set arrayAccess

@param boolean $arrayAccess

@return Entity

@throws \InvalidArgumentException
161408
public function setArrayAccess($arrayAccess)
    {
        if (!is_bool($arrayAccess)) {
            throw new \InvalidArgumentException('The attribute arrayAccess on the class Entity has to be boolean (' . gettype($arrayAccess) . ('object' === gettype($arrayAccess) ? ' ' . get_class($arrayAccess) : '') . ' given).');
        }

        $this->arrayAccess = $arrayAccess;

        return $this;
    }
800318
public function setSection(string $section, $container) : SectionedMap
    {
        if ($section === '') {
            throw new \InvalidArgumentException('Arg \'section\' cannot be empty.');
        }
        if (is_array($container)) {
            $this->arrayAccess[$section] = true;
        } elseif (is_object($container)) {
            $this->arrayAccess[$section] = $container instanceof \ArrayAccess;
        } else {
            throw new \TypeError('Arg \'container\' type[' . gettype($container) . '] is not object|array.');
        }
        $this->map[$section] = $container;

        return $this;
    }
1043224
public function setHasFixtures($hasFixtures)
    {
        if (!is_bool($hasFixtures)) {
            throw new \InvalidArgumentException('The attribute hasFixtures on the class Entity has to be boolean (' . gettype($hasFixtures) . ('object' === gettype($hasFixtures) ? ' ' . get_class($hasFixtures) : '') . ' given).');
        }

        $this->hasFixtures = $hasFixtures;

        return $this;
    }
1352958
public function setAdapterOptions($options)
    {
        if (!is_array($options) && !$options instanceof AbstractOptions) {
            throw new Exception\InvalidArgumentException(sprintf(
                '"%s" expects an array or a valid instance of "%s"; received "%s"',
                __METHOD__,
                'Zend\Stdlib\AbstractOptions',
                is_object($options) ? get_class($options) : gettype($options)
            ));
        }
        $this->adapterOptions = $options;
        $this->options = $options;

        return $this;
    }
1133937
public function setGlobalParameters($parameters)
    {
        if (!is_array($parameters) && !($parameters instanceof ArrayAccess)) {
            throw new InvalidArgumentException(
                'The $parameters argument must be an array or array accessible object.'
            );
        }

        $this->parameters = $parameters;
    }
199887
public function setAccessTokenDetails(array $accessTokenDetails)
    {
        $this->_access_token        = isset($accessTokenDetails['access_token']) ? $accessTokenDetails['access_token'] : null;
        $this->_access_token_secret = isset($accessTokenDetails['access_token_secret']) ? $accessTokenDetails['access_token_secret'] : null;
        $this->_expires             = isset($accessTokenDetails['expires']) ? $accessTokenDetails['expires'] : null;
        $this->_refresh_token       = isset($accessTokenDetails['refresh_token']) ? $accessTokenDetails['refresh_token'] : null;

        return $this;
    }
1023489
public function setAccessLevel($access_level)
  {
    $allowedValues = $this->getAccessLevelAllowableValues();
    if (!is_null($access_level) && !in_array($access_level, $allowedValues)) {
      throw new \InvalidArgumentException(
        sprintf(
          "Invalid value for 'access_level', must be one of '%s'",
          implode("', '", $allowedValues)
        )
      );
    }
    $this->container['access_level'] = $access_level;

    return $this;
  }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
1253184
public function setAccessToken($accessToken)
    {
        if (is_string($accessToken)) {
            $accessToken = new AccessToken($accessToken);
        }
        if (is_object($accessToken) && $accessToken instanceof AccessToken) {
            $this->accessToken = $accessToken;
        } else {
            throw new \InvalidArgumentException('$accessToken must be instance of \LinkedIn\AccessToken class');
        }
        return $this;
    }
115300
public function setOptions($options)
    {
        if (!is_array($options) && !$options instanceof \Traversable) {
            throw new \InvalidArgumentException(sprintf(
                    'Parameter provided to %s must be an array or Traversable',
                    __METHOD__
            ));
        }
    
        foreach ($options as $key => $value){
            $this->setOption($key, $value);
        }
         
        return $this;
    }
225136
public function setTransactionsAttribute($transactions)
    {
        if (!is_array($transactions)) {
            throw new \InvalidArgumentException('Transactions must be an array');
        }

        foreach ($transactions as $key => $transaction) {
            if (!($transaction instanceof Transaction)) {
                $transactions[$key] = new Transaction($transaction);
            }
        }

        $this->attributes['Transactions'] = $transactions;

        return $this;
    }
1315933
public function setService($services)
    {
        if (!is_array($services)) {
            throw new \Exception(__METHOD__.' accept parameter as array.');
        }

        foreach ($services as $key => $alias) {
            $this[$key] = $alias;
        }

        return $this;
    }
887906
public static function setInstance($args)
    {
        $name = array_shift($args);

        $name = self::getAccessor($name);

        $reflect = new \ReflectionClass($name);

        return $reflect->newInstanceArgs($args);
    }
1340811
public function setAccessControlExposeHeaders($headers)
    {
        // If hraders is array, parse to string.
        if (is_array($headers)) {
            $headers = implode(', ', $headers);
        }

        // The headers not is empty, append response hraders.
        if (!empty($headers)) {
            $this->setHeader('Access-Control-Expose-Headers', (string) $headers);
        }

        return $this;
    }
865212
public function setParams(array $params = [])
    {
        if (isset($params['access_token'])) {
            $this->setAccessTokenFromParams($params['access_token']);
        }

        unset($params['access_token']);

        $params = $this->sanitizeFileParams($params);
        $this->dangerouslySetParams($params);

        return $this;
    }
1137201
public function setCustomersAttribute($customers)
    {
        if (!is_array($customers)) {
            throw new \InvalidArgumentException('Customers must be an array');
        }

        foreach ($customers as $key => $customer) {
            if (!($customer instanceof Customer)) {
                $customers[$key] = new Customer($customer);
            }
        }

        $this->attributes['Customers'] = $customers;

        return $this;
    }
303537
public function setClientAddress($clientAddress)
    {
        $clientAddress = (string) $clientAddress;
        if ($clientAddress === '') {
            throw new \InvalidArgumentException('$clientAddress cannot be empty');
        }

        $this->clientAddress = $clientAddress;
    }