{@inheritdoc}

{@inheritdoc}
195161
public function deleteAll()
    {
        $this->preDeleteAll();
        $result = $this->dataStore->deleteAll();

        return $this->postDeleteAll($result);
    }
397793
private function Initialize()
    {
        if (!$this->initialized)
        {
            $schema = $this->GetSchema();
            $t = $schema->Table();
            $sql = $schema->SqlBuilder();
           
            $what = $t->ToSelectList();
            $where = $sql->Equals($t->Field($schema->KeyField()), $sql->Value($this->KeyValue()));
            $select = $sql->Select(false, $what, $t, $where);
            $reader = $schema->Connection()->ExecuteQuery((string)$select);
            if ($reader->Read())
                $this->InitFromReader($reader);

            $reader->Close();
        }
    }
661678
public function addMethod(Method $method): void
    {
        if (!$this->responses->has($method->getResponse()) && $this->structures->has($method->getResponse())) {
            $struct = $this->structures->get($method->getResponse());
            $response = Response::createFromStruct($struct);
            $this->responses->add($response);
            $this->structures->remove($struct);
        }

        if (!$this->requests->has($method->getRequest()) && $this->structures->has($method->getRequest())) {
            $struct = $this->structures->get($method->getRequest());
            $request = Request::createFromStruct($struct);
            $this->requests->add($request);
            $this->structures->remove($struct);
        }

        $this->methods->add($method);
    }
1241255
public function ensurePropertiesIds($force = false)
    {
        if ($this->propertiesIds === null || $force === true) {
            $this->ensurePropertyGroupIds();
            $this->propertiesIds = [];

            foreach ($this->propertyGroupIds as $propertyGroupId) {
                $propertyIds = PropertyGroup::propertyIdsForGroup($propertyGroupId);
                foreach ($propertyIds as $propertyId) {
                    $this->propertiesIds[] = $propertyId;
                }
            }
            $this->propertiesIds = array_unique($this->propertiesIds);
        }
    }
401506
public function validate($value, Constraint $constraint): void
    {
        Assert::isInstanceOf($value, AttributeValueInterface::class);

        $defaultLocale = $this->localeProvider->getDefaultLocaleCode();
        $configuration = $value->getAttribute()->getConfiguration();

        if ($defaultLocale === $value->getLocaleCode()) {
            $configuration = array_merge($configuration, ['required' => true]);
        }

        /** @var AttributeTypeInterface $attributeType */
        $attributeType = $this->attributeTypeRegistry->get($value->getType());

        $attributeType->validate($value, $this->context, $configuration);
    }
1046508
public function init() {
		$htmlId = $this->fileUploadControl->getHtmlId();
		
		foreach($this->elements as $type => $value) {
			if($type == "input") {
				$element = Html::el("input type='file' multiple='multiple'")->addAttributes([
					"id" => $htmlId,
					"name" => $this->fileUploadControl->getHtmlName(),
					"data-upload-component" => $htmlId
				]);
			} else if($type == "delete") {
				$element = Html::el("button type='button'")->addAttributes([
					"data-upload-component" => sprintf($this->idTemplate, $htmlId, $type)
				]);
			} else if($type == "imagePreview") {
				$element = Html::el("img")->addAttributes([
					"data-upload-component" => sprintf($this->idTemplate, $htmlId, $type)
				]);
			} else {
				$element = Html::el("div")->addAttributes([
					"data-upload-component" => sprintf($this->idTemplate, $htmlId, $type)
				]);
			}
			
			$this->elements[ $type ] = $element;
		}
	}
904815
public function createAllDocumentTables()
    {
        /**
         * @var ClassMetadata $class
         */
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE)) {
                continue;
            }

            $this->createDocumentTableFor($class->name);
        }
    }
447760
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        /** @var $payment PaymentInterface */
        $payment = $request->getModel();

        $this->gateway->execute(new Sync($payment));

        $status = new GetStatus($payment);
        $this->gateway->execute($status);

        $nextState = $status->getValue();

        $this->updatePaymentState($payment, $nextState);
    }
936248
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        parent::execute($request);

        /** @var OrderPaymentInterface $payment */
        $payment = $request->getSource();
        /** @var array $model */
        $model = $request->getResult();

        $model['NOSHIPPING'] = 1;
        $model['LANDINGPAGE'] = 'Billing';
        $model['SOLUTIONTYPE'] = 'Sole';

        $order = $payment->getOrder();
        $orderTotal = $this->calculator->calculateOrderTotal($order, true);
        $paymentAmount = $payment->getAmount();

        // Add item details only if this is a full order payement.
        if (0 == bccomp($orderTotal, $paymentAmount, 2)) {
            $m = 0;
            foreach($order->getItems() as $item) {
                $model['L_PAYMENTREQUEST_0_NAME'.$m] = $item->getDesignation();
                $model['L_PAYMENTREQUEST_0_AMT'.$m] = round($item->getPrice(), 2);
                $model['L_PAYMENTREQUEST_0_QTY'.$m] = $item->getQuantity();
                $m++;
            }
            $model['PAYMENTREQUEST_0_ITEMAMT'] = round($this->calculator->calculateOrderItemsTotal($order), 2);

            $model['PAYMENTREQUEST_0_SHIPPINGAMT'] = round($this->calculator->calculateOrderShipmentTotal($order), 2);

            $taxes = $this->calculator->calculateOrderTaxesAmounts($order);
            $model['PAYMENTREQUEST_0_TAXAMT'] = round($taxes->getTotal(), 2);
        }

        $request->setResult((array) $model);
    }
