/** * On run make an instance of the config class and view class. */ public function __construct() { /** initialise the views object */ $this->view = new View(); /** initialise the language object */ $this->language = new Language(); $this->entityManager = EntityManager::getInstance(); }
public function __construct() { parent::__construct(); $this->userSQL = new PersonneSQL(); $this->entityManager = EntityManager::getInstance(); }
public function lier($idAlbum, $idPhoto) { $sql = new AlbumSQL(); $a = $sql->findById($idAlbum); if ($a->utilisateur_id == Session::get('id')) { $pdo = DBManager::getInstance()->getPDO(); $q = $pdo->prepare("DELETE FROM contient WHERE photo_id=?"); $q->execute(array($idPhoto)); $c = new Contient($idAlbum, $idPhoto); EntityManager::getInstance()->save($c); } // Url::previous(); }