{"id":214833,"date":"2014-03-06T12:45:03","date_gmt":"2014-03-06T08:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=214833"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=214833","title":{"rendered":"<span class=\"post_title\">\u0427\u0442\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0443 gamedev-\u0430 \u0441 \u043a\u043e\u0441\u043c\u043e\u043d\u0430\u0432\u0442\u0438\u043a\u043e\u0439?<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/dda\/51d\/110\/dda51d110a82b20b84c2422660fd1fa4.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.<\/p>\n<p>  \u0422\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u0432 \u0440\u0443\u043a\u0438 \u043f\u043e\u043f\u0430\u043b\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043d\u0438\u0436\u043a\u0430 <a href=\"http:\/\/www.amazon.com\/Pro-PHP-Patterns-Frameworks-Testing\/dp\/1590598199\">Pro PHP<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c. \u0414\u0430, \u044f \u0437\u043d\u0430\u044e \u0447\u0442\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0443\u0436\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c (\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435 \u0440\u0430\u0437), \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442.\u043a. \u0431\u041e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u0432\u044b\u0448\u0443\u0435\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043e\u0440\u0432\u0430\u043d\u044b \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418 \u0442\u0430\u043a \u2014 \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u0440\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0448\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0427\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0437\u0430 \u0437\u0432\u0435\u0440\u044c \u0442\u0430\u043a\u043e\u0439 \u2014 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440?<\/h4>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u0445\u043e\u0434 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 php \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/www.php.net\/manual\/ru\/class.iterator.php\">Iterator<\/a>, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430. \u0412 SPL (<a href=\"http:\/\/php.net\/spl\">Standart PHP Library<\/a>) \u0442\u0430\u043a \u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0418\u0445 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/www.php.net\/manual\/ru\/spl.iterators.php\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h4>\u0422\u0430\u043a \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u0442\u043e\u0433\u0434\u0430 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u2014 \u043c\u043e\u0436\u043d\u043e \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h4>\n<p>  \u0412 php \u043a\u0430\u043a-\u0442\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u00bb \u0432 \u043c\u0430\u0441\u0441\u0438\u0432, \u044d\u043b\u0435\u043c\u0435\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u0439 \u0443 \u0412\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 9 \u0440\u0430\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0443). \u0418 \u0412\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0435, \u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p>  \u0422\u0430\u043a \u0432\u043e\u0442 \u2014 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0412\u043c\u0435\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445 \u0432 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0438 \u043f\u043e\u0442\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0445 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u0430\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"php\">\/**  * @link https:\/\/bitbucket.org\/t1gor\/strategy\/src\/242e58cdcd60c61d02ae26d420da9d415117cb0d\/application\/model\/map\/MapTileNeighboursIterator.php?at=default  *\/ class TileIterator implements Iterator {     private $_side = 'north_west';     private $_neighbours = array();     private $_isValid = true;      public function __construct($neighboursArray)     {         $this-&gt;_side = 'north_west';         $this-&gt;_neighbours = $neighboursArray;     }      \/**      * @return void      *\/     function rewind() {         $this-&gt;_side = 'north_west';     }      \/**      * @return MapTile      *\/     function current() {         return $this-&gt;_neighbours[$this-&gt;_side];     }      \/**      * @return string      *\/     function key() {         return $this-&gt;_side;     }      \/**      * Loop through neighbours clock-wise      *      * @return void      *\/     function next()     {         switch ($this-&gt;_side)         {             case 'north_west':                 $this-&gt;_side = 'north';             break;              case 'north':                 $this-&gt;_side = 'north_east';             break;              case 'north_east':                 $this-&gt;_side = 'east';             break;              case 'east':                 $this-&gt;_side = 'south_east';             break;              case 'south_east':                 $this-&gt;_side = 'south';             break;              case 'south':                 $this-&gt;_side = 'south_west';             break;              case 'south_west':                 $this-&gt;_side = 'west';             break;              \/\/ this is the end of a circle             case 'west':                 $this-&gt;_isValid = false;             break;         }     }      function valid() {         return $this-&gt;_isValid;     } }  <\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0437\u043e\u0432:  <\/p>\n<pre><code class=\"php\">\/\/ \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c, \u0442.\u043a. \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440 $tilesStmt = PDO::prepare(&quot;SELECT * FROM tiles ... LIMIT 9&quot;); $tilesStmt-&gt;execute(); $tiles = new TileIterator($tilesStmt-&gt;fetchAll()); <\/code><\/pre>\n<p>  \u041d\u0443 \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435:  <\/p>\n<pre><code class=\"php\">foreach ($tiles as $tile) {     ... } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0414\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043b\u043e\u0445\u043e. \u0410 \u0447\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c?<\/h4>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p>  <a href=\"http:\/\/www.php.net\/manual\/ru\/class.limititerator.php\">LimitIterator<\/a> \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <a href=\"http:\/\/phpexcel.codeplex.com\/\">PHPExcel<\/a>, \u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0435 \u0441\u0442\u0440\u043e\u043a, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/github.com\/markushausammann\/PHPExcel\/blob\/master\/PHPExcel\/Worksheet\/RowIterator.php\">RowIterator<\/a>, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u044d\u0442\u043e Iterator. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u00ab\u0442\u0430\u0441\u043a\u0430\u0442\u044c\u00bb \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c <a href=\"https:\/\/github.com\/markushausammann\/PHPExcel\/blob\/master\/PHPExcel\/Worksheet\/RowIterator.php\">RowIterator<\/a> \u0432 <a href=\"http:\/\/www.php.net\/manual\/ru\/class.limititerator.php\">LimitIterator<\/a> \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u043c \u0441\u0442\u0440\u043e\u043a:<\/p>\n<pre><code class=\"php\">\/\/ \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 ... $inputFileType = PHPExcel_IOFactory::identify('example.xlsx'); $objReader = PHPExcel_IOFactory::createReader($inputFileType); $document = $objReader-&gt;load($inputFile); $sheet = $document-&gt;getSheet(0);  \/\/ ... \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 10 \u0441\u0442\u0440\u043e\u043a $dataForDebug = new LimitIterator($sheet-&gt;getRowIterator(), 0, 10); <\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 <a href=\"http:\/\/www.php.net\/manual\/ru\/class.filteriterator.php\">FilterIterator<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043b\u0435\u0442\u0443. \u0412 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0440\u043e\u0434\u0435 \u044d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 WHERE \u0447\u0430\u0441\u0442\u044c SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0412\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/sirprize\/basecamp\">BaseCamp Classic API<\/a>, SDK \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0412\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0418 \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e emial \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0410 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e 3-\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0440\u0442\u0430\u043c: email, ID \u0438 \u0438\u043c\u044f. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0448\u0443\u0435\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"php\">\/**  * @link http:\/\/ua2.php.net\/FilterIterator  *\/ class NotificationFilter extends FilterIterator {     \/**      * \u041c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0430      *\/     private $_skip;      \/**      * Build filter      *      * @param Iterator $iterator      * @param array    $filter  - \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0434\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c      * @throws InvalidArgumentException      *\/     public function __construct(Iterator $iterator, $filter)     {         if (!is_array($filter)) {             throw new InvalidArgumentException(&quot;Filter should be an array. &quot;.gettype($filter).&quot; given.&quot;);         }          parent::__construct($iterator);         $this-&gt;_skip = $filter;     }      \/**      * Check user data and make sure we can notify him\/her      *      * Filtering by 2 params:      *  - Does the user belong to your company (avoid spamming clients)?      *  - Should we skipp the user based on the user ID      *  - Should we skipp the user based on the user email      *      * @link http:\/\/php.net\/manual\/filteriterator.accept.php      * @link https:\/\/github.com\/sirprize\/basecamp\/blob\/master\/example\/basecamp\/person\/get-by-id      *      * @return bool      *\/     public function accept()     {         \/\/ get current user from the Iterator         $bcUser = $this-&gt;getInnerIterator()-&gt;current();          \/\/ check if skipped by ID         $skippedById = in_array($bcUser-&gt;getId(), $this-&gt;_skip['byID']);          \/\/ or by email         $skippedByEmail = in_array($bcUser-&gt;getEmailAddress(), $this-&gt;_skip['byEmail']);          \/\/ check that he\/she belongs to your company         $belongsToCompany = $yourCompanyBaseCampID === (int) $bcUser-&gt;getCompanyId()-&gt;__toString();          \/\/ notify only if belongs to your company and shouldn't be skipped         return $belongsToCompany && !$skippedById && !$skippedByEmail;     } } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 NotificationFilter::accept() \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<p>  \u0410 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e <a href=\"http:\/\/stackoverflow.com\/a\/1320259\/1847769\">\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043a \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/www.php.net\/manual\/ru\/class.recursiveiteratoriterator.php\">RecursiveIteratorIterator<\/a>, \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c <a href=\"http:\/\/www.php.net\/manual\/en\/class.recursivedirectoryiterator.php#97228\">\u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/www.php.net\/manual\/en\/class.recursivedirectoryiterator.php\">RecursiveDirectoryIterator<\/a> \u0438 \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e.<\/p>\n<h4>\u0410 \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0443\u0442 \u043a\u043e\u0441\u043c\u043e\u043d\u0430\u0432\u0442\u0438\u043a\u0430?<\/h4>\n<p>  \u0414\u0430, \u0447\u0443\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u043b. \u041f\u043e\u043a\u0430 \u044f \u00ab\u0438\u0433\u0440\u0430\u043b\u0441\u044f\u00bb \u0441 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0436\u0435 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u0434\u0435\u044f \u2014 \u043a\u0430\u043a \u0431\u044b \u043c\u043d\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0438 \u0432 \u0445\u0430\u0431\u0435 <a href=\"http:\/\/habrahabr.ru\/hub\/gdev\/\">GameDev<\/a> \u0438 \u0432 <a href=\"http:\/\/habrahabr.ru\/hub\/webdev\/\">\u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/a>? \u0412 \u043b\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u0445\u0430\u0431\u043e\u0432, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043e \u0447\u0435\u043c \u044f. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u043a \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432. <\/p>\n<p>  \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/bitbucket.org\/t1gor\/habraintersector\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 BitBucket<\/a>, \u0430 \u0437\u0434\u0435\u0441\u044c \u0436\u0435 \u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044e\u0443 \u0447\u0430\u0441\u0442\u044c. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"php\">\/**  * Basic post class  *\/ class HabraPost {      public $name = '';     public $url = '';     public $hubs = null;      public static $baseUrl = 'http:\/\/habrahabr.ru\/hub\/';      \/**      * Some hubs links      *\/     protected static $fullHubList = array(         'infosecurity' =&gt; '\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c',         'webdev' =&gt; '\u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430',         'gdev' =&gt; 'Game Development',         'DIY' =&gt; 'DIY \u0438\u043b\u0438 \u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c',         'pm' =&gt; '\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438',         'programming' =&gt; '\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435',         'space' =&gt; '\u041a\u043e\u0441\u043c\u043e\u043d\u0430\u0432\u0442\u0438\u043a\u0430',         'hardware' =&gt; '\u0416\u0435\u043b\u0435\u0437\u043e',         'algorithms' =&gt; '\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b',         'image_processing' =&gt; '\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439',     );      public function __construct($name, $url, $hubs = array())     {         $this-&gt;name = $name;         $this-&gt;url = $url;         $this-&gt;hubs = $hubs;     }      public static function getFullHubsList()     {         $list = self::$fullHubList;         asort($list);         return $list;     } }  \/**  * Post storage object  *  * @link http:\/\/php.net\/manual\/class.splobjectstorage.php  *\/ class PostsStorage {     private $_iterator;      public function __construct()     {         $this-&gt;_iterator = new SplObjectStorage();     }      \/**      * Add new post      *      * @param HabraPost $post      * @return void      *\/     public function save(HabraPost $post)     {         \/\/ reduce duplicates         if (!$this-&gt;_iterator-&gt;contains($post)) {             $this-&gt;_iterator-&gt;attach($post);         }     }      \/**      * Get internal iterator      *      * @return SplObjectStorage      *\/     public function getIterator()     {         return $this-&gt;_iterator;     } }  \/**  * Posts filtering class  *  * @link http:\/\/php.net\/manual\/class.filteriterator.php  *\/ class HabraPostFilter extends FilterIterator {     \/**      * Hubs to filter by      *\/     private $_filterByHubs = array();      public function __construct(Iterator $iterator, $filteringHubs)     {         parent::__construct($iterator);         $this-&gt;_filterByHubs = $filteringHubs;     }      \/**      * Accept      *      * @link   http:\/\/php.net\/manual\/filteriterator.accept.php      * @return bool      *\/     public function accept()     {         $object = $this-&gt;getInnerIterator()-&gt;current();         $aggregate = true;          foreach ($this-&gt;_filterByHubs as $filterHub) {             $aggregate = $aggregate && in_array($filterHub, $object-&gt;hubs);         }          return $aggregate;     } } <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a \u2014 \u0438\u0434\u0435\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430:  <\/p>\n<ol>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0431\u043e\u0432,<\/li>\n<li>\u041c\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0425\u0430\u0431\u0440\u0430 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442,<\/li>\n<li>\u0417\u0430\u0433\u043e\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 <code>PostsStorage<\/code>,<\/li>\n<li>\u0418 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>HabraPostFilter<\/code><\/li>\n<\/ol>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0443:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">GameDev + \u0412\u0435\u0431 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/009\/a21\/4b7\/009a214b76520dd2312d833e458fdd55.png\"\/><\/div>\n<\/div>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0445\u043e\u0441\u0442\u0438\u043d\u0433, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0425\u0430\u0431\u0440\u0430-\u044d\u0444\u0444\u0435\u043a\u0442.<\/p>\n<p>  \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  P.S. \u0421 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u0438\u043c\u0443 \u043f\u0440\u0430\u0432\u043a\u0438\/\u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u043e\u0441\u0442\u0443 \u0438\u043b\u0438 \u0432 \u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0435. \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\/214833\/\"> http:\/\/habrahabr.ru\/post\/214833\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/dda\/51d\/110\/dda51d110a82b20b84c2422660fd1fa4.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.<\/p>\n<p>  \u0422\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u0432 \u0440\u0443\u043a\u0438 \u043f\u043e\u043f\u0430\u043b\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043d\u0438\u0436\u043a\u0430 <a href=\"http:\/\/www.amazon.com\/Pro-PHP-Patterns-Frameworks-Testing\/dp\/1590598199\">Pro PHP<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c. \u0414\u0430, \u044f \u0437\u043d\u0430\u044e \u0447\u0442\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0443\u0436\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c (\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435 \u0440\u0430\u0437), \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442.\u043a. \u0431\u041e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u0432\u044b\u0448\u0443\u0435\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043e\u0440\u0432\u0430\u043d\u044b \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418 \u0442\u0430\u043a \u2014 \u0435\u0441\u043b\u0438 \u0412\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u0440\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0448\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\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-214833","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/214833","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=214833"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/214833\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=214833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=214833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=214833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}