/**
  * 
  * @return \ActionsAdminClient
  */
 public static function getInstance()
 {
     if (self::$instance === false) {
         self::$instance = new ActionsAdminClient();
     }
     return self::$instance;
 }
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_clients")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$client = new Client();
if (!$request->get("ref") || !$client->charger_ref($request->get("ref"))) {
    redirige('client.php');
}
$errorCode = 0;
try {
    ActionsAdminClient::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::CLIENT_ADD_ADRESS:
            $addError = 1;
            break;
        case TheliaAdminException::CLIENT_ADRESS_EDIT_ERROR:
            $editAddressError[$request->get("id")] = 1;
            break;
    }
}
$raisondesc = new Raisondesc($client->raison);
if ($client->parrain) {
    $parrain = new Client();
    $parrain->charger_id($client->parrain);