Example #1
0
 /**
  * Gets a new ProjectsMap instance from cache or API when not cached.
  *
  * @param string $phabricatorInstanceName The Phabricator instance name
  * @return ProjectsMap
  */
 public static function load($phabricatorInstanceName)
 {
     $instance = new self($phabricatorInstanceName);
     if ($instance->isCached()) {
         $instance->loadFromCache();
     } else {
         $instance->fetchFromAPI();
     }
     return $instance;
 }