PayPal\Core\PayPalConfigManager::getInstance PHP Méthode

getInstance() public static méthode

Returns the singleton object
public static getInstance ( )
    public static function getInstance()
    {
        if (!isset(self::$instance)) {
            self::$instance = new self();
        }
        return self::$instance;
    }

Usage Example

 /**
  * Create singleton instance for this class.
  *
  * @param array|null $config
  * @return PayPalCredentialManager
  */
 public static function getInstance($config = null)
 {
     if (!self::$instance) {
         self::$instance = new self($config == null ? PayPalConfigManager::getInstance()->getConfigHashmap() : $config);
     }
     return self::$instance;
 }
All Usage Examples Of PayPal\Core\PayPalConfigManager::getInstance