5affd24dfd0654c71a4bd0f62aea7bd42887cd5e
[WP-Plugins/glm-member-db.git] /
1 <?php
2 namespace PayPal\Common;
3 use PayPal\Core\PPConfigManager;
4 /**
5  * 
6  * Container for Call level parameters such as
7  * SDK configuration 
8  */
9 class PPApiContext {
10         
11         /**
12          * 
13          * @var array Dynamic SDK configuration
14          */
15         protected $config;
16         
17         public function setConfig($config) {
18                 $this->config = $config;
19         }
20         
21         public function getConfig() {
22                 if(!isset($this->config)) {
23                         $this->config = PPConfigManager::getInstance()->getConfigHashmap();
24                 }
25                 return $this->config;
26         }
27         
28         public function __construct($config=null) {
29                 if(!is_null($config)) {
30                         $this->config = $config;
31                 }
32         }
33 }