Exemple #1
0
 /**
  * Convert table to Ads's ID.
  *
  * @param string $sTable
  * @return mixed (string or void if table is not valid) Returns the table if it is correct.
  * @throws If the table is not valid, it throws an exception and displays a error message with the method \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() and exit().
  */
 public static function convertTableToId($sTable)
 {
     switch ($sTable) {
         case 'Ads':
         case 'AdsAffiliates':
             $sId = 'adsId';
             break;
         default:
             Framework\Mvc\Model\Engine\Util\Various::launchErr();
     }
     return $sId;
 }