public function getGuards(): array
    {
        if ($this->guards) {
            return $this->guards;
        }

        if (empty($this->guardsConfig)) {
            return [];
        }

        $this->guards = [];
        foreach ($this->guardsConfig as $guardConfig) {
            $this->guards[] = $this->getGuardFactory()->create($guardConfig);
        }

        $this->sortGuardsByPriority();
        return $this->guards;
    }
public function getGuards(): array
    {
        if ($this->guards) {
            return $this->guards;
        }

        if (empty($this->guardsConfig)) {
            return [];
        }

        $this->guards = [];
        foreach ($this->guardsConfig as $guardConfig) {
            $this->guards[] = $this->getGuardFactory()->create($guardConfig);
        }

        $this->sortGuardsByPriority();
        return $this->guards;
    }
public function getGuards ( ) : array { if ( $ this -> guards ) { return $ this -> guards ; } if ( empty ( $ this -> guardsConfig ) ) { return [ ] ; } $ this -> guards = [ ] ; foreach ( $ this -> guardsConfig as $ guardConfig ) { $ this -> guards [ ] = $ this -> getGuardFactory ( ) -> create ( $ guardConfig ) ; } $ this -> sortGuardsByPriority ( ) ; return $ this -> guards ; }
Gets the  cached guard list or creates it from the config
@return GuardInterface[]
Gets the cached guard list or creates it from the config