1. Go to this page and download the library: Download lukaszmakuch/lmcondition library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lukaszmakuch / lmcondition example snippets
$wiseBookCondition = (new ConditionComposite())
->addOR(new Difficulty(Difficulty::HARD))
->addOR(new TitleOfMoreCharsThan(50));
$booksForChildrenCondition = (new ConditionComposite())
->addAND(new Difficulty(Difficulty::EASY))
->addAND((new TitleOfMoreCharsThan(15))->negate());
$titleLogerThan99Condition = new TitleOfMoreCharsThan(99);
$easyBookWithLongTitle = (new Book())
->setTitle("A really long title of some book that must be wise.")
->markAsEasy();
$hardBookWithShortTitle = (new Book())
->markAsHard()
->setTitle("How?");
$easyBookWithShortTitle = (new Book())
->markAsEasy()
->setTitle("Cats");