Get the list of operators ordered by priority and association.

@return array
345180
public function getOperators()
    {
        // Order the by priority then precedent.
        $list = (array)$this->operators;
        usort($list, function(Operator $a, Operator $b) {
            // Sort by priority.
            if ($a->getPriority() === $b->getPriority()) {
                // Then by associativity.
                if ($a->getAssociativity() == $b->getAssociativity()) {
                    // Then by regex length (the longer the better).
                    if (strlen($a->getRegex()) === strlen($b->getRegex())) {
                        return 0;
                    }
                    return strlen($a->getRegex()) > strlen($b->getRegex()) ? -1 : 1;
                }
                return $a->getAssociativity() > $b->getAssociativity() ? -1 : 1;
            }
            return $a->getPriority() > $b->getPriority() ? -1 : 1;
        });

        return $list;
    }
65296
public function getForDynamoDB()
    {
        $operator   = $this->getOperator();
        $attributes = $this->getAttributes();

        $condition = array(
            'ComparisonOperator' => $operator
        );

        if (ComparisonOperator::BETWEEN === $operator) {
            $rangeFrom = array_shift($attributes);
            $rangeTo   = array_shift($attributes);
            $condition['AttributeValueList'] = array(
                $rangeFrom->getForDynamoDB(),
                $rangeTo->getForDynamoDB()
            );
        } else {
            $condition['AttributeValueList'] = array(
                $attributes->getForDynamoDB()
            );
        }

        return $condition;
    }
1129462
protected function arrayOrderBy()
    {
        $arguments = func_get_args();
        $data = array_shift($arguments);
        foreach ($arguments as $argument => $field) {
            if (is_string($field)) {
                $temp = [];
                foreach ($data as $key => $row) {
                    $temp[$key] = $row[$field];
                }
                $arguments[$argument] = $temp;
            }
        }
        $arguments[] = &$data;
        call_user_func_array('array_multisort', $arguments);

        return array_pop($arguments);
    }
1266153
public function getRules()
    {
        if (!isset($this->ruleSet)) {
            $this->ruleSet = new PriorityList(RuleInterface::class);
        }
        return $this->ruleSet;
    }
973166
public static function getStatusList()
    {
        return [
            TransactionInterface::STATUS_ORDER_UNKNOWN => 'order_unknown',
            TransactionInterface::STATUS_OPEN => 'open',
            TransactionInterface::STATUS_PENDING => 'pending',
            TransactionInterface::STATUS_VALIDATED => 'validated',
            TransactionInterface::STATUS_CANCELLED => 'cancelled',
            TransactionInterface::STATUS_UNKNOWN => 'status_unknown',
            TransactionInterface::STATUS_ERROR_VALIDATION => 'error_validation',
            TransactionInterface::STATUS_WRONG_CALLBACK => 'wrong_callback',
            TransactionInterface::STATUS_WRONG_REQUEST => 'wrong_request',
            TransactionInterface::STATUS_ORDER_NOT_OPEN => 'order_to_open',
        ];
    }
1139403
public function getFilteredIndexes()
    {
        if (!$this->hasPrimaryKey()) {
            return $this->getIndexes();
        }

        $indexes = array();

        foreach ($this->getIndexes() as $name => $index) {
            if (!$index->hasSameColumnNames($this->getPrimaryKey()->getColumnNames())) {
                $indexes[$name] = $index;
            }
        }

        return $indexes;
    }
597781
public function getOperators()
    {
        return array(
            "<" => $this->translation->text('Less than'),
            ">" => $this->translation->text('Greater than'),
            "=" => $this->translation->text('Equal (is in list)'),
            "<=" => $this->translation->text('Less than or equal to'),
            ">=" => $this->translation->text('Greater than or equal to'),
            "!=" => $this->translation->text('Not equal (is not in list)')
        );
    }
879157
public function get()
    {
        return [
            'type' => $this->operator,
            'left' => $this->leftExpression->get(),
            'right' => $this->rightExpression->get(),
            'file' => $this->file,
            'line' => $this->line,
            'char' => $this->char,
        ];
    }
