Posted on Sunday 7th October 2018
It accesses files such as markdown files within a predefined directory, gets the content and other information and returns it back to the user with simple to use functions.
The intent of this class is to be used in several projects which access articles, allowing the functionality to be quickly added rather than recreated each time.
use CPS\Article; $dir = "./where/your/files/are"; $article = new Article($dir); $results = $article->list("your term here");
use CPS\Article; $dir = "./where/your/files/are"; $article = new Article($dir); $results = $article->load("Article Name");
The preferred method is using composer (https://getcomposer.org/) and can be installed using the following command
composer require christopher-paul-shaw/article
You can also clone the repository from github
git clone firstname.lastname@example.org:christopher-paul-shaw/Article.git