"Fossies" - the Fresh Open Source Software Archive

Member "papayacms-core-6.9.4/src/system/Papaya/Plugin/Configurable/Context/Aggregation.php" (13 Dec 2019, 1673 Bytes) of package /linux/www/papayacms-core-6.9.4.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-2018 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\Configurable\Context;
   16 
   17 use Papaya\BaseObject;
   18 
   19 /**
   20  * This a standard implementation for a configurable plugin. It
   21  * add a configuration() getter/setter method to the plugin.
   22  *
   23  * It contains information from the output filter/configuration.
   24  *
   25  * @package Papaya-Library
   26  * @subpackage Plugins
   27  */
   28 trait Aggregation {
   29   /**
   30    * @var BaseObject\Parameters
   31    */
   32   private $_configuration;
   33 
   34   /**
   35    * The configuration is an {@see ArrayObject} containing options that can affect the
   36    * execution of other methods (like appendTo()).
   37    *
   38    * @see \Papaya\Plugin\Configurable::configuration()
   39    *
   40    * @param BaseObject\Parameters $configuration
   41    *
   42    * @return BaseObject\Parameters
   43    */
   44   public function configuration(BaseObject\Parameters $configuration = NULL) {
   45     if (NULL !== $configuration) {
   46       $this->_configuration = $configuration;
   47     } elseif (NULL === $this->_configuration) {
   48       $this->_configuration = new BaseObject\Parameters();
   49     }
   50     return $this->_configuration;
   51   }
   52 }