<?php
class TexteType {

    public static function getAll() {
        $query =  "SELECT * FROM textestypes";
        $statement = Connection::getStatement($query);
        $statement->execute();
        return $statement->fetchAll();
    }
   
    public static function getById($id) {
        $query = "SELECT * FROM textestypes WHERE id = :id";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":id", $id);
        $statement->execute();
        return $statement->fetch();
    }
}