yii\authclient\Collection::getClients PHP Метод

getClients() публичный Метод

public getClients ( ) : yii\authclient\ClientInterface[]
Результат yii\authclient\ClientInterface[] list of auth clients.
    public function getClients()
    {
        $clients = [];
        foreach ($this->_clients as $id => $client) {
            $clients[$id] = $this->getClient($id);
        }
        return $clients;
    }

Usage Example

 public function testSetGet()
 {
     $collection = new Collection();
     $clients = ['testClient1' => new TestClient(), 'testClient2' => new TestClient()];
     $collection->setClients($clients);
     $this->assertEquals($clients, $collection->getClients(), 'Unable to setup clients!');
 }