PriorityQueue named constructor.

@param string  $type
@param mixed[] $input

@return \PlanB\DS\PriorityQueue\PriorityQueue
971018
public static function typed(string $type, iterable $input = []): PriorityQueue
    {
        $resolver = Resolver::typed($type);

        return new static($input, $resolver);
    }
596296
public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
    {
        if (func_num_args() >= 3) {
            $priority = func_get_arg(2);
        } else {
            if (__CLASS__ !== get_class($this)) {
                $r = new \ReflectionMethod($this, __FUNCTION__);
                if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                    @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
                }
            }

            $priority = 0;
        }

        $property = $type.'Passes';
        if (!isset($this->$property)) {
            throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type));
        }

        $passes = &$this->$property;

        if (!isset($passes[$priority])) {
            $passes[$priority] = array();
        }
        $passes[$priority][] = $pass;
    }
711383
public static function getInstance($type, $init)
    {
        if (!self::$cachingInstance) {
            self::$cachingInstance = new ApcCache($type, $init);
        }

        return self::$cachingInstance;
    }
866771
public static function factory( $type = 'custom', $priority = 1000 ) {
		$class = self::verify_class_name( __CLASS__ . '_' . $type, 'Unexisting breadcrumb item type: "' . $type . '".' );

		$item = new $class( $priority );
		$item->set_type( $type );

		return $item;
	}
472498
public function add($entry, $priority = self::DEFAULT_PRIORITY)
    {
        if (isset($this->entryClass) && !($entry instanceof $this->entryClass)) {
            throw new InvalidObjectClassException($this->entryClass, get_class($entry));
        }
        $this->entries[] = ['data' => $entry, 'priority' => $priority];
        $this->sorted = false;
        return $this;
    }
152277
public function runQueued(InputInterface $input, OutputInterface $output)
    {
        /** @var EdgarCron[] $edgarCron */
        $edgarCrons = $this->listQueued();
        /** @var CronInterface[] $crons */
        $crons = $this->getCrons();
        /** @var CronInterface[] $cronAlias */
        $cronAlias = [];

        foreach ($crons as $cron) {
            $cronAlias[$cron->getAlias()] = $cron;
        }

        if ($edgarCrons) {
            foreach ($edgarCrons as $edgarCron) {
                if (isset($cronAlias[$edgarCron->getAlias()])) {
                    if ($this->run($edgarCron)) {
                        $status = $cronAlias[$edgarCron->getAlias()]->run($input, $output);
                        $this->end($edgarCron, $status);
                    }
                }
            }
        }
    }
351849
public static function make($type, $input)
	{
		$opType = new Type($type, $input);
		return App::make(
			'FintechFab\BankEmulator\Components\Processor\Processor',
			array($opType)
		);
	}
285978
private function applyTypeValidation(Input $input): Input
    {
        return Rule::make(function ($value, Input $input): void {
            if ($this->isValidType($value)) {
                return;
            }

            $reason = beautify_parse('a <type:type> was expected', [
                'type' => $this->type->stringify(),
            ]);

            $input->reject($reason);
        })->execute($input);
    }
73270
public static function typed(string $type, iterable $input = []): Set
    {
        $resolver = Resolver::typed($type);

        return new static($input, $resolver);
    }
950326
protected function _enqueue(string $identifier, string $type): QueueItemInterface
    {
        $queueItem = QueueItem::create($identifier, $type);

        $this->queueItemRepository->save($queueItem);

        return $queueItem;
    }
487158
public function order($order, $type = 'DESC')
    {

        $this->string['order'] .= $this->useBuilder('order')
            ->order($order, $type);

        return $this;
    }
229794
public function enqueue(AnObjectHandlable $object, $priority)
    {
        $this->getRepositoryEntities($object->getRepository())->insert($object);

        return parent::enqueue($object, $priority);
    }
304996
public function priority($level = 3)
    {
        $this->callbacks[] = function ($message) use ($level) {
            $message->setPriority($level);
        };

        return $this;
    }
299160
public function addTypeExtension($type, $extension, $priority = 0)
    {
        if ($extension instanceof ExtensionInterface) {
            $this->extensionRegistry->addExtension($extension);
            $this->typeExtension[$type][$priority][get_class($extension)] = true;
        } elseif (is_string($extension)) {
            $this->typeExtension[$type][$priority][$extension] = true;
        }

        return $this;
    }
465159
public function pushAll(iterable $input): QueueInterface
    {
        foreach ($input as $value) {
            $this->push($value);
        }

        return $this;
    }
486294
protected function createQueue($priority)
    {
        if (!$this->queues[$priority]) {
            $config = $this->getOptions();
            $config['key'] = $this->intChannels[$priority];
            $this->queues[$priority] = new ShmMap($config);
        }

        return $this->queues[$priority];
    }
42315
protected function type_compare($type1, $type2) {
        if ($type1->priority < $type2->priority) {
            return -1;
        }
        if ($type1->priority > $type2->priority) {
            return 1;
        }
        return 0;
    }