この記事について PHPで学ぶデザインパターン Advent Calendar 2018 - Qiita の 2日目の記事です。 はじめに Specification パターンとは A valuable approach to these problems is to separate the statement of what kind of objects can be selected from the object that does the selection. A cargo has a separate storage specification to describe what kind of container can contain it. The specification object has a clear and limited responsibility,
![Specification パターン - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/c1148d8067a935e8d05e96060b47b87318b77aa5/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-1150d8b18a7c15795b701a55ae908f94.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTg0MCZoPTM4MCZ0eHQ2ND1VM0JsWTJsbWFXTmhkR2x2YmlEamc1SGpncl9qZzd6amc3TSZ0eHQtY29sb3I9JTIzMzMzJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTU0JnR4dC1jbGlwPWVsbGlwc2lzJnR4dC1hbGlnbj1jZW50ZXIlMkNtaWRkbGUmcz00Y2M1OTBiYTk1ZjM2M2Q4NzZiNTNmMjZhNDE5MGYzMQ%26mark-align%3Dcenter%252Cmiddle%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTg0MCZoPTUwMCZ0eHQ2ND1RRzUxYm5Wc2F3JnR4dC1jb2xvcj0lMjMzMzMmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9NDUmdHh0LWFsaWduPXJpZ2h0JTJDYm90dG9tJnM9YTU2Y2RiOGVhMzgyOTk0YmEwZmYxYmRkNmE1ZDY1NTE%26blend-align%3Dcenter%252Cmiddle%26blend-mode%3Dnormal%26s%3D88c699d476fb21e20b452126af9ca6c9)