private function addRewriterReferenceByPriority(array $rewriterReferences, $taggedServiceId, array $tag)
    {
        $priority = (
            array_key_exists(self::TAG_ATTRIBUTE_PRIORITY, $tag)
            ? (int) $tag[self::TAG_ATTRIBUTE_PRIORITY]
            : self::DEFAULT_PRIORITY
        );

        if (!array_key_exists($priority, $rewriterReferences)) {
            $rewriterReferences[$priority] = [];
        }

        $rewriterReferences[$priority][] = $this->referenceFactory->createReference($taggedServiceId);

        return $rewriterReferences;
    }
private function addRewriterReferenceByPriority(array $rewriterReferences, $taggedServiceId, array $tag)
    {
        $priority = (
            array_key_exists(self::TAG_ATTRIBUTE_PRIORITY, $tag)
            ? (int) $tag[self::TAG_ATTRIBUTE_PRIORITY]
            : self::DEFAULT_PRIORITY
        );

        if (!array_key_exists($priority, $rewriterReferences)) {
            $rewriterReferences[$priority] = [];
        }

        $rewriterReferences[$priority][] = $this->referenceFactory->createReference($taggedServiceId);

        return $rewriterReferences;
    }
private function addRewriterReferenceByPriority ( array $ rewriterReferences , $ taggedServiceId , array $ tag ) { $ priority = ( array_key_exists ( self :: TAG_ATTRIBUTE_PRIORITY , $ tag ) ? ( int ) $ tag [ self :: TAG_ATTRIBUTE_PRIORITY ] : self :: DEFAULT_PRIORITY ) ; if ( ! array_key_exists ( $ priority , $ rewriterReferences ) ) { $ rewriterReferences [ $ priority ] = [ ] ; } $ rewriterReferences [ $ priority ] [ ] = $ this -> referenceFactory -> createReference ( $ taggedServiceId ) ; return $ rewriterReferences ; }
Add rewriter reference by priority.

@param array  $rewriterReferences
@param string $taggedServiceId
@param array  $tag

@return array
Add rewriter reference by priority .