[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/externals/stripe-php/lib/Stripe/ -> SingletonApiResource.php (source)

   1  <?php
   2  
   3  abstract class Stripe_SingletonApiResource extends Stripe_ApiResource
   4  {
   5    protected static function _scopedSingletonRetrieve($class, $apiKey=null)
   6    {
   7      $instance = new $class(null, $apiKey);
   8      $instance->refresh();
   9      return $instance;
  10    }
  11  
  12    /**
  13     * @param Stripe_SingletonApiResource $class
  14     * @return string The endpoint associated with this singleton class.
  15     */
  16    public static function classUrl($class)
  17    {
  18      $base = self::className($class);
  19      return "/v1/$base}";
  20    }
  21  
  22    /**
  23     * @return string The endpoint associated with this singleton API resource.
  24     */
  25    public function instanceUrl()
  26    {
  27      $class = get_class($this);
  28      $base = self::classUrl($class);
  29      return "$base";
  30    }
  31  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1