# fluent-support/2.4.5/app/Api/Api.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 2.4.5. 48 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/2.4.5/code/app/Api/Api.php
- Raw: https://pluginprobe.com/plugins/fluent-support/2.4.5/raw/app/Api/Api.php
- Modified: 2026-02-05T14:04:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/2.4.5/code/app/Api/Api.php#L10-L20`.

```php
<?php

namespace FluentSupport\App\Api;



final class Api
{

    private $app;

    public function __construct($app)
    {
        $this->app = $app;
        $this->register();
    }

    private function register()
    {
        foreach ($this->getClasses() as $key => $class) {
            $this->app->singleton($this->key($key), function($app) use ($class) {
                return new FSApi($app->make($class));
            });
        }
    }

    private function getClasses()
    {
        return require_once(
            $this->app['path.app'].'Api/config.php'
        );
    }

    private function key($key)
    {
        return '__fluentsupport_api__.' . $key;
    }

    public function __get($key)
    {
        try {
            return $this->app[$this->key($key)];
        } catch(\Exception $e) {
            throw new \Exception(sprintf('The %s doesn\'t exist in FluentSupportApi.', esc_html($key)));
        }
    }
}

```
