Airship\Engine\Continuum::getCabins PHP Method

getCabins() public method

Get an array of CabinUpdater objects
public getCabins ( ) : array
return array
    public function getCabins() : array
    {
        $cabins = [];
        foreach (\glob(ROOT . '/Cabin/*') as $file) {
            if ($file === ROOT . '/Cabin/Bridge') {
                continue;
            }
            if ($file === ROOT . '/Cabin/Hull') {
                continue;
            }
            if (\is_dir($file) && \is_readable($file . '/manifest.json')) {
                $manifest = \Airship\loadJSON($file . '/manifest.json');
                $dirName = \preg_replace('#^.+?/([^\\/]+)$#', '$1', $file);
                if (!empty($manifest['supplier'])) {
                    $cabins[$dirName] = new CabinUpdater($this->hail, $manifest, $this->getSupplier($manifest['supplier']));
                }
            }
        }
        $this->log('Retrieving cabins', LogLevel::DEBUG, ['cabins' => \array_keys($cabins)]);
        return $cabins;
    }