2017-07-06
@used-by resJson()
@used-by \Dfe\Qiwi\API\Client::_construct()
@param callable|IFilter $f
@param int $priority
969167
final protected function addFilterResBV($f, $priority = FilterChain::DEFAULT_PRIORITY) {
		$this->_filtersResBV->attach($f, $priority);
	}
99102
protected function encodePriority($facility, $priority)
    {
        if (is_string($facility)) {
            $facility = static::$facilityNames[$facility];
        }
        if (is_string($priority)) {
            $priority = static::$priorityNames[$priority];
        }
        return ($facility << 3) | $priority;
    }
478336
public function insert($data, $priority = self::PIRORITY_DEFAULT): void
    {
        parent::insert($data, $priority);
    }
961561
public function register(callable $callback, $priority = null)
    {
        $priority = $this->getPriority($priority);
        if (!isset($this->callbacks[$priority])) {
            $this->callbacks[$priority] = [];
        }
        $this->callbacks[$priority][] = $callback;
        $this->lowestPriority = max($priority, $this->lowestPriority);
    }
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];
    }
784555
public function addFactory(PaginatedCollectionRequestFactoryInterface $factory, $priority = 0)
    {
        $this->factories[$priority][] = $factory;

        unset($this->sorted);
    }
912664
public function loadJS($file,$priority=100){
		if(!isset($this->controller)){
			if(DEBUG_MODE){
				BDebug::error('[MVC.View]: Could not load js file, because controller is empty!');
				}
			return false;
			}
		if(!file_exists($file)){
			if(DEBUG_MODE){
				BDebug::error('[MVC.View]: Could not load js file ('.$file.'), because it does not exists!');
				}
			return false;
			}
		$src=file_get_contents($file);
		$this->controller->js[]=array('file'=>'','src'=>$src,'priority'=>$priority);
		}
1055670
public function insert($datum, $priority) {
        if (is_int($priority)) {
            $priority = [$priority, $this->queueOrder--];
        }

        parent::insert($datum, $priority);
    }
15792
public function setPriority($priority=1)
    {

        $node = $this->getPriority(false);
        if(!$node){
            $node = $this->createElement('priority');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($priority);

    }
113540
public function defer($runLevel, $priority = 10)
    {
        $this->deferred = true;
        $this->runLevel = $runLevel;
        $this->priority = $priority;
    }
1228648
public static function onTransmission($event, $fn, $priority = 0)
    {
        if (!static::bound($event)) {
            static::$events['__bow.transmission.event'][$event] = [];
        }

        if (!is_string($fn)) {
            throw new EventException('The transmission event must be a string function name');
        }

        static::$events['__bow.transmission.event'][$event][] = new Listener($fn, $priority);

        Session::getInstance()->add("__bow.event.listener", static::$events['__bow.transmission.event']);
    }
337321
public function priority($priority = null) {
		if ($priority === null) {
			return $this->_priority;
		}
		$this->_priority = $priority;
		return $this;
	}
587453
public function addFormViewProvider(FormViewProviderInterface $provider, $priority = 0)
    {
        $this->formViewProviders[$priority][] = $provider;
        $this->needsSorting = true;
    }
1359837
public function js( $path, $priority = 10 ) {
		$js = $this->get_js_path( $path );
		if ( ! empty( $js ) ) {
			$this->app->minify->register_js_file( $js, $priority );

			return true;
		}

		return false;
	}
398369
function addWidget($region, $widget, $priority = 0)
    {
        if (!$this->rBoxContainer) {
            $sm = $this->getServiceLocator()->getServiceLocator();
            $rBoxContainer  = $sm->get('yimaWidgetator.Widgetizer.Container');

            $this->rBoxContainer = $rBoxContainer;
        }

        $this->rBoxContainer->addWidget($region, $widget, $priority);

        return $this;
    }
1243143
public function attach($eventType, $handler, $priority = 100)
    {
        if (!isset($this->listeners[$eventType])) {
            if ($this->enablePriorities) {
                $priorityQueue = new PriorityQueue();
                $priorityQueue->setExtractFlags(PriorityQueue::EXTR_DATA);
            } else {
                $priorityQueue = [];
            }

            $this->listeners[$eventType] = $priorityQueue;
        }

        if (is_object($this->listeners[$eventType])) {
            /** @var PriorityQueue $priorityQueue */
            $priorityQueue = &$this->listeners[$eventType];
            $priorityQueue->insert($handler, $priority);
        } else {
            $this->listeners[$eventType][] = $handler;
        }
    }
849223
public function addFilter( $filter, $callback, $priority = 10 )
    {
        if ( !isset( $this->filters[ $filter ] ) )
        {
            $this->filters[ $filter ] = array();
        }

        $this->filters[ $filter ][] = array(
            'priority' => $priority,
            'callback' => $callback,
        );

        if ( 1 < count( $this->filters[ $filter ] ) )
        {
            usort( $this->filters[ $filter ], array( $this, '_sortByPriority' ) );
        }

        if ( $this->debug )
        {
            echo PHP_EOL . '+FILTER: ' . $filter . ' -> '
                    . $this->_serializeCallback( $callback )
                    . ' + Priority: ' . $priority . PHP_EOL;
        }
    }