sathyashrayan

PostRepositoryInterface.php

Jul 2nd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Blog\Mapper; // file path changed
  4.  
  5. interface PostRepositoryInterface
  6. {
  7.     /**
  8.      * Return a set of all blog posts that we can iterate over.
  9.      *
  10.      * Each entry should be a Post instance.
  11.      *
  12.      * @return Post[]
  13.      */
  14.     public function findAllPosts();
  15.  
  16.     /**
  17.      * Return a single blog post.
  18.      *
  19.      * @param  int $id Identifier of the post to return.
  20.      * @return Post
  21.     */
  22.     public function findPost($id);
  23. }
  24.  
  25. /*namespace Blog\Model;
  26.  
  27. interface PostRepositoryInterface
  28. {
  29.     /**
  30.      * Return a set of all blog posts that we can iterate over.
  31.      *
  32.      * Each entry should be a Post instance.
  33.      *
  34.      * @return Post[]
  35.      */
  36.     public function findAllPosts();
  37.  
  38.     /**
  39.      * Return a single blog post.
  40.      *
  41.      * @param  int $id Identifier of the post to return.
  42.      * @return Post
  43.     */
  44.     public function findPost($id);
  45. }*/
Add Comment
Please, Sign In to add comment