Airship\Hangar\Commands\Meta::fire PHP Method

fire() public method

Fire the add command to add files and directories to this update pack.
public fire ( array $args = [] ) : boolean
$args array
return boolean
    public function fire(array $args = []) : bool
    {
        try {
            $this->getSession();
        } catch (\Error $e) {
            echo $e->getMessage(), "\n";
            return false;
        }
        if (\count($args) === 0) {
            echo 'No file passed.', "\n";
            return false;
        }
        $file = $args[0];
        if (\is_readable($file)) {
            $meta = \json_decode(\file_get_contents($file), true);
            if ($meta === false) {
                throw new \Error(\json_last_error_msg(), \json_last_error());
            }
            $this->session['metadata'] = $meta;
            echo 'Metadata loaded.', "\n";
            return true;
        }
        throw new \Error('Could not read ' . $file);
    }
Meta