getHostname() public method

public getHostname ( )
示例#1
0
 /**
  * Add an Infusionsoft_App to the app pool (If necessary) and set it as the default app.
  * @param Infusionsoft_App $app
  * @param null $appKey
  * @return Infusionsoft_App The Infusionsoft_App added as the default
  */
 public static function setDefaultApp(Infusionsoft_App $app, $appKey = null)
 {
     $existingApp = self::getApp($app->getHostname());
     $app = $existingApp == null ? self::addApp($app, $appKey) : $existingApp;
     if (self::$apps['default'] != $app) {
         self::$apps['default'] = $app;
     }
     return self::$apps['default'];
 }
 public function __construct(Infusionsoft_Generated_Base $object, array $conditions = array(), $ttl = 300, $limit = 1000, $page = 0, $returnFields = false, Infusionsoft_App $app = null)
 {
     $this->object = $object;
     $this->conditions = $conditions;
     $this->limit = $limit;
     $this->page = $page;
     $this->returnFields = $returnFields;
     $this->app = $app;
     $this->app_name = $app == null ? Infusionsoft_AppPool::getApp()->getHostname() : $app->getHostname();
     parent::__construct('objects_' . $this->object->getTable() . '_' . $this->app_name . '_' . md5(http_build_query($conditions) . $this->limit . $this->page . ($returnFields ? http_build_query($returnFields) : '') . $this->app_name), 600, dirname(__FILE__) . '/cache/');
 }
 public function __construct(Infusionsoft_Generated_Base $object, array $conditions = array(), $ttl = 300, $limit = 1000, $page = 0, $returnFields = false, Infusionsoft_App $app = null)
 {
     $this->object = $object;
     $this->conditions = $conditions;
     $this->limit = $limit;
     $this->page = $page;
     $this->returnFields = $returnFields;
     $this->app = $app;
     $this->app_name = $app == null ? Infusionsoft_AppPool::getApp()->getHostname() : $app->getHostname();
     $directory = dirname(__FILE__) . '/cache';
     // SmartCache class checks the Cache engine being used and shortens the "directory" if it is being used as the key in a caching system instead of as a file-name in a file-based cache.
     parent::__construct('objects_' . $this->object->getTable() . '_' . $this->app_name . '_' . md5(http_build_query($conditions) . $this->limit . $this->page . ($returnFields ? http_build_query($returnFields) : '') . $this->app_name), 600, $directory);
 }