src/Addon/AddonManager.php
public function getInstance($addonName) {
        if (!$this->isStarted($addonName)) {
            throw new \Exception("Tried to get instance of inactive addon '{$addonName}'");
        }

        if (!array_key_exists($addonName, $this->instances) || !($this->instances[$addonName] instanceof AddonInterface)) {
            throw new \Exception("Addon '{$addonName}' has no instance");
        }

        return $this->instances[$addonName];
    }
public function getInstance($addonName) {
        if (!$this->isStarted($addonName)) {
            throw new \Exception("Tried to get instance of inactive addon '{$addonName}'");
        }

        if (!array_key_exists($addonName, $this->instances) || !($this->instances[$addonName] instanceof AddonInterface)) {
            throw new \Exception("Addon '{$addonName}' has no instance");
        }

        return $this->instances[$addonName];
    }
public function getInstance ( $ addonName ) { if ( ! $ this -> isStarted ( $ addonName ) ) { throw new \ Exception ( "Tried to get instance of inactive addon '{$addonName}'" ) ; } if ( ! array_key_exists ( $ addonName , $ this -> instances ) || ! ( $ this -> instances [ $ addonName ] instanceof AddonInterface ) ) { throw new \ Exception ( "Addon '{$addonName}' has no instance" ) ; } return $ this -> instances [ $ addonName ] ; }
Get addon instance

@param string $addonName
@throws \Exception
@return AddonInterface
Get addon instance