public function addInitializer(InitializerInterface $initializer, int $priority = 0)
    {
        if (empty($this->initializers[$priority])) {
            $this->initializers[$priority] = [];
        }

        $this->initializers[$priority][] = $initializer;
        $this->sortedInitializers = [];
    }
public function addInitializer(InitializerInterface $initializer, int $priority = 0)
    {
        if (empty($this->initializers[$priority])) {
            $this->initializers[$priority] = [];
        }

        $this->initializers[$priority][] = $initializer;
        $this->sortedInitializers = [];
    }
public function addInitializer ( InitializerInterface $ initializer , int $ priority = 0 ) { if ( empty ( $ this -> initializers [ $ priority ] ) ) { $ this -> initializers [ $ priority ] = [ ] ; } $ this -> initializers [ $ priority ] [ ] = $ initializer ; $ this -> sortedInitializers = [ ] ; }
Add an initializer to this manager at the specified priority.

@param InitializerInterface $initializer
@param int                  $priority    The higher the number, the earlier the initializer is executed
Add an initializer to this manager at the specified priority .