1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| private function remove_utf8_bom_and_semicolon($text)
{
$text = preg_replace('~^\N{U+FEFF}~u', '', $text);
$text = str_replace(';','',$text);
return $text;
}
private function createLicensesObjects()
{
$tab = [];
foreach ($this->data as $key => $value)
{
$tab[self::remove_utf8_bom_and_semicolon($key)] = self::remove_utf8_bom_and_semicolon($value);
}
$this->data = $tab;
$this->ref_App = new AP_application(($this->data)['sesaid'], $this->data['applicationname']);
//en tout, création de 12 objets mais y a que des affectations de variables
$this->refTableLicense
= new RefTableLicense;
$this->refTableLicense->setRef_License($this->ref_App,
$this->ref_Platform,
$this->ref_Country,
$this->ref_Location,
$this->ref_Company,
$this->ref_BU,
$this->ref_Usermanager,
$this->ref_User,
$this->ref_USL_user_license,
$this->ref_Domain,
$this->ref_Mail,
$this->ref_License);
}
public function setRef_License( $ref_app,
$ref_platform,
$ref_country,
$ref_location,
$ref_Company,
$ref_BU,
$ref_usermanager,
$ref_US_user,
$ref_USL_user_license,
$ref_Domain,
$ref_Email,
$ref_license)
{
$this->ref_App = $ref_app;
$this->ref_Platform = $ref_platform;
$this->ref_Country = $ref_country;
$this->ref_Location = $ref_location;
$this->ref_Company = $ref_Company;
$this->ref_BU = $ref_BU;
$this->ref_Usermanager = $ref_usermanager;
$this->ref_US_user = $ref_US_user;
$this->ref_USL_user_license = $ref_USL_user_license;
$this->ref_Domain = $ref_Domain;
$this->ref_Email = $ref_Email;
$this->ref_License = $ref_license;
} |
Partager