tome export
This commit is contained in:
parent
52278c3a53
commit
7a52afab5f
960 changed files with 3670 additions and 2229 deletions
|
@ -82,15 +82,15 @@
|
|||
],
|
||||
"body": [
|
||||
{
|
||||
"value": "\n <p>Yesterday, I wrote how to create <a href=\"/daily\/2025\/03\/29\/collections\">dependency free Collection classes in PHP<\/a> (thanks to Dan Leech).<\/p>\n\n<p>I said that <a href=\"/blog\/using-laravel-collections-drupal\">I've written blog posts<\/a> and <a href=\"/presentations\/using-illuminate-collections-outside-laravel\">given talks<\/a> on using Collection classes.<\/p>\n\n<p>But why do I like Collections and why may you want to use them instead of native arrays?<\/p>\n\n<p>The first reason is that I can add extra functionality to Collections, because they're objects.<\/p>\n\n<p>Whether it's a generic action such as filtering or sorting the items, or something more specific like returning a list of station codes from a collection of train stations, this can be added to specific collection classes.<\/p>\n\n<p>I'll usually have an <code>AbstractCollection<\/code> that has the generic methods and is extended by specific Collection types with methods more specific methods.<\/p>\n\n<p>Having specific types of Collection objects also gives my code more context.<\/p>\n\n<p>Instead of an array that could contain anything, by reading the code and seeing which Collection types are used, I know what the collection contains and what I can do with it.<\/p>\n\n<p>This is also why I like value objects.<\/p>\n\n<p>Giving objects specific names instead of relying on the language's primitive types makes the code more robust and easier to read and understand.<\/p>\n\n ",
|
||||
"value": "\n <p>Yesterday, I wrote how to create <a href=\"\/daily\/2025\/03\/29\/collections\">dependency free Collection classes in PHP<\/a> (thanks to Dan Leech).<\/p>\n\n<p>I said that <a href=\"\/blog\/using-laravel-collections-drupal\">I've written blog posts<\/a> and <a href=\"\/presentations\/using-illuminate-collections-outside-laravel\">given talks<\/a> on using Collection classes.<\/p>\n\n<p>But why do I like Collections and why may you want to use them instead of native arrays?<\/p>\n\n<p>The first reason is that I can add extra functionality to Collections, because they're objects.<\/p>\n\n<p>Whether it's a generic action such as filtering or sorting the items, or something more specific like returning a list of station codes from a collection of train stations, this can be added to specific collection classes.<\/p>\n\n<p>I'll usually have an <code>AbstractCollection<\/code> that has the generic methods and is extended by specific Collection types with methods more specific methods.<\/p>\n\n<p>Having specific types of Collection objects also gives my code more context.<\/p>\n\n<p>Instead of an array that could contain anything, by reading the code and seeing which Collection types are used, I know what the collection contains and what I can do with it.<\/p>\n\n<p>This is also why I like value objects.<\/p>\n\n<p>Giving objects specific names instead of relying on the language's primitive types makes the code more robust and easier to read and understand.<\/p>\n\n ",
|
||||
"format": "full_html",
|
||||
"processed": "\n <p>Yesterday, I wrote how to create <a href=\"/daily\/2025\/03\/29\/collections\">dependency free Collection classes in PHP<\/a> (thanks to Dan Leech).<\/p>\n\n<p>I said that <a href=\"/blog\/using-laravel-collections-drupal\">I've written blog posts<\/a> and <a href=\"/presentations\/using-illuminate-collections-outside-laravel\">given talks<\/a> on using Collection classes.<\/p>\n\n<p>But why do I like Collections and why may you want to use them instead of native arrays?<\/p>\n\n<p>The first reason is that I can add extra functionality to Collections, because they're objects.<\/p>\n\n<p>Whether it's a generic action such as filtering or sorting the items, or something more specific like returning a list of station codes from a collection of train stations, this can be added to specific collection classes.<\/p>\n\n<p>I'll usually have an <code>AbstractCollection<\/code> that has the generic methods and is extended by specific Collection types with methods more specific methods.<\/p>\n\n<p>Having specific types of Collection objects also gives my code more context.<\/p>\n\n<p>Instead of an array that could contain anything, by reading the code and seeing which Collection types are used, I know what the collection contains and what I can do with it.<\/p>\n\n<p>This is also why I like value objects.<\/p>\n\n<p>Giving objects specific names instead of relying on the language's primitive types makes the code more robust and easier to read and understand.<\/p>\n\n ",
|
||||
"processed": "\n <p>Yesterday, I wrote how to create <a href=\"http:\/\/default\/daily\/2025\/03\/29\/collections\">dependency free Collection classes in PHP<\/a> (thanks to Dan Leech).<\/p>\n\n<p>I said that <a href=\"http:\/\/default\/blog\/using-laravel-collections-drupal\">I've written blog posts<\/a> and <a href=\"http:\/\/default\/presentations\/using-illuminate-collections-outside-laravel\">given talks<\/a> on using Collection classes.<\/p>\n\n<p>But why do I like Collections and why may you want to use them instead of native arrays?<\/p>\n\n<p>The first reason is that I can add extra functionality to Collections, because they're objects.<\/p>\n\n<p>Whether it's a generic action such as filtering or sorting the items, or something more specific like returning a list of station codes from a collection of train stations, this can be added to specific collection classes.<\/p>\n\n<p>I'll usually have an <code>AbstractCollection<\/code> that has the generic methods and is extended by specific Collection types with methods more specific methods.<\/p>\n\n<p>Having specific types of Collection objects also gives my code more context.<\/p>\n\n<p>Instead of an array that could contain anything, by reading the code and seeing which Collection types are used, I know what the collection contains and what I can do with it.<\/p>\n\n<p>This is also why I like value objects.<\/p>\n\n<p>Giving objects specific names instead of relying on the language's primitive types makes the code more robust and easier to read and understand.<\/p>\n\n ",
|
||||
"summary": null
|
||||
}
|
||||
],
|
||||
"feeds_item": [
|
||||
{
|
||||
"imported": "1970-01-01T00:33:45+00:00",
|
||||
"imported": "1970-01-01T00:32:50+00:00",
|
||||
"guid": null,
|
||||
"hash": "9ed6c1d39227210765b7041449aae5f5",
|
||||
"target_type": "feeds_feed",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue