Exemple #1
0
 /**
  * Initialize flavors and the rules associated with them.
  */
 public function initFlavors()
 {
     if (!isset(self::$flavors)) {
         self::$flavors = array();
         $default_flavor_config = array('order' => 'allow,deny', 'deny' => 'fb:profile-action,fb:mobile');
         self::$flavors['sidebar'] =& $default_flavor_config;
         self::$flavors['menu'] =& $default_flavor_config;
         self::$flavors['canvas'] =& $default_flavor_config;
         self::$flavors['wide'] =& $default_flavor_config;
         self::$flavors['narrow'] =& $default_flavor_config;
         self::$flavors['mobile-content'] =& $default_flavor_config;
         self::$flavors['profile-action'] =& $default_flavor_config;
         // Set the state of the output buffer when the flavor starts
         self::$flavors['profile-actions']['start'] = false;
         self::$flavors['profile-actions']['order'] = 'deny,allow';
         // fb:profile-action acts as a flavor, allowing other tags to be rendered once it is encountered in a profile-actions flavor
         self::$flavors['profile-actions']['allow'] = 'fb:profile-action';
         self::$flavors['mobile']['start'] = false;
         self::$flavors['mobile']['order'] = 'deny,allow';
         self::$flavors['mobile']['allow'] = 'fb:mobile';
         // This is a flavor used when processing disallowed tags in other flavors
         self::$flavors['hidden']['start'] = false;
         self::$flavors['hidden']['order'] = 'deny,allow';
         self::$flavors['hidden']['deny'] = array_merge($this->getAllTagNames('fb'), array('#text'));
     }
 }