| | 109 | /** |
| | 110 | * We've fetched a page on our own using aPageTable::queryWithSlots and we want |
| | 111 | * to make Apostrophe aware of it so that areas on the current page that live on |
| | 112 | * that virtual page don't generate a superfluous second query |
| | 113 | * |
| | 114 | * @param array, Doctrine_Collection, aPage $pages |
| | 115 | */ |
| | 116 | static public function cacheVirtualPages($pages) |
| | 117 | { |
| | 118 | if(get_class($pages) == 'Doctrine_Collection' || is_array($pages)) |
| | 119 | { |
| | 120 | foreach($pages as $page) |
| | 121 | { |
| | 122 | self::$globalCache[$page['slug']] = $page; |
| | 123 | } |
| | 124 | } |
| | 125 | else |
| | 126 | { |
| | 127 | self::$globalCache[$pages['slug']] = $pages; |
| | 128 | } |
| | 129 | } |
| | 130 | |