Execute
@param IContextProvider $provider
@param object[] $dataPool
@return object
776928
public function Execute( $provider, $dataPool )
	{
		$value = CoreFuncs::Atomize( $this->getAbstractNode(0)->Execute( $provider, $dataPool ) );
		if ( ! $value instanceof Undefined )
			return call_user_func( $this->_unaryOper, $provider, $value );
		return Undefined::getValue();
	}
341952
public static function fromOwner( $owner, $provider, $dataPool )
	{
		$result = new ExprIterator();
		$result->nodes = $owner->toArray();
		$result->provider = $provider;
		$result->dataPool = $dataPool;
		return $result;
	}
1283935
public function Execute( $provider, $dataPool )
	{
		try
		{
			// if ( ( $this->getAbstractNode(0) instanceof ExprNode && $this->getAbstractNode(0)->getCount() > 1 ) ||
			// 	 ( $this->getAbstractNode(1) instanceof ExprNode && $this->getAbstractNode(1)->getCount() > 1 )
			// )
			// 	throw XPath2Exception::withErrorCode( "XPTY0004", "One of the arguments is a sequence.  Arithmetic operations cannot be performed with a sequence." );

			$value1 = CoreFuncs::CastToNumber1( $this->getContext(), CoreFuncs::Atomize( $this->getAbstractNode(0)->Execute( $provider, $dataPool ) ) );
			if ( ! $value1 instanceof Undefined )
			{
				$value2 = CoreFuncs::CastToNumber1( $this->getContext(), CoreFuncs::Atomize( $this->getAbstractNode(1)->Execute( $provider, $dataPool ) ) );
				if ( ! $value2 instanceof Undefined )
				{
					return call_user_func( $this->_binaryOper, $provider, $value1, $value2 );
				}
			}
			return Undefined::getValue();
		}
		catch ( DivideByZeroException $ex )
		{
			throw XPath2Exception::withErrorCode( "", $ex->getMessage(), $ex );
		}
		catch ( \OverflowException $ex )
		{
			throw XPath2Exception::withErrorCode( "", $ex->getMessage(), $ex );
		}
	}
380494
public function execute(DataSetInterface $dataSet)
    {
        $addressKey = $dataSet[CompanyUnitAddressLabelRelationDataSet::ADDRESS_KEY];
        if (!isset($this->idCompanyUnitAddressCache[$addressKey])) {
            $companyUnitAddressQuery = new SpyCompanyUnitAddressQuery();
            $idCompanyUnitAddress = $companyUnitAddressQuery
                ->select(SpyCompanyUnitAddressTableMap::COL_ID_COMPANY_UNIT_ADDRESS)
                ->findOneByKey($addressKey);

            if (!$idCompanyUnitAddress) {
                throw new CompanyUnitAddressNotFoundException(sprintf('Could not find CompanyUnitAddress with key "%s".', $addressKey));
            }

            $this->idCompanyUnitAddressCache[$addressKey] = $idCompanyUnitAddress;
        }

        $dataSet[CompanyUnitAddressLabelRelationDataSet::ID_COMPANY_UNIT_ADDRESS] = $this->idCompanyUnitAddressCache[$addressKey];
    }
438231
public static void injectWith(Class<InjectionProvider> provider) {

		try {
			injectionProvider = (InjectionProvider) ClassFactory.newInstanceOf(provider);
			log.info("Registered injection provider: " + injectionProvider.getClass().getName());
		}
		catch (ClassFactoryException e) {
			log.error("Failed to instantiate injection provider: ", e);
			throw new IllegalArgumentException(e);
		}
	}
1139524
public function Execute($provider, $dataPool)
	{
		/**
		 * @var XPathNavigator $value1
		 * @var XPathNavigator $value2
		 */
		$value1 = CoreFuncs::NodeValue( $this->getAbstractNode(0)->Execute( $provider, $dataPool ), false );
		if ( ! is_null( $value1 ) )
		{
			$value2 = CoreFuncs::NodeValue( $this->getAbstractNode(1)->Execute( $provider, $dataPool ), false );
			if ( ! is_null( $value2 ) )
				return call_user_func( $this->_binaryOper, $provider, $value1, $value2 );
				// return $this->_binaryOper( $provider, $value1, $value2 );
		}
		return Undefined::getValue();
	}
159216
protected function validateDataProviders(array $dataProviders)
    {
        foreach ($dataProviders as $key => $val) {
            if (!is_string($key)) {
                throw new Exception\InvalidArgumentException(
                    'Keys of $dataProviders array must be strings.'
                );
            }
        }
    }
338802
public function Execute( $provider, $dataPool )
	{
		return call_user_func(
			$this->_binaryOper,
			$provider,
			$this->getAbstractNode(0)->Execute( $provider, $dataPool ),
			$this->getAbstractNode(1)->Execute( $provider, $dataPool )
		);
	}
1353543
static function fromProvider($provider, $data) {
        $providername = __NAMESPACE__ . '\\providers\\' . ucfirst(strtolower($provider)) . 'Provider';
        return new self(new $providername($data));
    }
