/** * Devuelve la instancia de FactoryConnection * @return FactoryConnection */ public static function getInstance() { if (!self::$instance instanceof self) { self::$instance = new self(); } return self::$instance; }
public static function deleteGuest($id) { $db = FactoryConnection::getDB(); $guest = $db->guests[$id]; if ($guest) { $guest->delete(); return true; } return false; }
public function __construct() { $this->connection = FactoryConnection::getInstance()->getConnectionMySQL(); }