3113
public function execute($n)
    {
        $stack = array();
        $i = 0;
        $total = count($this->tokens);
        while ($i < $total) {
            $next = $this->tokens[$i];
            $i++;
            if ($next[0] === 'var') {
                $stack[] = $n;
                continue;
            } elseif ($next[0] === 'value') {
                $stack[] = $next[1];
                continue;
            }

            // Only operators left.
            switch ($next[1]) {
                case '%':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 % $v2;
                    break;

                case '||':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 || $v2;
                    break;

                case '&&':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 && $v2;
                    break;

                case '<':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 < $v2;
                    break;

                case '<=':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 <= $v2;
                    break;

                case '>':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 > $v2;
                    break;

                case '>=':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 >= $v2;
                    break;

                case '!=':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 != $v2;
                    break;

                case '==':
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 == $v2;
                    break;

                case '?:':
                    $v3 = array_pop($stack);
                    $v2 = array_pop($stack);
                    $v1 = array_pop($stack);
                    $stack[] = $v1 ? $v2 : $v3;
                    break;

                default:
                    throw new Exception(sprintf('Unknown operator "%s"', $next[1]));
            }
        }

        if (count($stack) !== 1) {
            throw new Exception('Too many values remaining on the stack');
        }

        return (int) $stack[0];
    }
127960
public function execute(InputInterface $input, OutputInterface $output)
	{
		parent::execute($input, $output);

		$log = $this->changeLog->parse();
		$this->changeLog->write($log);
	}
1109121
public function validate($order, Constraint $constraint): void
    {
        /** @var OrderInterface $order */
        Assert::isInstanceOf($order, OrderInterface::class);

        /** @var OrderProductEligibility $constraint */
        Assert::isInstanceOf($constraint, OrderProductEligibility::class);

        /** @var OrderItemInterface[] $orderItems */
        $orderItems = $order->getItems();

        foreach ($orderItems as $orderItem) {
            if (!$orderItem->getProduct()->isEnabled()) {
                $this->context->addViolation(
                    $constraint->message,
                    ['%productName%' => $orderItem->getProduct()->getName()]
                );
            }
        }
    }
731540
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        $details = ArrayObject::ensureArrayObject($request->getModel());

        $details->replace($this->api->getTransactionData((array) $details));
    }
432430
public function validate($order, Constraint $constraint): void
    {
        /** @var OrderInterface $order */
        Assert::isInstanceOf($order, OrderInterface::class);

        /** @var OrderPaymentMethodEligibility $constraint */
        Assert::isInstanceOf($constraint, OrderPaymentMethodEligibility::class);

        $payments = $order->getPayments();

        foreach ($payments as $payment) {
            if (!$payment->getMethod()->isEnabled()) {
                $this->context->addViolation(
                    $constraint->message,
                    ['%paymentMethodName%' => $payment->getMethod()->getName()]
                );
            }
        }
    }
205372
public function execute()
    {
        $data = $this->getData();

        /*
         * Step 1) Apply sorting
         *
         * @see http://php.net/manual/de/function.array-multisort.php
         * @see example number 3
         */
        if (!empty($this->getSortConditions())) {
            $data = $this->sortArrayMultiple($data, $this->getSortConditions());
        }

        /*
         * Step 2) Apply filters
         */
        foreach ($this->getFilters() as $filter) {
            /* @var $filter \ZfcDatagrid\Filter */
            if ($filter->isColumnFilter() === true) {
                $data = array_filter($data, [
                    new PhpArray\Filter($filter),
                    'applyFilter',
                ]);
            }
        }

        /**
         * Step 3) Remove unneeded columns.
         *
         * @todo ? Better performance or let it be?
         */
        $selectedColumns = [];
        foreach ($this->getColumns() as $col) {
            if (! $col instanceof Column\Select) {
                continue;
            }

            $colString = $col->getSelectPart1();
            if ($col->getSelectPart2() != '') {
                $colString = $col->getSelectPart1().'_'.$col->getSelectPart2();
            }

            $selectedColumns[] = $colString;
        }

        foreach ($data as &$row) {
            foreach ($row as $keyRowCol => $rowCol) {
                if (! in_array($keyRowCol, $selectedColumns)) {
                    unset($row[$keyRowCol]);
                }
            }
        }

        /*
         * Step 4) Pagination
         */
        $this->setPaginatorAdapter(new PaginatorAdapter($data));
    }
1305149
public function set($key, $value)
    {
        /**
         * @var UniqueIdentity $value
         */
        $this->elements->set($value->uId()->id(), $value);
    }
651316
public function execute()
    {
        $aggregate = $this->aggregate;
        $entity = $aggregate->getEntityObject();
        $mapper = $aggregate->getMapper();
        $entityMap = $mapper->getEntityMap();

        if ($mapper->fireEvent('restoring', $entity) === false) {
            return false;
        }

        $keyName = $entityMap->getKeyName();

        $query = $this->query->where($keyName, '=', $aggregate->getEntityAttribute($keyName));

        $deletedAtColumn = $entityMap->getQualifiedDeletedAtColumn();

        $query->update([$deletedAtColumn => null]);

        $aggregate->setEntityAttribute($deletedAtColumn, null);

        $mapper->fireEvent('restored', $entity, false);

        $mapper->getEntityCache()->refresh($aggregate);

        return $entity;
    }