D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
dateitor
/
public_html
/
vendor
/
opcodesio
/
log-viewer
/
src
/
Filename :
HostCollection.php
back
Copy
<?php namespace Opcodes\LogViewer; use Illuminate\Support\Collection; class HostCollection extends Collection { public static function fromConfig(array $config = []): self { return new static(array_map( fn (array $hostConfig, $identifier) => Host::fromConfig($identifier, $hostConfig), $config, array_keys($config) )); } public function remote(): self { return $this->filter(fn (Host $host) => $host->isRemote()); } public function local(): self { return $this->filter(fn (Host $host) => ! $host->isRemote()); } }