LibCloud\Compute\Providers\Linode\LinodeProvider::listNodes PHP Метод

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

public listNodes ( $nodeId = null )
    public function listNodes($nodeId = null)
    {
        $args = $list = [];
        try {
            if ($nodeId) {
                $args = ['linodeid' => $nodeId];
            }
            $list = array_map([$this, 'toNode'], $this->linode->execute(new LinodeCommand('list', $args)));
            if ($nodeId) {
                return $list[0];
            }
            return $list;
        } catch (\Exception $e) {
            throw $e;
        }
    }