Oara\Factory::createInstance PHP Method

createInstance() public static method

public static createInstance ( $networkClassName ) : null
return null
    public static function createInstance($networkClassName)
    {
        $affiliate = null;
        try {
            $affiliate = new $networkClassName();
        } catch (\Exception $e) {
            throw new \Exception('Error creating instance ' . $networkClassName . ' - ' . $e->getMessage());
        }
        return $affiliate;
    }