{"id":56,"date":"2018-05-24T17:59:35","date_gmt":"2018-05-24T08:59:35","guid":{"rendered":"http:\/\/syrup-factory.com\/memo\/?p=56"},"modified":"2018-05-24T18:17:40","modified_gmt":"2018-05-24T09:17:40","slug":"php7%e3%83%bbpdo%e3%81%a7%e3%82%82%e8%aa%8d%e8%a8%bc%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%81%a7sentinel%e3%81%a7%e3%81%af%e3%81%aa%e3%81%8fpearauth%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f","status":"publish","type":"post","link":"https:\/\/syrup-factory.com\/memo\/archives\/56","title":{"rendered":"php7\u30fbPDO\u3067\u3082\u8a8d\u8a3c\u30e9\u30a4\u30d6\u30e9\u30ea\u3067Sentinel\u3067\u306f\u306a\u304fPEAR::Auth\u3092\u4f7f\u3063\u305f"},"content":{"rendered":"<p>\u3044\u3044\u52a0\u6e1bPEAR\u306f\u6642\u4ee3\u9045\u308c\uff1f\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6628\u4eca\u306ePHP\u306e\u8a8d\u8a3c\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63a2\u3057\u3066\u307f\u305f\u3002<br \/>\n\u300cSentinel\u300d\u304c\u30a4\u30c1\u30aa\u30b7\u3089\u3057\u3044\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001DL\u3057\u3066\u4f7f\u304a\u3046\u3068\u3057\u305f\u306e\u3060\u304c\u3002<br \/>\n\u306a\u306b\u3053\u308c\u3001\u30e6\u30fc\u30b6\u30c6\u30fc\u30d6\u30eb\u6c7a\u307e\u3063\u3066\u308b\u306e\uff1froll\u30c6\u30fc\u30d6\u30eb\u3084\u3089\u4f55\u3084\u3089\u30017\u3064\u3082\u30c6\u30fc\u30d6\u30eb\u8981\u308b\u306e\uff1f<\/p>\n<ul>\n<li>\u30e6\u30fc\u30b6\u306f\u8907\u6570\u30b0\u30eb\u30fc\u30d7\u306b\u6240\u5c5e\u53ef\u80fd\u3002<\/li>\n<li>\u8907\u6570\u306e\u8981\u7d20\u3067\u30ed\u30b0\u30a4\u30f3\u53ef\u80fd\uff08email\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u3001etc\uff09<\/li>\n<li>\u30ea\u30de\u30a4\u30f3\u30c0\u30fc\u30e1\u30fc\u30eb\u6a5f\u80fd<\/li>\n<li>\u6a29\u9650\u3092\u30e6\u30fc\u30b6\u3068\u30b0\u30eb\u30fc\u30d7\u305d\u308c\u305e\u308c\u306b\u6301\u305f\u305b\u3089\u308c\u3001\u305d\u308c\u3089\u306e\u91cd\u306d\u639b\u3051\u3082\u53ef\u80fd\u3002<\/li>\n<li>\u30ed\u30b0\u30a4\u30f3\u5931\u6557\u6642\u306b\u898f\u5b9a\u56de\u6570\u3067\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u30ed\u30c3\u30af\u3055\u305b\u3089\u308c\u308b<\/li>\n<\/ul>\n<p><span style=\"color: #0000ff;\">\u3000\u3000\uff08\u2192<a style=\"color: #0000ff;\" href=\"https:\/\/blog.bagooon.com\/?p=1248\">\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u30d1\u30c3\u30b1\u30fc\u30b8Sentinel\u3092\u8907\u6570\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067\u4f7f\u7528\u3059\u308b<\/a>\uff09<\/span><br \/>\n\u3060\u305d\u3046\u3067\u3059\u304c\u3001\u4eca\u56de\u4f7f\u3044\u305f\u3044\u306e\u306f\u5358\u7d14\u306b<\/p>\n<ul>\n<li>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\/id\u306e\u30ed\u30b0\u30a4\u30f3<\/li>\n<\/ul>\n<p>\u3060\u3051\u3002<\/p>\n<p>\u4e00\u822c\u4f1a\u54e1\u5411\u3051\u30b5\u30a4\u30c8\u3068\u3001\u5225\u306b\u7ba1\u7406\u7cfb\u30b5\u30a4\u30c8\u306e\u30b9\u30bf\u30c3\u30d5\u7528\u30ed\u30b0\u30a4\u30f3\u304c\u5fc5\u8981\u3002\u3053\u3061\u3089\u3082roll\u3082\u30ea\u30de\u30a4\u30f3\u30c0\u3082\u3044\u3089\u306a\u3044\u3002\u30b7\u30f3\u30d7\u30eb\u306b\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u3060\u3051\u3067\u304d\u308c\u3070\u3044\u3044\u3002<br \/>\nSentinel\u306f\u30017\u00d72\uff1d14\u30c6\u30fc\u30d6\u30eb\u3082\u5fc5\u8981\u306b\u306a\u308b\uff1f\u30e6\u30fc\u30b6\u30c6\u30fc\u30d6\u30eb\u3068\u30b9\u30bf\u30c3\u30d5\u30c6\u30fc\u30d6\u30eb\u3055\u3048\u3042\u308c\u3070\u3044\u3044\u306e\u306b\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30aa\u30fc\u30d0\u30fc\u30b9\u30da\u30c3\u30af\u306aSentinel\u306f\u6b62\u3081\u3066\u3001\u5f93\u6765\u901a\u308aPEAR::Auth\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u30fbPHP7 \u3067\u306f\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u306e\u3067\u3064\u3076\u3059\u5fc5\u8981\u3042\u308a\u3002\u300c&amp; new\u300d\u3068\u304b\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3068\u304b\u3002<br \/>\n\u30fbPDO\u7528\u306eContainer\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u2193\u306e\u30bd\u30fc\u30b9\u3092\u4f7f\u308f\u305b\u3066\u3044\u305f\u3060\u307e\u3057\u305f\u3002<br \/>\n\u2192<span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/seedslight.com\/wp\/archives\/182\">PEAR::Auth\u306bPDO\u306eContainer\u3092\u8ffd\u52a0\u3057\u3066\u307f\u308b\uff08\u691c\u8a3c\u4e2d\uff09<\/a><\/span><br \/>\n\u203b\u8a8d\u8a3c\u90e8\u5206\u306e\u307f\u3002\u4f1a\u54e1\u8ffd\u52a0\u7b49\u3005\u3001\u66f4\u65b0\u7cfb\u306f\u672a\u4f7f\u7528\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">    $params = array(\r\n\t    'dsn' =&gt; 'pgsql:host=localhost dbname=YourDB port=xxxx',\r\n\t    'table' =&gt; 'tbl_member',\r\n\t    'usernamecol' =&gt; 'email',\r\n\t    'passwordcol' =&gt; 'pass',\r\n\t    'auto_quote' =&gt; false,\r\n\t    'db_fields' =&gt; '*',\r\n\t    'db_where' =&gt; 'del_flg = false',\r\n\t    'cryptType'=&gt; 'crypt'\r\n    );\r\n    \/\/ Auth\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\r\n    $auth = new Auth('PDO', $params, array($this, 'loginFunc'));\r\n<\/pre>\n<p>\u3067\u30a2\u30af\u30bb\u30b9\u3002<br \/>\npostgreSQL\u3067\u3001\u65e5\u672c\u8a9e\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u4f7f\u3063\u3066\u3044\u305f\u305f\u3081\u300c&#8217;auto_quote&#8217; => false\u300d\u6307\u5b9a\u3002<\/p>\n<p>PEAR\u306f\u53e4\u3044\u3068\u3044\u3046\u304c\u3001\u67af\u308c\u3066\u3044\u308b\u3068\u3082\u3044\u3048\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3044\u52a0\u6e1bPEAR\u306f\u6642\u4ee3\u9045\u308c\uff1f\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u6628\u4eca\u306ePHP\u306e\u8a8d\u8a3c\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u63a2\u3057\u3066\u307f\u305f\u3002 \u300cSentin &#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/syrup-factory.com\/memo\/archives\/56\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5],"tags":[],"_links":{"self":[{"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/posts\/56"}],"collection":[{"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":10,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":66,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/posts\/56\/revisions\/66"}],"wp:attachment":[{"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/syrup-factory.com\/memo\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}