{"id":178859,"date":"2013-05-06T12:44:04","date_gmt":"2013-05-06T08:44:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=178859"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=178859","title":{"rendered":"<span class=\"post_title\">PHP NameSpace \u2014 \u043a\u0430\u043a \u0436\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0435\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c?<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\tPHP, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 5.3, \u043f\u043e\u0434\u0430\u0440\u0438\u043b \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u0438\u0434\u0435\u0442 \u0433\u0434\u0435-\u0442\u043e \u0432\u044f\u043b\u043e\u0435, \u0430 \u0433\u0434\u0435-\u0442\u043e \u0431\u0443\u0440\u043d\u043e\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<br \/>   \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Symphony, Laravel, \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 Zend \u0432\u0437\u044f\u043b\u0438 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435.<br \/>   \u0412\u0441\u0435 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u0432\u043f\u0438\u0441\u0430\u043b\u043e\u0441\u044c \u0432 \u0441\u0445\u0435\u043c\u0443 MVC. \u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u0430, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u0435\u0447\u043d\u0430\u044f, \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044f, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0431\u0440\u0430\u0447\u043d\u0430\u044f \u043f\u0430\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u041c\u043e\u0434\u0435\u043b\u044c \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440?<br \/>   \u041e\u0434\u043d\u0438 \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u043b\u0441\u0442\u043e\u0439 \u0438 \u043f\u0440\u0438 \u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0439\u043d\u044b\u0439 \u0438 \u0442\u043e\u043d\u043a\u0438\u0439 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u041e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u2014 \u043c\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442.<br \/>   \u0414\u0440\u0443\u0433\u0438\u0435, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0441\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u043f\u043e\u0432\u0435\u043b\u0435\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0443\u043f\u0438\u0442\u0430\u043d\u043d\u044b\u0439. \u0418 \u043f\u0440\u0438 \u043d\u0435\u043c \u0445\u0443\u0434\u0435\u043d\u044c\u043a\u0430\u044f, \u0441\u0442\u0440\u043e\u0439\u043d\u0435\u043d\u044c\u043a\u0430\u044f \u041c\u043e\u0434\u0435\u043b\u044c, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u043e\u0434\u0430\u0439-\u043f\u0440\u0438\u043d\u0435\u0441\u0438. \u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u043f\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442.<br \/>   \u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432 \u0441\u0445\u0435\u043c\u0435 MVC? \u041f\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442 \u0438\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442?<br \/>   \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044d\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0435\u043c\u043e\u043a\u0440\u0430\u0442\u0438\u0438. \u0418 \u043f\u0443\u0441\u0442\u044c Namespace \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0430\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u0441\u0442\u044b\u0435, \u043d\u0435\u0443\u043a\u043b\u044e\u0436\u0438\u0435 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u0441\u043b\u043e\u043d \u0432 \u043f\u043e\u0441\u0443\u0434\u043d\u043e\u0439 \u043b\u0430\u0432\u043a\u0435, \u043f\u043e \u043d\u0435\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>   \u041d\u0430\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0442\u043e\u043b\u0441\u0442\u044b\u0435 \u041c\u043e\u0434\u0435\u043b\u0438. \u041d\u0443 \u0430 \u043a\u043e\u043c\u0443 \u043e\u043d\u0438 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f? \u041e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b \u043f\u043e\u0434\u0438\u0443\u043c\u0430!<br \/>   \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Namespace, \u043a\u0430\u043a \u0441 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0441\u0432\u0430\u0442\u044c\u0435\u0439, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u043d\u0443\u044e \u0441\u0435\u043c\u044c\u044e.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u0430\u0440\u043a\u0430\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0430\u043a \u044d\u0442\u043e \u043d\u0438 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u043e\u0433.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/img521.imageshack.us\/img521\/6826\/treea.jpg\" alt=\"image\"\/><\/p>\n<p>  \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0433\u0434\u0435:   <\/p>\n<ul>\n<li>Blog \u2014 \u044d\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li> Views \u0438 Templates \u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432;<\/li>\n<li> Utility \u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0431\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a;<\/li>\n<li> index.php \u2014 bootstrap \u0441\u043a\u0440\u0438\u043f\u0442;<\/li>\n<li> Post \u2014 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c\u0441\u044f \u0441\u0435\u043c\u0435\u0439\u043d\u0430\u044f \u0438\u0434\u0438\u043b\u043b\u0438\u044f \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u041c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<\/ul>\n<p>  \u0421 index.php \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e:  <\/p>\n<pre><code class=\"php\">&lt;?php use Blog\\Blog as Blog; \/*  *   main application  *\/  define (&quot;APP_PATH&quot;, &quot;\/home\/oleg\/www\/viper.dev\/&quot;); define (&quot;VIEW_PATH&quot;, &quot;\/home\/oleg\/www\/viper.dev\/Blog\/Views\/&quot;);  spl_autoload_register(function ($class) {       require_once str_replace('\\\\', '\/', $class). '.php';        });  $blog = new Blog();  $blog-&gt;run();  \/*  * end of index.php  *\/ <\/code><\/pre>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a.<br \/>   \u0410\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0430\u043f\u043e\u043a \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0438\u043c\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0441\u0441 Blog\\Post\\Services\\View \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u044b\u0441\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 Blog\/Post\/Services.<br \/>  \u0410 \u0432\u043e\u0442 \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u0441 Namespace.<br \/>   \u041f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 index.php \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Blog, \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 Blog\/Blog.php.<br \/>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<pre><code class=\"php\">&lt;?php namespace Blog; use Blog\\Post\\Post as Post;  class Blog   {     public $post;      public function __construct()     {         $this-&gt;post = new Post();     }      public function run()      {         $this-&gt;post-&gt;view-&gt;all();     }  }\/\/end class Blog <\/code><\/pre>\n<p>   \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 Blog \u043c\u044b \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441 Post \u0441 Namespace Blog\\Post \u0438 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0435\u0433\u043e \u0438\u0437 Blog\/Post\/Post.php.<br \/>   \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c,  <\/p>\n<pre><code class=\"php\">&lt;?php namespace Blog\\Post; use Blog\\Post\\Services\\View as View;  class Post   {      public $view;       public function __construct()       {          $this-&gt;view = new View();       } }\/\/end class Post <\/code><\/pre>\n<p>  \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c Post \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f: <br \/>   \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 Blog\\Post\\Entities\\PostEntity.php  <\/p>\n<pre><code class=\"php\">&lt;?php namespace Blog\\Post\\Entities;  class PostEntity {      public $id;      public $title;      public $body; }\/\/end class <\/code><\/pre>\n<p>   \u2014 \u0441\u043b\u0443\u0436\u0431\u044b, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u2014 Blog\\Post\\Services\\View.php (\u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u043b\u0443\u0436\u0431, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430)  <\/p>\n<pre><code class=\"php\">&lt;?php namespace Blog\\Post\\Services; use Blog\\Utility\\Contemplate as Contemplate; use Blog\\Post\\Repositories\\Db as DB;  class View   {    public $db;    public function __construct()   {        $this-&gt;db = new DB();   }\/\/end __construct    public function all()     {         $posts = $this-&gt;db-&gt;survey(); \tContemplate::compose(array(          'header' =&gt; 'header',          'main' =&gt; 'main',          'footer' =&gt; 'footer',          ),          array(          'posts' =&gt; $posts,          'title'  =&gt; 'Viper site',          ));   } }\/\/end class PostView <\/code><\/pre>\n<p>   \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 Blog\\Post\\Repositories\\DB.php \u2014 \u0432\u043e\u0442 \u043e\u043d\u0430, \u043d\u0430\u0448\u0430 \u0442\u043e\u043d\u043a\u0430\u044f, \u0438\u0437\u044f\u0449\u043d\u0430\u044f \u041c\u043e\u0434\u0435\u043b\u044c,<br \/>   \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0430\u0439-\u043f\u0440\u0438\u043d\u0435\u0441\u0438, \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435!  <\/p>\n<pre><code class=\"php\">&lt;?php namespace Blog\\Post\\Repositories; use PDO as PDO;  class DB   {     private $dbh;      public function __construct()      {         $user = 'user';         $pass = 'parole';         try          {              $this-&gt;dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(                 PDO::ATTR_PERSISTENT =&gt; true ));         } catch (PDOException $e) {               echo &quot;Error!: &quot; . $e-&gt;getMessage() . &quot;&lt;br\/&gt;&quot;;               die();         }     }\/\/end __construct    public function survey()   {     $query_view = $this-&gt;dbh-&gt;prepare('SELECT * from posts');     $query_view-&gt;execute();     return $query_view-&gt;fetchAll(PDO::FETCH_CLASS, &quot;Blog\\Post\\Entities\\PostEntity&quot;);   }\/\/end survey  }\/\/end class Db <\/code><\/pre>\n<p>   \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0443 \u043d\u0430\u0441 \u0442\u043e\u043d\u043a\u0438\u0439 \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0449\u043d\u044b\u0439. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0434 \u0441\u0442\u0430\u0442\u044c \u0435\u043c\u0443. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u043c\u044c\u044f!<br \/>   \u0418 \u0432\u0441\u0435 \u0431\u0430\u0433\u043e\u0434\u0430\u0440\u044f Namespace.<\/p>\n<p>  \u041d\u0435 \u0441\u043f\u043e\u0440\u044e, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0443\u0434\u043e\u0431\u0435\u043d \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u041d\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, Namespace \u0432\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442?<br \/>   \u0427\u0435\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b, \u0441\u0442\u0440\u043e\u0433\u0430\u044f, \u0438 \u0432 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u0438\u0431\u043a\u0430\u044f, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<br \/>   \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u0440\u043e\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0435\u0441\u043e\u043c\u043e\u0433\u043e \u0434\u043e\u0432\u0435\u0441\u043a\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u0442\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<br \/>   \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u043a\u0440\u0443\u0441\u0442\u043e\u0432\u0430 \u043b\u043e\u0436\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u0432\u0435\u044f\u043d\u0430 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 Taylor Otwell, \u0430\u0432\u0442\u043e\u0440\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Laravel, \u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<br \/>  \u0410\u0434\u0440\u0435\u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 GitHub:<a href=\"https:\/\/github.com\/oleg578\/PHPNamespaceModel\"> https:\/\/github.com\/oleg578\/PHPNamespaceModel<\/a> \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/178859\/\"> http:\/\/habrahabr.ru\/post\/178859\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\tPHP, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 5.3, \u043f\u043e\u0434\u0430\u0440\u0438\u043b \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u0438\u0434\u0435\u0442 \u0433\u0434\u0435-\u0442\u043e \u0432\u044f\u043b\u043e\u0435, \u0430 \u0433\u0434\u0435-\u0442\u043e \u0431\u0443\u0440\u043d\u043e\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<br \/>   \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Symphony, Laravel, \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 Zend \u0432\u0437\u044f\u043b\u0438 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435.<br \/>   \u0412\u0441\u0435 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u0432\u043f\u0438\u0441\u0430\u043b\u043e\u0441\u044c \u0432 \u0441\u0445\u0435\u043c\u0443 MVC. \u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u0430, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u0435\u0447\u043d\u0430\u044f, \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044f, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0431\u0440\u0430\u0447\u043d\u0430\u044f \u043f\u0430\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u041c\u043e\u0434\u0435\u043b\u044c \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440?<br \/>   \u041e\u0434\u043d\u0438 \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u043b\u0441\u0442\u043e\u0439 \u0438 \u043f\u0440\u0438 \u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0439\u043d\u044b\u0439 \u0438 \u0442\u043e\u043d\u043a\u0438\u0439 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u041e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u2014 \u043c\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442.<br \/>   \u0414\u0440\u0443\u0433\u0438\u0435, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0441\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u043f\u043e\u0432\u0435\u043b\u0435\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0443\u043f\u0438\u0442\u0430\u043d\u043d\u044b\u0439. \u0418 \u043f\u0440\u0438 \u043d\u0435\u043c \u0445\u0443\u0434\u0435\u043d\u044c\u043a\u0430\u044f, \u0441\u0442\u0440\u043e\u0439\u043d\u0435\u043d\u044c\u043a\u0430\u044f \u041c\u043e\u0434\u0435\u043b\u044c, \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u043e\u0434\u0430\u0439-\u043f\u0440\u0438\u043d\u0435\u0441\u0438. \u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u043f\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442.<br \/>   \u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432 \u0441\u0445\u0435\u043c\u0435 MVC? \u041f\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442 \u0438\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0430\u0440\u0445\u0430\u0442?<br \/>   \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044d\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0435\u043c\u043e\u043a\u0440\u0430\u0442\u0438\u0438. \u0418 \u043f\u0443\u0441\u0442\u044c Namespace \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<\/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-178859","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/178859","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=178859"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/178859\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}