{"action":"created","issue":{"url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/163","labels_url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/163/comments","events_url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/163/events","html_url":"https://github.com/domnikl/DesignPatternsPHP/pull/163","id":96090199,"number":163,"title":"Add Entity-Attribute-Value (EAV) pattern","user":{"login":"bocharsky-bw","id":3317635,"avatar_url":"https://avatars.githubusercontent.com/u/3317635?v=3","gravatar_id":"","url":"https://api.github.com/users/bocharsky-bw","html_url":"https://github.com/bocharsky-bw","followers_url":"https://api.github.com/users/bocharsky-bw/followers","following_url":"https://api.github.com/users/bocharsky-bw/following{/other_user}","gists_url":"https://api.github.com/users/bocharsky-bw/gists{/gist_id}","starred_url":"https://api.github.com/users/bocharsky-bw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocharsky-bw/subscriptions","organizations_url":"https://api.github.com/users/bocharsky-bw/orgs","repos_url":"https://api.github.com/users/bocharsky-bw/repos","events_url":"https://api.github.com/users/bocharsky-bw/events{/privacy}","received_events_url":"https://api.github.com/users/bocharsky-bw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-20T15:34:27Z","updated_at":"2015-08-21T10:00:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/pulls/163","html_url":"https://github.com/domnikl/DesignPatternsPHP/pull/163","diff_url":"https://github.com/domnikl/DesignPatternsPHP/pull/163.diff","patch_url":"https://github.com/domnikl/DesignPatternsPHP/pull/163.patch"},"body":"Assign to issue #155 \r\n\r\nAdd EAV pattern prototype with some usage example in [example.php](https://github.com/bocharsky-bw/DesignPatternsPHP/blob/eav/More/EAV/example.php):\r\n\r\n``` php\r\nuse DesignPatterns\\More\\EAV\\Entity;\r\nuse DesignPatterns\\More\\EAV\\Attribute;\r\nuse DesignPatterns\\More\\EAV\\Value;\r\n\r\n// color attribute\r\n$color = (new Attribute())->setName('Color');\r\n// color values\r\n$colorSilver    = (new Value($color))->setName('Silver');\r\n$colorGold      = (new Value($color))->setName('Gold');\r\n$colorSpaceGrey = (new Value($color))->setName('Space Grey');\r\n\r\n// memory attribute\r\n$memory  = (new Attribute())->setName('Memory');\r\n// memory values\r\n$memory4Gb  = (new Value($memory))->setName('4GB');\r\n$memory8Gb  = (new Value($memory))->setName('8GB');\r\n$memory16Gb = (new Value($memory))->setName('16GB');\r\n\r\n// storage attribute\r\n$storage  = (new Attribute())->setName('Storage');\r\n// storage values\r\n$storage128Gb   = (new Value($storage))->setName('128GB');\r\n$storage256Gb   = (new Value($storage))->setName('256GB');\r\n$storage512Gb   = (new Value($storage))->setName('512GB');\r\n$storage1Tb     = (new Value($storage))->setName('1TB');\r\n\r\n// entities\r\n$mac = (new Entity())\r\n    ->setName('MacBook')\r\n    // colors\r\n    ->addValue($colorSilver)\r\n    ->addValue($colorGold)\r\n    ->addValue($colorSpaceGrey)\r\n    // memories\r\n    ->addValue($memory8Gb)\r\n    // storages\r\n    ->addValue($storage256Gb)\r\n    ->addValue($storage512Gb)\r\n;\r\n\r\n$macAir = (new Entity())\r\n    ->setName('MacBook Air')\r\n    // colors\r\n    ->addValue($colorSilver)\r\n    // memories\r\n    ->addValue($memory4Gb)\r\n    ->addValue($memory8Gb)\r\n    // storages\r\n    ->addValue($storage128Gb)\r\n    ->addValue($storage256Gb)\r\n    ->addValue($storage512Gb)\r\n;\r\n\r\n$macPro = (new Entity())\r\n    ->setName('MacBook Pro')\r\n    // colors\r\n    ->addValue($colorSilver)\r\n    // memories\r\n    ->addValue($memory8Gb)\r\n    ->addValue($memory16Gb)\r\n    // storages\r\n    ->addValue($storage128Gb)\r\n    ->addValue($storage256Gb)\r\n    ->addValue($storage512Gb)\r\n    ->addValue($storage1Tb)\r\n;\r\n```\r\n\r\nWhat do you think, guys?"},"comment":{"url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/comments/133360365","html_url":"https://github.com/domnikl/DesignPatternsPHP/pull/163#issuecomment-133360365","issue_url":"https://api.github.com/repos/domnikl/DesignPatternsPHP/issues/163","id":133360365,"user":{"login":"bocharsky-bw","id":3317635,"avatar_url":"https://avatars.githubusercontent.com/u/3317635?v=3","gravatar_id":"","url":"https://api.github.com/users/bocharsky-bw","html_url":"https://github.com/bocharsky-bw","followers_url":"https://api.github.com/users/bocharsky-bw/followers","following_url":"https://api.github.com/users/bocharsky-bw/following{/other_user}","gists_url":"https://api.github.com/users/bocharsky-bw/gists{/gist_id}","starred_url":"https://api.github.com/users/bocharsky-bw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocharsky-bw/subscriptions","organizations_url":"https://api.github.com/users/bocharsky-bw/orgs","repos_url":"https://api.github.com/users/bocharsky-bw/repos","events_url":"https://api.github.com/users/bocharsky-bw/events{/privacy}","received_events_url":"https://api.github.com/users/bocharsky-bw/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T10:00:04Z","updated_at":"2015-08-21T10:00:04Z","body":"Hey, @domnikl , I updated my PR and added missing parts.\r\nWhat do you think? Can you look when have a time?"}}