{"action":"opened","issue":{"url":"https://api.github.com/repos/delight-im/PHP-Auth/issues/7","repository_url":"https://api.github.com/repos/delight-im/PHP-Auth","labels_url":"https://api.github.com/repos/delight-im/PHP-Auth/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/delight-im/PHP-Auth/issues/7/comments","events_url":"https://api.github.com/repos/delight-im/PHP-Auth/issues/7/events","html_url":"https://github.com/delight-im/PHP-Auth/issues/7","id":195003786,"number":7,"title":"[NFR] Getter & setter for \\Delight\\Db\\PdoDatabase::$attributes.","user":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T15:32:08Z","updated_at":"2016-12-12T15:32:08Z","closed_at":null,"body":"Hi,\r\n\r\nThanks for a nice auth library.\r\n\r\nI need an ability to modify PDO attributes - MySQL does not support `PDO::ATTR_STRINGIFY_FETCHES`.\r\n\r\nPlease implement:\r\n\r\nIn `\\Delight\\Db\\PdoDatabase`:\r\n\r\n```php\r\n/**\r\n * Set single PDO attribute.\r\n *\r\n * @param integer $key PDO attribute\r\n * @param integer $val PDO attribute value\r\n * @return $this\r\n */\r\npublic function setAttribute($key, $val)\r\n{\r\n    $this->attributes[$key] = $val;\r\n    return $this;\r\n}\r\n\r\n/**\r\n * Set PDO attributes array.\r\n *\r\n * @param array $val PDO attributes in key/value format.\r\n * @return $this\r\n */\r\npublic function setAttributes(array $val = null)\r\n{\r\n    $this->attributes = $val;\r\n    return $this;\r\n}\r\n\r\n/**\r\n * Get PDO attribute value.\r\n *\r\n * @param integer $key PDO attribute\r\n * @return mixed\r\n */\r\npublic function getAttribute($key)\r\n{\r\n    if (isset($this->attributes[$key])) {\r\n        return $this->attributes[$key];\r\n    }\r\n}\r\n/**\r\n * Get all PDO attributes.\r\n *\r\n * @return array|null\r\n */\r\npublic function getAttributes()\r\n{\r\n    return $this->attributes;\r\n}\r\n\r\n```\r\n\r\nIn `Delight\\Auth\\Auth`:\r\n\r\n```php\r\n/**\r\n * @return PdoDatabase\r\n */\r\npublic function getDb()\r\n{\r\n    return $this->db;\r\n}\r\n```\r\n\r\nThanks!"}}
{"actor":{"display_login":"temuri416"}}