179153
public function getSorting(): array
    {
        if ($this->sorting === null) {
            $this->sorting = $this->setSorting();
        }

        return $this->sorting;
    }
777653
public function getQueueableRelations()
    {
        $relations = [];

        foreach ($this->getRelations() as $key => $relation) {
            if (method_exists($this, $key)) {
                $relations[] = $key;
            }

            if ($relation instanceof QueueableCollection) {
                foreach ($relation->getQueueableRelations() as $collectionValue) {
                    $relations[] = $key.'.'.$collectionValue;
                }
            }

            if ($relation instanceof QueueableEntity) {
                foreach ($relation->getQueueableRelations() as $entityKey => $entityValue) {
                    $relations[] = $key.'.'.$entityValue;
                }
            }
        }

        return array_unique($relations);
    }
1312940
public function getDirtyRelations()
    {
        $dirtyRelations = [];
        foreach ($this->_relations as $relationName) {
            if (array_key_exists($relationName, $this->_oldRelationValue)) {
                $dirtyRelations[$relationName] = $this->owner->{$relationName};
            }
        }
        return $dirtyRelations;
    }
179361
protected function getQueueSortingCallback()
    {
        // [$resourceId => $parentId]
        $parentMap = $this->registry->getParentMap();

        // [$resourceId => $priority]
        $priorityMap = $this->registry->getEventPriorityMap();

        /**
         * Returns whether or not $a is a child of $b.
         *
         * @param string $a
         * @param string $b
         *
         * @return bool
         *
         * @todo Move in resource registry
         */
        $isChildOf = function($a, $b) use ($parentMap) {
            while (isset($parentMap[$a])) {
                $parentId = $parentMap[$a];
                if ($parentId === $b) {
                    return true;
                }
                $a = $parentId;
            }
            return false;
        };

        return function ($a, $b) use ($isChildOf, $priorityMap) {
            $aId = $this->getEventPrefix($a);
            $bId = $this->getEventPrefix($b);

            // By prefix (resource id) priority
            $aPriority = isset($priorityMap[$aId]) ? $priorityMap[$aId] : 0;
            $bPriority = isset($priorityMap[$bId]) ? $priorityMap[$bId] : 0;

            if ($aPriority > $bPriority) {
                return -1;
            } elseif ($bPriority > $aPriority) {
                return 1;
            }

            // By resource hierarchy (children first)
            if ($isChildOf($aId, $bId)) {
                // B is a parent of A
                return -1;
            } elseif ($isChildOf($bId, $aId)) {
                // A is a parent of B
                return 1;
            }

            // By suffix priority
            $aPriority = $this->getEventPriority($a);
            $bPriority = $this->getEventPriority($b);

            if ($aPriority > $bPriority) {
                return -1;
            } elseif ($bPriority > $aPriority) {
                return 1;
            }

            return 0;
        };
    }
618275
protected function sortResolvers()
    {
        $sortedResolvers = array();
        krsort($this->resolvers);

        foreach ($this->resolvers as $resolvers) {
            $sortedResolvers = array_merge($sortedResolvers, $resolvers);
        }

        return $sortedResolvers;
    }
1143923
public function getConditions()
    {
        $conditions = array();
        for ($i = 0; $i < $this->count; $i++) {
            $conditions[] = array(
                'left'     => $this->getLeftColumn($i),
                'operator' => $this->getOperator($i),
                'right'    => $this->getRightColumn($i)
            );
        }

        return $conditions;
    }
1024784
public function getEnumerators(): array
    {
        $enumeration = $this->enumeration;
        $enumerators = [];
        foreach ($this->getOrdinals() as $ord) {
            $enumerators[] = $enumeration::byOrdinal($ord);
        }
        return $enumerators;
    }
532677
public function expressions()
    {

        $expressions = [];

        if ($this->operand instanceof ExpressionContract) {
            $expressions[] = $this->operand;
        }

        if ($this->constraint instanceof ExpressionContract) {
            $expressions[] = $this->constraint;
        }

        return $expressions;

    }
1360621
public function index(): array {
        list($indexed, $commited) = $this->__index();

        $this->indexedRes  = array();
        $this->commitedRes = array();
        return $indexed;
    }