Incrémentation des compteurs de grille
@param int $lg
@param int $md
@param int $sm
@param int $xs
@return $this
19610
protected function gridIncr(int $lg, int $md, int $sm, int $xs)
    {
        $this->gridCount['lg'] += $lg;
        $this->gridCount['md'] += $md;
        $this->gridCount['sm'] += $sm;
        $this->gridCount['xs'] += $xs;
        return $this;
    }
198830
public function multiply(self $x)
    {
        $value = gmp_mul($this->value, $x->value);

        return self::createFromGMPResource($value);
    }
1273315
public function addAll(Models $other)
    {
        if ($other->count() > 0) {
            $this->models->addAll($other->models);
        }

        return $this;
    }
804120
public function iflt($sValue1, $sValue2)
    {
        $this->sCondition = '(' . Parameter::make($sValue1) . '<' . Parameter::make($sValue2) . ')';
        return $this;
    }
1138062
public function setIncrementSize($incrementSize)
    {
        if (!is_int($incrementSize) || ($incrementSize <= 0)) {
            throw SchemaException::invalidSequenceIncrementSize($this->getName());
        }

        $this->incrementSize = $incrementSize;
    }
658081
public function setMaxRating($sRating = null)
    {
        if (null === $sRating) {
            return $this;
        }

        $sRating = strtolower($sRating);

        if (!in_array($sRating, $this->aValidRatings)) {
            $message = sprintf(
                'Invalid rating "%s" specified, only allowed to be used are: %s',
                $sRating,
                implode(', ', $this->aValidRatings)
            );

            throw new InvalidMaxRatingImageException($message);
        }

        $this->sMaxRating = $sRating;

        return $this;
    }
1242157
public function setLng($coord)
    {
        if ($coord === null) {
            $this->lng = $coord;
            return $this;
        }

        if (!is_numeric($coord)) {
            throw new InvalidArgumentException(
                'The "lng" must be a number'
            );
        }

        $this->lng = (float)$coord;

        return $this;
    }
240204
public static function add(array $m1, array $m2, int $mag = 1)
    {
        $res = [];
        foreach ($m1 as $i => $val) {
            $res[] = $val + $mag * $m2[$i];
        }

        return $res;
    }
1207871
public function addObservation( $x ) {
		$this->numObservations++;

		if ( $this->numObservations <= 5 ) {
			$this->heights[] = $x;
			if ( $this->numObservations === 5 ) {
				sort( $this->heights );
			}
			return;
		}

		if ( $x < $this->heights[0] ) {
			$this->heights[0] = $x;
			$k = 0;
		} elseif ( $x >= $this->heights[4] ) {
			$this->heights[4] = $x;
			$k = 3;
		} else {
			for ( $i = 1; $i < 5; $i++ ) {
				if ( $x < $this->heights[$i] ) {
					$k = $i - 1;
					break;
				}
			}
		}

		for ( $i = $k + 1; $i < 5; $i++ ) {
			$this->positions[$i]++;
		}

		for ( $i = 0; $i < 5; $i++ ) {
			$this->desired[$i] += $this->increments[$i];
		}

		for ( $i = 1; $i < 4; $i++ ) {
			$n     = $this->positions[$i];
			$nPrev = $this->positions[$i - 1];
			$nNext = $this->positions[$i + 1];

			$d = $this->desired[$i] - $n;

			if ( ( $d >= 1 && $nNext - $n > 1 ) || ( $d <= -1 && $nPrev - $n < -1 ) ) {
				$d = ( $d < 0 ) ? -1 : 1;

				$q     = $this->computeParabolic( $i, $d );
				$qPrev = $this->heights[$i - 1];
				$qNext = $this->heights[$i + 1];

				if ( $qPrev < $q && $q < $qNext ) {
					$this->heights[$i] = $q;
				} else {
					$this->heights[$i] = $this->computeLinear( $i, $d );
				}

				$this->positions[$i] += $d;
			}
		}
	}
1304185
public function setLgDependent($isLgDependent)
    {
        $this->getImplementation()->setLgDependent($this, $isLgDependent);
    	$this->lgDependent = $isLgDependent;
    }
1135964
public function update(Queries\IScope $scope)
    {
        if ($this->scope === $scope) {
            return $this;
        }

        return new self($scope);
    }
956957
public function sendGetServicePricing($lg, $lc)
    {
        $msgId = $this->createIqId();
        $pricingNode = new ProtocolNode('pricing',
            [
                'lg' => $lg,
                'lc' => $lc,
            ], null, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'urn:xmpp:whatsapp:account',
                'type'  => 'get',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$pricingNode], null);

        $this->sendNode($node);
    }
883078
public function addCustomer(Customer $l)
    {
        if ($this->collCustomers === null) {
            $this->initCustomers();
            $this->collCustomersPartial = true;
        }

        if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddCustomer($l);

            if ($this->customersScheduledForDeletion and $this->customersScheduledForDeletion->contains($l)) {
                $this->customersScheduledForDeletion->remove($this->customersScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
697554
public function ifgt($sValue1, $sValue2)
    {
        $this->sCondition = '(' . Parameter::make($sValue1) . '>' . Parameter::make($sValue2) . ')';
        return $this;
    }
271980
public function addC2M(ChildC2M $l)
    {
        if ($this->collC2Ms === null) {
            $this->initC2Ms();
            $this->collC2MsPartial = true;
        }

        if (!$this->collC2Ms->contains($l)) {
            $this->doAddC2M($l);

            if ($this->c2MsScheduledForDeletion and $this->c2MsScheduledForDeletion->contains($l)) {
                $this->c2MsScheduledForDeletion->remove($this->c2MsScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
162717
public function increment($context = null)
    {
        $poolUsage = $this->cache->get(self::CACHE_KEY) ?: 0;
        $this->logPoolUsage($poolUsage, $context);
        $this->cache->set(self::CACHE_KEY, $poolUsage + 1, $this->lifetime);
    }
902868
public function login($lgname, $lgpassword, $lgdomain = null)
	{
		// Build the request path.
		$path = '?action=login&lgname=' . $lgname . '&lgpassword=' . $lgpassword;

		if (isset($lgdomain))
		{
			$path .= '&lgdomain=' . $lgdomain;
		}

		// Send the request.
		$response = $this->client->post($this->fetchUrl($path), null);

		// Request path with login token.
		$path = '?action=login&lgname=' . $lgname . '&lgpassword=' . $lgpassword . '&lgtoken=' . $this->validateResponse($response)->login['token'];

		if (isset($lgdomain))
		{
			$path .= '&lgdomain=' . $lgdomain;
		}

		// Set the session cookies returned.
		$headers           = (array) $this->options->get('headers');
		$headers['Cookie'] = !empty($headers['Cookie']) ? empty($headers['Cookie']) : '';
		$headers['Cookie'] = $headers['Cookie'] . $response->headers['Set-Cookie'];
		$this->options->set('headers', $headers);

		// Send the request again with the token.
		$response     = $this->client->post($this->fetchUrl($path), null);
		$responseBody = $this->validateResponse($response);

		$headers      = (array) $this->options->get('headers');
		$cookiePrefix = $responseBody->login['cookieprefix'];
		$cookie       = $cookiePrefix . 'UserID=' . $responseBody->login['lguserid'] . '; ' . $cookiePrefix
			. 'UserName=' . $responseBody->login['lgusername'];
		$headers['Cookie'] = $headers['Cookie'] . '; ' . $response->headers['Set-Cookie'] . '; ' . $cookie;
		$this->options->set('headers', $headers);

		return $this->validateResponse($response);
	}