{"id":57,"date":"2015-06-06T13:25:00","date_gmt":"2015-06-06T04:25:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=57"},"modified":"2015-06-06T13:25:00","modified_gmt":"2015-06-06T04:25:00","slug":"11-yii","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2015\/06\/11-yii\/","title":{"rendered":"\u30b5\u30a4\u30c8\u6539\u88c5\u3078\u306e\u9053(11) \u300cYii2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d"},"content":{"rendered":"<div class=\"separator\" style=\"clear: both; text-align: center;\">\n<a href=\"http:\/\/4.bp.blogspot.com\/-LDhGTp26voc\/VXLOLt9W_9I\/AAAAAAABLB4\/SZRxIHa_8Mo\/s1600\/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588%2B2015-06-06%2B19.23.51.png\" imageanchor=\"1\" style=\"clear: right; float: right; margin-bottom: 1em; margin-left: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"168\" src=\"\/blog\/wp-content\/uploads\/2015\/06\/E382B9E382AFE383AAE383BCE383B3E382B7E383A7E38383E383882015-06-0619.23.51.png\" width=\"320\" \/><\/a><\/div>\n<p>\u307e\u305a\u306f\u3001\u300c<a href=\"http:\/\/www.yiiframework.com\/doc\/guide\/1.1\/ja\/quickstart.installation\">\u306f\u3058\u3081\u306b\uff1a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u300d\u3092\u53c2\u8003\u306b\u3001\u6b21\u306e\u30da\u30fc\u30b8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002<br \/>\n<a href=\"http:\/\/www.yiiframework.com\/\">http:\/\/www.yiiframework.com\/<\/a><br \/>\n\u3068\u601d\u3063\u305f\u3089\u3001Composer\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u3082\u3002<br \/>\n\u6700\u8fd1\u3001\u4f7f\u3046\u6a5f\u4f1a\u304c\u591a\u3044\u304c\u3001Mac OS X\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306f\u3001<\/p>\n<p>$ curl -sS https:\/\/getcomposer.org\/installer | php<br \/>\n#!\/usr\/bin\/env php<br \/>\nAll settings correct for using Composer<br \/>\nDownloading&#8230;<br \/>\nComposer successfully installed to: \/Users\/username\/composer.phar<br \/>\nUse it: php composer.phar<\/p>\n<div>\n<div class=\"p4\">\n<\/div>\n<p>\u4ee5\u4e0a\uff01<\/p>\n<p>\u3042\u308c\uff1f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u304c\/Users\/username\/\u306b\u306a\u3063\u3066\u308b\u3002<\/p>\n<div class=\"p3\">\n\u79fb\u52d5\u3057\u3068\u3053\u3046\u3002<\/div>\n<p>$ mv composer.phar \/usr\/local\/bin\/composer<\/p>\n<div class=\"p3\">\n\u3053\u308c\u306b\u3088\u3063\u3066\u3001<\/div>\n<p>$ php composer.phar \u301c<\/p>\n<div class=\"p3\">\n\u3068\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3053\u308d\u3001<\/div>\n<p>$ composer \u301c<\/p>\n<div class=\"p3\">\n\u3067\u3001\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u672c\u984c\u306b\u623b\u3063\u3066\u3001Yii\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u3068\u601d\u3063\u305f\u3089\u3001\u5148\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3002<\/p>\n<p>$ composer global require &#8220;fxp\/composer-asset-plugin:1.0.0&#8221;<br \/>\nChanged current directory to \/Users\/username\/.composer<br \/>\n.\/composer.json has been created<br \/>\nLoading composer repositories with package information<br \/>\nUpdating dependencies (including require-dev)<br \/>\n&#8211; Installing fxp\/composer-asset-plugin (v1.0.0)<br \/>\nDownloading: 100%<br \/>\nWriting lock file<br \/>\nGenerating autoload files<br \/>\n\u3067\u3001\u3084\u3063\u3068Yii\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4eca\u5ea6\u3053\u305d\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3001\u30a2\u30c9\u30d0\u30f3\u30b9\u30c9\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u9078\u3073\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a\u65b9\u3092\u9078\u3093\u3067\u3001<\/p>\n<p>$ composer create-project yiisoft\/yii2-app-basic basic 2.0.4<br \/>\nInstalling yiisoft\/yii2-app-basic (2.0.4)&nbsp; &#8211; Installing yiisoft\/yii2-app-basic (2.0.4)&nbsp; &nbsp; Downloading: 100%&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\nCreated project in basicLoading composer repositories with package informationInstalling dependencies (including require-dev)Reading bower.json of bower-asset\/jquery.inputmask (3.1.56)Could not fetch https:\/\/api.github.com\/repos\/RobinHerbots\/jquery.inputmask\/contents\/bower.json?ref=xxxxxxxxxxxxxxxxx, please create a GitHub OAuth token to go over the API rate limitHead to https:\/\/github.com\/settings\/tokens\/new?scopes=repo&amp;description=yyyyyyyyyyyyto retrieve a token. It will be stored in &#8220;\/Users\/username\/.composer\/auth.json&#8221; for future use by Composer.Token (hidden):&nbsp;\n<\/div>\n<div class=\"p2\">\n<div class=\"p3\">\n<\/div>\n<p>\u3068\u3001\u306a\u3093\u3060\u304b\u9014\u4e2d\u3067\u6b62\u307e\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p><\/div>\n<div class=\"p1\">\n\u8abf\u3079\u3066\u307f\u308b\u3068\u3001Github\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3001\u8a8d\u8a3c\u306a\u3057\u306e\u5834\u5408\u3001\u540c\u3058IP\u30a2\u30c9\u30ec\u30b9\u304b\u30891\u6642\u9593\u306760\u56de\u307e\u3067\u3068\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u305d\u308c\u3092\u8d85\u3048\u305f\u3088\u3046\u3067\u3059\u3002<\/div>\n<div class=\"p1\">\n\u56e0\u307f\u306b\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u3042\u3068\u4f55\u56de\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>$ curl  -i https:\/\/api.github.com\/users\/whatever<br \/>\nHTTP\/1.1 403 Forbidden<br \/>\nServer: GitHub.com<br \/>\nDate: Sat, 06 Jun 2015 11:58:23 GMT<br \/>\nContent-Type: application\/json; charset=utf-8<br \/>\nContent-Length: 257<br \/>\nStatus: 403 Forbidden<br \/>\nX-RateLimit-Limit: 60<br \/>\nX-RateLimit-Remaining: 0<br \/>\nX-RateLimit-Reset: 1433594536<br \/>\n&#8230;<br \/>\n\uff16\uff10\u56de\u4e2d\u3001\u6b8b\u308a\uff10\u3002\u306f\u3044\u3002\u3082\u3046\u30c0\u30e1\u3067\u3059\u3002<\/div>\n<div class=\"p2\">\n\u56e0\u307f\u306b\u3001\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u308b\u306e\u306f\u30011433594536\u3063\u3066\u3044\u3046\u6642\u9593\u3002<\/div>\n<div class=\"p2\">\nMac\u3060\u3068\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4f55\u6642\u4f55\u5206\u304b\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>$ date -r 1433594536<br \/>\n2015\u5e74 6\u6708 6\u65e5 \u571f\u66dc\u65e5 21\u664242\u520616\u79d2 JST<br \/>\n<br \/>\n\u3067\u306f\u3001Github\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u6301\u3063\u3066\u3044\u308b\u3067\u3042\u308d\u3046\u4e8b\u3092\u7948\u308a\u3064\u3064\u3001\u6b21\u306e\u30da\u30fc\u30b8\u306b\u884c\u3063\u3066\u3001<br \/>\n<a href=\"https:\/\/github.com\/settings\/tokens\">https:\/\/github.com\/settings\/tokens<\/a><\/div>\n<div class=\"p3\">\n[Generate new token]\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5165\u624b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<p>\u56e0\u307f\u306b\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u6b8b\u308a\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>$ curl -i -H &#8220;Authorization: token 12345678901234567890123456789012&#8221; https:\/\/api.github.com\/users\/whatever<br \/>\nHTTP\/1.1 200 OK<br \/>\nServer: GitHub.com<br \/>\nDate: Sat, 06 Jun 2015 12:35:33 GMT<br \/>\nContent-Type: application\/json; charset=utf-8<br \/>\nContent-Length: 1096<br \/>\nStatus: 200 OK<br \/>\nX-RateLimit-Limit: 5000<br \/>\nX-RateLimit-Remaining: 4843<br \/>\nX-RateLimit-Reset: 1433596872<br \/>\n&#8230;<\/p>\n<div>\n<div>\n5000\u56de\u3060\u3063\u3066\u3002<\/p>\n<div class=\"p1\">\n<br \/>\n\u307e\u3001\u53d6\u5f97\u3057\u305f\u30c8\u30fc\u30af\u30f3\u3092\u5165\u529b\u3057\u3066\u7d9a\u3051\u308c\u3070\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<\/p>\n<p>$ composer create-project yiisoft\/yii2-app-basic basic 2.0.4<br \/>\nInstalling yiisoft\/yii2-app-basic (2.0.4)<br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-app-basic (2.0.4)<br \/>\n&nbsp; &nbsp; Loading from cache<br \/>\nCreated project in basic<br \/>\nLoading composer repositories with package information<br \/>\nInstalling dependencies (including require-dev)<br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-composer (2.0.3) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &nbsp; Loading from cache<br \/>\n&nbsp; &#8211; Installing ezyang\/htmlpurifier (v4.6.0)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing cebe\/markdown (1.1.0)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/jquery (2.1.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/jquery.inputmask (3.1.63)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/punycode (v1.3.2)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/yii2-pjax (v2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2 (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing swiftmailer\/swiftmailer (v5.4.0)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-swiftmailer (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-codeception (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/bootstrap (v3.3.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-bootstrap (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-debug (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing bower-asset\/typeahead.js (v0.10.5)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing phpspec\/php-diff (v1.0.2)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-gii (2.0.4)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing fzaninotto\/faker (v1.5.0)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\n&nbsp; &#8211; Installing yiisoft\/yii2-faker (2.0.3)<br \/>\n&nbsp; &nbsp; Downloading: 100% &nbsp; &nbsp; &nbsp; <br \/>\nfzaninotto\/faker suggests installing ext-intl (*)<br \/>\nWriting lock file<br \/>\nGenerating autoload files<br \/>\nchmod(&#8216;runtime&#8217;, 0777)&#8230;done.<br \/>\nchmod(&#8216;web\/assets&#8217;, 0777)&#8230;done.<br \/>\nchmod(&#8216;yii&#8217;, 0755)&#8230;done.<br \/>\n\u3067\uff1f<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305a\u306f\u3001\u300c\u306f\u3058\u3081\u306b\uff1a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u53c2\u8003\u306b\u3001\u6b21\u306e\u30da\u30fc\u30b8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002 http:\/\/www.yiiframework.com\/ \u3068\u601d\u3063\u305f\u3089\u3001Composer\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u3082\u3002 \u6700\u8fd1\u3001\u4f7f\u3046\u6a5f\u4f1a\u304c\u591a\u3044\u304c\u3001Mac O [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1077,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[130],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-130"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media\/1077"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}