changement dans l'architecture du projet

This commit is contained in:
2019-02-27 13:50:43 +01:00
parent 4c51764836
commit a0ee078501
46 changed files with 197 additions and 283 deletions

71
assets/php/db/Post.php Normal file
View File

@ -0,0 +1,71 @@
<?php
namespace App\DB;
class Post {
private $id;
private $title;
private $url;
private $content;
private $short;
private $categorie;
private $author;
private $dt;
/**
* list of posts
*
* @param boolean $recent sort by most recent or not
* @param integer $limit limit the number of result
*
* @return array(Post)
*/
public static function list($recent = true, $limit = 100) {
}
/**
*
* get a specific Post
*
* @param integer $id the id
*
* @return Post
*/
public static function get(int $id) {
}
/**
* add a post to the db
*
* @param Post $post
*
*/
public static function add(Post $post) {
}
/**
* remove the post
*
* @param Post $post
*
*/
public static function remove(Post $post) {}
/**
* update the post data on the db
*
* @param Post $post
*
* @return void
*/
public static function update(Post $post) {}
}