"value":"\n <p>A few months ago, <a href=\"https:\/\/www.oliverdavies.uk\/podcast\/6-dan-leech-php-tui\">Beyond Blocks podcast guest Dan Leech<\/a> give another talk at the PHP South West user group.<\/p>\n\n<p>This talk was about <a href=\"https:\/\/www.youtube.com\/watch?v=UpyVAcWGQhg\">building an expression language from scratch<\/a>, but in one part of the talk, Dan showed how he creates Collection classes.<\/p>\n\n<p>I use Collection classes a lot, have <a href=\"https:\/\/www.oliverdavies.uk\/presentations\/using-illuminate-collections-outside-laravel\">given talks about them<\/a> and <a href=\"https:\/\/www.drupal.org\/project\/collection_class\">wrote a Collections module for Drupal 7<\/a>.<\/p>\n\n<p>In Dan's talk, instead of using a Collection from Laravel or Doctrine, <a href=\"https:\/\/github.com\/dantleech\/onehourexpr\/blob\/8c4ee4a3c1680455118e16a3e1be2a08418ab207\/src\/Tokens.php\">he created his own<\/a>.<\/p>\n\n<p>His extended PHP's <code>IteratorAggregate<\/code> class so had no external dependencies.<\/p>\n\n<p>He could then add whatever additional methods and functionality he needed.<\/p>\n\n<p>Looking at other repositories on GitHub, I was able to find other examples.<\/p>\n\n<p>I've done this on projects since Dan's talk and like taking the minimalist approach - avoiding adding a dependency to my project and only adding the functionality I need and functionality that's more specific to my domain.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>A few months ago, <a href=\"https:\/\/www.oliverdavies.uk\/podcast\/6-dan-leech-php-tui\">Beyond Blocks podcast guest Dan Leech<\/a> give another talk at the PHP South West user group.<\/p>\n\n<p>This talk was about <a href=\"https:\/\/www.youtube.com\/watch?v=UpyVAcWGQhg\">building an expression language from scratch<\/a>, but in one part of the talk, Dan showed how he creates Collection classes.<\/p>\n\n<p>I use Collection classes a lot, have <a href=\"https:\/\/www.oliverdavies.uk\/presentations\/using-illuminate-collections-outside-laravel\">given talks about them<\/a> and <a href=\"https:\/\/www.drupal.org\/project\/collection_class\">wrote a Collections module for Drupal 7<\/a>.<\/p>\n\n<p>In Dan's talk, instead of using a Collection from Laravel or Doctrine, <a href=\"https:\/\/github.com\/dantleech\/onehourexpr\/blob\/8c4ee4a3c1680455118e16a3e1be2a08418ab207\/src\/Tokens.php\">he created his own<\/a>.<\/p>\n\n<p>His extended PHP's <code>IteratorAggregate<\/code> class so had no external dependencies.<\/p>\n\n<p>He could then add whatever additional methods and functionality he needed.<\/p>\n\n<p>Looking at other repositories on GitHub, I was able to find other examples.<\/p>\n\n<p>I've done this on projects since Dan's talk and like taking the minimalist approach - avoiding adding a dependency to my project and only adding the functionality I need and functionality that's more specific to my domain.<\/p>\n\n ",