295715
protected function listen(DataProvider $provider)
    {
        Event::listen(
            DataProvider::EVENT_FETCH_ROW,
            function (DataRow $row, DataProvider $currentProvider) use ($provider) {
                if ($currentProvider !== $provider) return;
                $this->rows_processed++;
                foreach ($this->fields as $field) {
                    $name = $field->getName();
                    $operation = $this->getFieldOperation($name);
                    switch($operation) {

                        case self::OPERATION_SUM:
                            $this->src[$name] += $row->getCellValue($field);
                            break;
                        case self::OPERATION_COUNT:
                            $this->src[$name] = $this->rows_processed;
                            break;
                        case self::OPERATION_AVG:
                            $key = "{$name}_sum";
                            if (empty($this->src[$key])) {
                                $this->src[$key] = 0;
                            }
                            $this->src[$key] += $row->getCellValue($field);
                            $this->src[$name] = round(
                                $this->src[$key] / $this->rows_processed,
                                2
                            );
                            break;
                        default:
                            throw new LogicException(
                                'TotalsRow: Unknown aggregation operation.'
                            );
                    }

                }

            }
        );
    }
1023594
public function execute(DataSetInterface $dataSet)
    {
        $mimeTypeEntity = SpyMimeTypeQuery::create()
            ->filterByName($dataSet[MimeTypeDataSetInterface::KEY_NAME])
            ->findOneOrCreate();

        $mimeTypeEntity->setIsAllowed($dataSet[MimeTypeDataSetInterface::KEY_IS_ALLOWED]);
        $mimeTypeEntity->save();
    }
520347
public static function one(PDFfiller $provider, $id)
    {
        $params = static::query($provider, $id);
        $instance = new static($provider, array_merge($params, ['exists' => true]));
        $instance->cacheFields($params);

        return $instance;
    }
861687
private function convertToArray(DataProviderInterface $provider): array
    {
        $data = [];
        foreach ($provider->getElements() as $element) {
            $fieldname = $element['isCamelCase'] ? $this->convertUnderlines($element['name']) : $element['name'];
            $hasMethod = 'has' . $fieldname;
            if ($provider->$hasMethod()) {
                $data = $this->getDataFromFields($provider, $fieldname, $element, $data);
            }
        }

        return $data;
    }
1089648
public static function CollectionsZeroParam( $context, $provider )
	{
		// Uses the default collection if one is defined.
		if ( ! isset( $context->defaultCollection ) || empty( $context->defaultCollection ) )
		{
			throw XPath2Exception::withErrorCodeAndParam( "FODC0004", Resources::FODC0004, "default collection" );
		}

		return ExtFuncs::Collections( $context, $provider, $context->defaultCollection );
	}
948590
public function CreateWithIterator( $context, $dataPool, $baseIter, $special )
	{
		switch ( $this->type )
		{
			case XPath2ExprType::Attribute:
				return AttributeNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Child:

				if ( $special && $this->nodeTest != SequenceTypes::$Node )
					return new SpecialChildNodeIterator( $context, $this->nodeTest, $baseIter );

				return ChildNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Descendant:

				if ( $special && $this->nodeTest != SequenceTypes::$Node )
					return new SpecialDescendantNodeIterator( $context, $this->nodeTest, false, $baseIter );

				return DescendantNodeIterator::fromNodeTest( $context, $this->nodeTest, false, $baseIter );

			case XPath2ExprType::DescendantOrSelf:

				if ( $special && $this->nodeTest != SequenceTypes::$Node )
					return SpecialDescendantNodeIterator::fromNodeTest( $context, $this->nodeTest, true, $baseIter );

				return DescendantNodeIterator::fromNodeTest( $context, $this->nodeTest, true, $baseIter );

			case XPath2ExprType::Ancestor:

				return AncestorNodeIterator::fromParts( $context, $this->nodeTest, false, $baseIter );

			case XPath2ExprType::AncestorOrSelf:

				return AncestorNodeIterator::fromParts( $context, $this->nodeTest, true, $baseIter );

			case XPath2ExprType::Following:

				return FollowingNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::FollowingSibling:

				return FollowingSiblingNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Parent:

				return ParentNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Preceding:

				return PrecedingNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::PrecedingSibling:

				return PrecedingSiblingNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::NamespaceUri:

				return NamespaceNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Self:

				return SelfNodeIterator::fromNodeTest( $context, $this->nodeTest, $baseIter );

			case XPath2ExprType::Expr:

				return ExprNodeIterator::fromParts( $context, $this->node, $dataPool, $baseIter );

			case XPath2ExprType::PositionFilter:

				return new PositionFilterNodeIterator( Convert::ToInt32( $this->nodeTest ), $baseIter );

			case XPath2ExprType::ChildOverDescendants:

				return ChildOverDescendantsNodeIterator::fromParts( $context, /* ChildOverDescendantsNodeIterator.NodeTest[] */ $this->nodeTest, $baseIter );

			default:

				return null;
		}
	}
251496
private function ensureServiceProvider(string $providerClass)
    {
        if (!is_subclass_of($providerClass, AbstractServiceProvider::class)) {
            throw new InvalidArgumentException(
                sprintf('Class "%s" must be a subclass of "%s".', $providerClass, AbstractServiceProvider::class)
            );
        }
    }
206632
public function GetReturnType( $dataPool )
	{
		if ( $this->_func->ResultType == XPath2ResultType::Any && $this->getCount() > 0 )
		{
			/**
			 * @var XPath2ResultType $resType
			 */
			$resType = $this->getAbstractNode(0)->GetItemType( $dataPool );
			if ( $resType == XPath2ResultType::NodeSet )
				return XPath2ResultType::Any;
			return $resType;
		}
		return $this->_func->ResultType;
	}