public function get($handle)
 {
     $ft = new self();
     $ft->handle = $handle;
     $ft->loadConfig();
     $ft->hasOptions = $ft->hasOptions();
     $ft->properties = $ft->getProperties();
     return $ft;
 }
Example #2
0
 /**
  * @param array $api
  * @param Config $config
  * @return self
  */
 public static function create(array $api, Config $config)
 {
     $headers = new self(empty($api['http']['headers']) ? [] : $api['http']['headers'], empty($api['http']['requiredHeaders']) ? [] : $api['http']['requiredHeaders']);
     $headers->loadConfig($config);
     return $headers;
 }