@param int $cpuPeriod

@return Client
337012
public function setCpuPeriod(int $cpuPeriod)
    {
        $this->cpuPeriod = $cpuPeriod;

        $this->hostConfig = array_merge($this->hostConfig, ['CpuPeriod' => $cpuPeriod]);

        return $this;
    }
243905
public function getClient(): ClientInterface
    {
        if (! isset($this->client)) {
            $this->client = new GuzzleClient();
        }

        return $this->client;
    }
302435
public function build(): GetCurrentTimeRequest
	{
		$instance = new GetCurrentTimeRequest();
		if ($this->id === null) {
			throw new BuilderException('Property [id] is required.');
		}
		$instance->id = $this->id;
		return $instance;
	}
987992
protected function getClientUserAgent()
    {
        if ($this->requestStack->getCurrentRequest() === null) {
            throw new \RuntimeException(sprintf('%s can not be called outside of request cycle', __METHOD__));
        }

        return $this->requestStack->getCurrentRequest()->server->get('HTTP_USER_AGENT');
    }
387366
protected function registerPeriodManagementInterface()
	{
		$this->app->bind('Mgallegos\DecimaAccounting\Accounting\Services\PeriodManagement\PeriodManagementInterface', function($app)
		{
			return new PeriodManager(
				$app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface'),
				$app->make('App\Kwaai\Security\Services\JournalManagement\JournalManagementInterface'),
				$app->make('App\Kwaai\Security\Repositories\Journal\JournalInterface'),
				new	\Mgallegos\LaravelJqgrid\Encoders\JqGridJsonEncoder($app->make('excel')),
				new	\Mgallegos\DecimaAccounting\Accounting\Repositories\Period\EloquentPeriodGridRepository(
					$app['db'],
					$app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface'),
					$app['translator']
				),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\Period\PeriodInterface'),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\JournalVoucher\JournalVoucherInterface'),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\FiscalYear\FiscalYearInterface'),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\Setting\SettingInterface'),
				new Carbon(),
				$app['db'],
				$app['translator'],
				$app['config']
			);
		});
	}
1333686
public function socketSelect($timeout = 1)
    {
        if (!isset($this->queue)) {
            throw new Exception('You need to call socketPerform() before.');
        }
        return $this->queue->socketSelect($timeout);
    }
1130322
public function installRecurringPayment($hostedDataId, $amount, \DateTime $startDate, $count, $frequency, $period)
    {
        $service = $this->getService();

        $paymentInformation     = new Model\RecurringPaymentInformation($startDate, $count, $frequency, $period);
        $payment                = new Model\Payment($hostedDataId, $amount);
        $recurringPaymentAction = new Request\Action\RecurringPayment\Install($service, $payment, $paymentInformation);

        return $recurringPaymentAction->install();
    }
1010509
public function postponeSubscription($subscriptionId, $month)
    {
        $requestData = new Postpone\RequestData($subscriptionId, $month);
        $request = new Postpone\Request($requestData);

        return $this->sendRequest($request, Postpone\ApiResponse::class);
    }
157377
protected static function getHttpClient($cacheDir)
	{
		if (!isset(self::$client) || self::$clientCacheDir !== $cacheDir)
		{
			self::$client = (isset($cacheDir)) ? Http::getCachingClient($cacheDir) : Http::getClient();
			self::$clientCacheDir = $cacheDir;
		}

		return self::$client;
	}
896845
public function cleanUpTasks($timePeriod)
    {
        $query = $this->entityManager->createQuery(
            'DELETE
            FROM WebdevviePheanstalkTaskQueueBundle:Task t
            WHERE
            t.status = :status and
            t.created <= :older'
        );
        $query->setParameter('status', array(Task::STATUS_DONE));
        $query->setParameter('older', date("Y-m-d H:i:s", time() - $timePeriod));
        $query->execute();
    }
331945
public function getConsumer($queueName, $timeout = null, $refresh = null)
    {
        $queueName = $this->_prepareQueueName($queueName);
        $thread    = self::THREAD_CONSUME . $queueName.':'.$timeout;
        
        $server = $this->_getServerOrFail($queueName, RouterConfig::SERVER_TAG_DEFAULT);
        
        $config = [
            RouterConfig::REQUEST_CONSUMER_TIME_LIMIT => $timeout,
            RouterConfig::REQUEST_CONSUMER_REFRESH_INTERVAL => $refresh 
        ];
        
        $consumer = $server->getRequestConsumer($thread, $queueName, RouterConfig::CONFIG_PERSISTENT_CONSUMER, $config);
        
        return $consumer;
    }
1160610
protected function _getPeriodByDate(DateTime $Date, $interval = null) {
		$Range = new DateRange(clone $Date);
		return $Range->period($this->_getInterval($interval));
	}
300834
public function setProcessor(string $processorId, callable $processor): self
    {
        $this->_processors[$processorId] = $processor;

        return $this;
    }
1354156
public function client($userAgent = self::USER_AGENT, $fallbackValue = 0)
    {
        $this->sort();
        return new RequestRateClient($this->base, $userAgent, $this->requestRates, $fallbackValue);
    }
471557
public function clientPermList($cldbid, $permsid = FALSE)
  {
    return $this->getParent()->channelClientPermList($this->getId(), $cldbid, $permsid);
  }
568985
protected function registerPeriodInterface()
	{
		$this->app->bind('Mgallegos\DecimaAccounting\Accounting\Repositories\Period\PeriodInterface', function($app)
		{
			$AuthenticationManager = $app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface');

			return new \Mgallegos\DecimaAccounting\Accounting\Repositories\Period\EloquentPeriod(new Period(), $app['db'], $AuthenticationManager->getCurrentUserOrganizationConnection());
		});
	}
1049195
public function getClient()
    {
        if ($this->client instanceof ClientEntity) {
            return $this->client;
        }

        $this->client = $this->server->getClientStorage()->getBySession($this);

        return $this->client;
    }