"Fossies" - the Fresh Open Source Software Archive

Member "papayacms-core-6.12.5/src/system/Papaya/Plugin/PageModule/Aggregation.php" (7 Jul 2020, 1587 Bytes) of package /linux/www/papayacms-core-6.12.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Aggregation.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 /**
    3  * papaya CMS
    4  *
    5  * @copyright 2000-2019 by papayaCMS project - All rights reserved.
    6  * @link http://www.papaya-cms.com/
    7  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, version 2
    8  *
    9  *  You can redistribute and/or modify this script under the terms of the GNU General Public
   10  *  License (GPL) version 2, provided that the copyright and license notes, including these
   11  *  lines, remain unmodified. papaya is distributed in the hope that it will be useful, but
   12  *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   13  *  FOR A PARTICULAR PURPOSE.
   14  */
   15 namespace Papaya\Plugin\PageModule {
   16 
   17   use Papaya\UI\Content\Page;
   18 
   19   /**
   20    * This a standard implementation for content/data filters usage in a plugin.
   21    *
   22    * It provides access to a filters() methods that returns a \Papaya\Plugin\Filter\Content
   23    * instance.
   24    *
   25    * To use the filters call prepare()/applyTo()/appendTo() in the
   26    * your \Papaya\Plugin\Appendable::appendTo() method.
   27    *
   28    * @package Papaya-Library
   29    * @subpackage Plugins
   30    */
   31   trait Aggregation {
   32 
   33     /**
   34      * @var \base_topic|Page
   35      */
   36     private $_page;
   37 
   38     /**
   39      * @param $page
   40      */
   41     public function __construct($page) {
   42       $this->_page = $page;
   43     }
   44 
   45     /**
   46      * Page modules get the page object as their constructor argument.
   47      * This implementation expects that it was stored in the private
   48      * field $_page.
   49      *
   50      * @return \base_topic|Page
   51      */
   52     public function getPage() {
   53       return $this->_page;
   54     }
   55   }
   56 }