Source for file p3p.php

Documentation is available at p3p.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Plugin
  4.  * @subpackage  System.p3p
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Joomla! P3P Header Plugin
  14.  *
  15.  * @package     Joomla.Plugin
  16.  * @subpackage  System.p3p
  17.  * @since       1.6
  18.  */
  19. class PlgSystemP3p extends JPlugin
  20. {
  21.     /*
  22.      * @since   1.6
  23.      */
  24.     public function onAfterInitialise()
  25.     {
  26.         // Get the header
  27.         $header $this->params->get('header''NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM');
  28.         $header trim($header);
  29.         // Bail out on empty header (why would anyone do that?!)
  30.         if empty($header) )
  31.         {
  32.             return;
  33.         }
  34.         // Replace any existing P3P headers in the response
  35.         JFactory::getApplication()->setHeader('P3P''CP="'.$header.'"'true);
  36.     }
  37. }

Documentation generated on Tue, 19 Nov 2013 15:10:00 +0100 by phpDocumentor 1.4.3