{"id":271975,"date":"2016-01-12T13:27:02","date_gmt":"2016-01-12T10:27:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=271975"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=271975","title":{"rendered":"\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 phar \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Box"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2df\/b9b\/759\/2dfb9b7599e94f9ba15455c55ff50c87.jpg\" align=\"left\"\/><\/p>\n<p>  <code>Phar<\/code> \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 <code>jar<\/code> \u0438\u0437 \u043c\u0438\u0440\u0430 Java, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a PHP. <code>Phar<\/code> \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 phar \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">Phar archives are best characterized as a convenient way to group several files into a single file. As such, a phar archive provides a way to distribute a complete PHP application in a single file and run it from that file without the need to extract it to disk. Additionally, phar archives can be executed by PHP as easily as any other file, both on the commandline and from a web server. Phar is kind of like a thumb drive for PHP applications.  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f phar \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 PHP \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"http:\/\/php.net\/manual\/en\/book.phar.php\">\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u0441\u0442\u044b\u0439 API<\/a>, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/box-project\/box2\">Box<\/a>.<br \/>  <a name=\"format-json-faila\"><\/a><br \/>  <a href=\"#format-json-faila\"><\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430\u0442 JSON \u0444\u0430\u0439\u043b\u0430<\/h2>\n<p><\/a><br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 Box \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f phar \u0444\u0430\u0439\u043b\u0430 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435. <\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<pre><code>{     &quot;files&quot;: [&quot;src\/Put.php&quot;],     &quot;main&quot;: &quot;bin\/main&quot;,     &quot;output&quot;: &quot;example.phar&quot;,     &quot;stub&quot;: true }<\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0433\u0434\u0435 <\/p>\n<p>  <code>files<\/code> \u2014 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 phar<\/p>\n<p>  <code>main<\/code> \u2014 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 phar \u0444\u0430\u0439\u043b\u0430<\/p>\n<p>  <code>output<\/code> \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e <code>phar<\/code> \u0444\u0430\u0439\u043b\u0430<\/p>\n<p>  <code>stub<\/code> \u2014 \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>true<\/code><\/p>\n<p>  <a href=\"https:\/\/github.com\/box-project\/box2-example\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f phar-\u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <\/p>\n<p>  <a href=\"https:\/\/github.com\/box-project\/box2\/blob\/2.0\/res\/schema.json\">\u0417\u0434\u0435\u0441\u044c<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>box.json<\/code> \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c phar-\u0444\u0430\u0439\u043b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c <a href=\"https:\/\/github.com\/dlevsha\/nasgrate\/\">\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 Nasgrate<\/a>. \u00ab\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u00bb \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438\u0437 GitHub, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 Composer. \u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u044f \u043f\u0440\u043e PHP.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <code>box.json<\/code> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<pre><code>{   &quot;chmod&quot;: &quot;0755&quot;,   &quot;directories&quot;: [&quot;src&quot;,&quot;app&quot;],   &quot;files&quot;: [&quot;README.md&quot;],   &quot;main&quot;: &quot;bin\/nasgrate&quot;,   &quot;output&quot;: &quot;nasgrate.phar&quot;,   &quot;stub&quot;: true }<\/code><\/pre>\n<p>  <code>directories<\/code> \u2014 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <code>src<\/code> \u0438 <code>app<\/code>). <\/p>\n<p>  <code>files<\/code> \u2014 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0438\u0445 \u0437\u0434\u0435\u0441\u044c. <\/p>\n<p>  \u041c\u044b \u0431\u044b \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c box.json \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<pre><code>{   &quot;chmod&quot;: &quot;0755&quot;,   &quot;directories&quot;: [&quot;src&quot;],   &quot;files&quot;: [&quot;app\/console.php&quot;, &quot;app\/index.php&quot;, &quot;README.md&quot;],   &quot;main&quot;: &quot;bin\/nasgrate&quot;,   &quot;output&quot;: &quot;nasgrate.phar&quot;,   &quot;stub&quot;: true }<\/code><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0432\u0430\u0440\u0438\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u0431\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438\u0441\u044c \u0431\u044b \u0432 \u043f\u0430\u043f\u043a\u0435 <code>vendors<\/code>, \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u044d\u0442\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b. \u0422\u043e\u0433\u0434\u0430 \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0431\u044b \u0442\u0430\u043a <\/p>\n<pre><code>{   &quot;chmod&quot;: &quot;0755&quot;,   &quot;directories&quot;: [&quot;src&quot;],   &quot;files&quot;: [&quot;app\/console.php&quot;, &quot;app\/index.php&quot;, &quot;README.md&quot;],   &quot;finder&quot;: [     {       &quot;name&quot;: &quot;*.php&quot;,       &quot;exclude&quot;: [         &quot;tests&quot;,         &quot;test&quot;       ],       &quot;in&quot;: &quot;vendor&quot;     }   ],     &quot;main&quot;: &quot;bin\/nasgrate&quot;,   &quot;output&quot;: &quot;nasgrate.phar&quot;,   &quot;stub&quot;: true }<\/code><\/pre>\n<p>  \u0441\u0435\u043a\u0446\u0438\u044f <code>finder<\/code> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442: \u201c\u0432\u043a\u043b\u044e\u0447\u0438 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <code>*.php<\/code> \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u0440\u0438\u0438 <code>vendor<\/code> \u043a\u0440\u043e\u043c\u0435 \u043f\u0430\u043f\u043e\u043a <code>tests<\/code> \u0438 <code>test<\/code>\u201c. <\/p>\n<p>  <code>chmod<\/code> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 <code>phar<\/code> \u0444\u0430\u0439\u043b. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043c <code>0755<\/code> \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u043c\u0435\u0442\u0440\u044b \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u044b\u0448\u0435. <br \/>  <a name=\"ustanovka-box\"><\/a><br \/>  <a href=\"#ustanovka-box\"><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Box<\/h2>\n<p><\/a><br \/>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439) \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <\/p>\n<pre><code>$ curl -LSs https:\/\/box-project.github.io\/box2\/installer.php | php<\/code><\/pre>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f <code>box.phar<\/code>. <\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a <code>php box.phar<\/code>, \u043b\u0438\u0431\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>chmod 755 box.phar<\/code>, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432 box <code>mv box.phar box<\/code> \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 <code>\/usr\/local\/bin<\/code>. \u0422\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a <code>box<\/code>.<\/p>\n<p>  \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 Composer <\/p>\n<pre><code>$ composer global require kherge\/box --prefer-source<\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <\/p>\n<pre><code>{     &quot;require-dev&quot;: {         &quot;kherge\/box&quot;: &quot;~2.5&quot;     } }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <\/p>\n<pre><code>$ box -v<\/code><\/pre>\n<p>  \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u043c <code>php.ini<\/code> \u0444\u0430\u0439\u043b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>phar.readonly<\/code> \u0441\u0442\u043e\u0438\u0442 \u0432 <code>0<\/code>, <code>Off<\/code> \u0438\u043b\u0438 <code>false<\/code>.<\/p>\n<p>  \u0423\u0437\u043d\u0430\u0435\u043c \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0448 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438 (\u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 phpinfo(); \u0447\u0435\u0440\u0435\u0437 Apache, \u043e\u043d \u0432\u0430\u043c \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 php.ini):<\/p>\n<pre><code>$ php -i | grep php.ini &gt;&gt; Configuration File (php.ini) Path =&gt; \/usr\/local\/php5\/lib &gt;&gt; Loaded Configuration File =&gt; \/usr\/local\/php5\/lib\/php.ini<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>phar.readonly<\/code> \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 <code>Off<\/code>.<\/p>\n<pre><code>[Phar] ; http:\/\/php.net\/phar.readonly phar.readonly = Off<\/code><\/pre>\n<p><a name=\"kompiliatsiia-proiekta\"><\/a><br \/>  <a href=\"#kompiliatsiia-proiekta\"><\/p>\n<h2>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p><\/a><br \/>  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c (\u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0448 <code>box.json<\/code>) \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e<\/p>\n<pre><code>$ box build -v<\/code><\/pre>\n<p>  \u0424\u043b\u0430\u0433 <code>-v<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\"> Removing previously built Phar... * Building... ? Output path: \/Users\/dlevsha\/Sites\/nasgrate\/nasgrate.phar ? Adding directories...   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/config.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Base\/Dump.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Base\/Generator.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Base\/Helper.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Base\/Migration.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Mysql\/Dump.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Mysql\/Generator.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Driver\/Mysql\/Helper.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Process\/Base.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Process\/Console.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Process\/Server.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/template.sql   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Util\/Console.php   + \/Users\/dlevsha\/Sites\/nasgrate\/src\/Util\/Db.php   + \/Users\/dlevsha\/Sites\/nasgrate\/app\/console.php   + \/Users\/dlevsha\/Sites\/nasgrate\/app\/index.php ? Adding files...   + \/Users\/dlevsha\/Sites\/nasgrate\/README.md ? Adding main file: \/Users\/dlevsha\/Sites\/nasgrate\/bin\/nasgrate ? Generating new stub... ? Setting file permissions... * Done.<\/code><\/pre>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <code>nasgrate.phar<\/code>.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e <\/p>\n<pre><code>$ .\/nasgrate.phar<\/code><\/pre>\n<p>  \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <\/p>\n<pre><code class=\"bash\">Nasgrate is a console utility that let you organise database schema migration process at a consistent and easy way. It supports mysql, mssql, postgresql, oracle and other databases  Usage:   php nasgrate [command] [options]  Command:   status     - displays migration status   generate   - creates new migration (migration file)   up:show    - displays (but not executes) SQL-query, executed by migration update ...<\/code><\/pre>\n<p><a name=\"rabota-s-vnieshnimi-riesursami\"><\/a><br \/>  <a href=\"#rabota-s-vnieshnimi-riesursami\"><\/p>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438<\/h2>\n<p><\/a><br \/>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b <code>phar<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043e\u043d \u0438\u0449\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b <code>phar<\/code> \u0438 \u0434\u0435\u043b\u0430\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041d\u043e \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 <code>phar<\/code> \u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438. <\/p>\n<p>  \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Nasgrate \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <code>.environment<\/code>, \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a <code>..\/.environment<\/code>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 <code>phar<\/code> \u043d\u0435\u0442. <\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043c\u0430\u043f\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0439\u043b \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e <code>phar<\/code> \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"php\">Phar::mount('phar:\/\/.environment', '\/etc\/nasgrate\/.environment');<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430. <\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f <code>phar<\/code> \u0444\u0430\u0439\u043b\u0430. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">define(DIR_RUN, dirname(Phar::running(false)));<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Phar::mount \u0441\u043c\u0430\u043f\u0438\u0442\u0435 \u0435\u0433\u043e \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e <code>phar<\/code> \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435, \u0447\u0442\u043e \u0438 \u0441\u0430\u043c <code>phar<\/code><\/p>\n<pre><code class=\"php\">define(DIR_RUN, dirname(Phar::running(false))); Phar::mount('phar:\/\/.environment', DIR_RUN.'\/.environment');<\/code><\/pre>\n<p>   \u0438 \u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043a \u043d\u0435\u043c\u0443 \u043a\u0430\u043a \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443, \u043b\u0438\u0431\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438. <\/p>\n<p>  \u0415\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435, \u043d\u0435 \u0437\u043d\u0430\u044e \u0431\u0430\u0433 \u044d\u0442\u043e \u0438\u043b\u0438 \u0444\u0438\u0447\u0430, \u043d\u043e \u0432\u0441\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 <code>Phar::mount<\/code> \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 readonly \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u044f\u0441\u043d\u043e. \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043f\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442. <\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043d\u043e \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. Phar \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043a \u0441\u0430\u043c\u043e\u043c\u0443 php, \u0435\u0433\u043e \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u0442.\u0434. \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 php, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 PDO \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0438\u0437 PECL, \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 php, \u0432\u0430\u0448 phar \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0440\u0435\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 traits \u0438\u0437 PHP 5.4, \u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u043e\u0438\u0442 5.3 \u2014 \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. <\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438 \u043f\u043e \u0442\u0435\u043c\u0435:<\/p>\n<ul>\n<li><a href=\"http:\/\/php.net\/manual\/en\/book.phar.php\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/box-project\/box2\/\">\u041f\u0440\u043e\u0435\u043a\u0442 Box \u043d\u0430 GitHub<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/box-project\/box2\/blob\/2.0\/res\/schema.json\">\u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 box.json<\/a><\/li>\n<li><a href=\"https:\/\/gist.github.com\/GaryRogers\/735159ca0dd22621c638\">External config files with PHAR archives<\/a><\/li>\n<li><a href=\"https:\/\/mwop.net\/blog\/2015-12-14-secure-phar-automation.html\">Secure PHAR Automation<\/a><\/li>\n<li><a href=\"http:\/\/www.sitepoint.com\/boxing-apps-phars-quickly-easily-box\/\">Boxing up your Apps as Phars Quickly and Easily with Box<\/a><\/li>\n<li><a href=\"http:\/\/www.ibm.com\/developerworks\/ru\/library\/os-php-5.3new4\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u00abC\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 PHAR \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 IBM\u00bb<\/a>  <\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/274745\/\"> http:\/\/habrahabr.ru\/post\/274745\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2df\/b9b\/759\/2dfb9b7599e94f9ba15455c55ff50c87.jpg\" align=\"left\"\/><\/p>\n<p>  <code>Phar<\/code> \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 <code>jar<\/code> \u0438\u0437 \u043c\u0438\u0440\u0430 Java, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a PHP. <code>Phar<\/code> \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 phar \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">Phar archives are best characterized as a convenient way to group several files into a single file. As such, a phar archive provides a way to distribute a complete PHP application in a single file and run it from that file without the need to extract it to disk. Additionally, phar archives can be executed by PHP as easily as any other file, both on the commandline and from a web server. Phar is kind of like a thumb drive for PHP applications.  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f phar \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 PHP \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"http:\/\/php.net\/manual\/en\/book.phar.php\">\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u0441\u0442\u044b\u0439 API<\/a>, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/box-project\/box2\">Box<\/a>.<br \/>  <a name=\"format-json-faila\"><\/a><br \/>  <a href=\"#format-json-faila\"><\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430\u0442 JSON \u0444\u0430\u0439\u043b\u0430<\/h2>\n<p><\/a><br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 Box \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f phar \u0444\u0430\u0439\u043b\u0430 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435. <\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<pre><code>{     &quot;files&quot;: [&quot;src\/Put.php&quot;],     &quot;main&quot;: &quot;bin\/main&quot;,     &quot;output&quot;: &quot;example.phar&quot;,     &quot;stub&quot;: true }<\/code><\/pre>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-271975","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=271975"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271975\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=271975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=271975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}