Example #1
0
 /**
  * Factory method which allows for easy service creation
  *
  * @param  ClientInterface $client
  * @return self
  */
 public static function factory(ClientInterface $client)
 {
     $identity = new self();
     $identity->setClient($client);
     $identity->setEndpoint(clone $client->getAuthUrl());
     return $identity;
 }
 public static function construct($nwk_addr_of_interest, $endpoint)
 {
     $frame = new self();
     $frame->setNwkAddressOfInterest($nwk_addr_of_interest);
     $frame->setEndpoint($endpoint);
     return $frame;
 }
 public static function factory(Openstack $client)
 {
     $identity = new self();
     $identity->setClient($client);
     $identity->setEndpoint($client->getAuthUrl());
     return $identity;
 }
 public static function constructExtended($nwk_addr_of_interest, $endpoint, $start_index)
 {
     $frame = new self();
     $frame->setNwkAddressOfInterest($nwk_addr_of_interest);
     $frame->setEndpoint($endpoint);
     $frame->setStartIndex($start_index);
     return $frame;
 }
Example #5
0
 /**
  * Factory method which allows for easy service creation
  *
  * @param  ClientInterface $client
  * @return self
  */
 public static function factory(ClientInterface $client)
 {
     $identity = new self();
     if (($client instanceof Base || $client instanceof OpenStack) && $client->hasLogger()) {
         $identity->setLogger($client->getLogger());
     }
     $identity->setClient($client);
     $identity->setEndpoint(clone $client->getAuthUrl());
     return $identity;
 }
Example #6
0
 /**
  * Factory method which allows for easy service creation
  *
  * @param  ClientInterface $client
  * @return self
  */
 public static function factory(\Guzzle\Http\ClientInterface $client)
 {
     $tempAuth = new self();
     if (($client instanceof \OpenCloud\Common\Base || $client instanceof \OpenCloud\OpenStack) && $client->hasLogger()) {
         $tempAuth->setLogger($client->getLogger());
     }
     $tempAuth->setClient($client);
     $tempAuth->setEndpoint(clone $client->getAuthUrl());
     return $tempAuth;
 }
 public static function construct($endpoint, $application_profile_identifier, $application_device_identifier, $application_device_version, array $application_input_cluster_list = [], array $application_output_cluster_list = [])
 {
     $frame = new self();
     $frame->setEndpoint($endpoint);
     $frame->setApplicationProfileIdentifier($application_profile_identifier);
     $frame->setApplicationDeviceIdentifier($application_device_identifier);
     $frame->setApplicationDeviceVersion($application_device_version);
     $frame->setApplicationInputClusterList($application_input_cluster_list);
     $frame->setApplicationOutputClusterList($application_output_cluster_list);
     return $frame;
 }
 public static function constructFailure($status, $nwk_addr_of_interest, $endpoint, $app_input_cluster_count, $app_output_cluster_count, $start_index)
 {
     $frame = new self();
     $frame->setStatus($status);
     $frame->setNwkAddrOfInterest($nwk_addr_of_interest);
     $frame->setEndpoint($endpoint);
     $frame->setAppInputClusterCount($app_input_cluster_count);
     $frame->setAppOutputClusterCount($app_output_cluster_count);
     $frame->setStartIndex($start_index);
     return $frame;
 }
Example #9
0
 /**
  * @param array $data
  * @return Entry
  */
 public static function fromStorageArray(array $data)
 {
     $entry = new self();
     $entry->setEndpoint(EndpointDescriptor::fromJson($data['endpoint']));
     $entry->setProcessId($data['processId']);
     $entry->setInstanceId($data['instanceId']);
     $entry->setServiceName($data['serviceName']);
     return $entry;
 }