getComputed() public méthode

Gets computed list
public getComputed ( ) : array
Résultat array Returns computed array of values that represent list.
Exemple #1
0
 /**
  * DeleteLoadBalancerListeners action
  *
  * Deletes listeners from the LoadBalancer for the specified port.
  *
  * @param   string       $loadBalancerName       A load balancer name.
  * @param   ListDataType $loadBalancerPortsList  The client port number(s) of the LoadBalancerListener(s)
  *                                               to be removed.
  * @return  boolean      Returns TRUE if success
  * @throws  ClientException
  */
 public function deleteLoadBalancerListeners($loadBalancerName, ListDataType $loadBalancerPortsList)
 {
     $result = false;
     $options = array('LoadBalancerName' => (string) $loadBalancerName);
     $options = array_merge($options, $loadBalancerPortsList->getQueryArray('LoadBalancerPorts'));
     $response = $this->client->call('DeleteLoadBalancerListeners', $options);
     if ($response->getError() === false) {
         $result = true;
         /* @var $loadBalancer LoadBalancerDescriptionData */
         $loadBalancer = $this->elb->loadBalancer->get($options['LoadBalancerName']);
         if ($loadBalancer !== null) {
             if ($loadBalancer->listenerDescriptions !== null && count($loadBalancer->listenerDescriptions)) {
                 $removed = $loadBalancerPortsList->getComputed();
                 /* @var $listenerDescription ListenerDescriptionData */
                 foreach ($loadBalancer->listenerDescriptions as $k => $listenerDescription) {
                     if (isset($listenerDescription->listener->loadBalancerPort) && in_array($listenerDescription->listener->loadBalancerPort, $removed)) {
                         unset($loadBalancer->listenerDescriptions[$k]);
                     }
                 }
             }
         }
     }
     return $result;
 }
Exemple #2
0
 /**
  * @test
  * @expectedException   \InvalidArgumentException
  */
 public function testIllegalObject()
 {
     $instanceData = new InstanceData();
     $instanceData->instanceId = 1;
     $list = new ListDataType($instanceData, 'instanceId', 'stdClass');
     $list->getComputed();
 }