/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $cdn_resource_id CDN Resource id * * @return mixed an array of Object instances on success. Otherwise false * @access public */ public function getList($cdn_resource_id = null, $url_args = null) { if (is_null($cdn_resource_id) && !is_null($this->_id)) { $cdn_resource_id = $this->_id; } if (!is_null($cdn_resource_id)) { $this->_id = $cdn_resource_id; return parent::getList(); } else { $this->logger->error('getList: argument $cdn_resource_id not set.', __FILE__, __LINE__); } }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param array $url_args [start, end, type, resource_type, resources[] ] * * @return mixed an array of Object instances on success. Otherwise false * @access public */ public function getList($url_args = null) { return parent::getList(null, $url_args); }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $user_id User ID * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($user_id = null) { if (is_null($user_id) && !is_null($this->_user_id)) { $user_id = $this->_user_id; } if (!is_null($user_id)) { $this->_user_id = $user_id; return parent::getList(); } else { $this->logger->error('getList: argument _user_id not set.', __FILE__, __LINE__); } }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param int|null $user_id * * @return array|bool */ function getList($user_id = null, $url_args = null) { //todo rewrite to use parent method if (is_null($user_id)) { return parent::getList(); } else { $this->activate(ONAPP_ACTIVATE_GETLIST); $this->logger->add('getList: Get Transaction list.'); $this->_user_id = $user_id; $this->setAPIResource($this->getResource(ONAPP_ACTIVATE_GETLIST_USER)); $response = $this->sendRequest(ONAPP_REQUEST_METHOD_GET); $result = $this->castStringToClass($response); if (!empty($response['errors'])) { //todo test this stuff //$this->errors = $result->errors; return false; } if (!is_array($result) && !is_null($result)) { $result = array($result); } return $result; } }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $vm_id VM ID * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($vm_id = null, $url_args = null) { if ($vm_id) { $this->_virtual_machine_id = $vm_id; } return parent::getList(); }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $virtual_machine_id Virtual Machine id * @param integer $network_interface_id Network Interface id * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($virtual_machine_id = null, $network_interface_id = null, $url_args = '') { if (is_null($virtual_machine_id) && !is_null($this->_virtual_machine_id)) { $virtual_machine_id = $this->_virtual_machine_id; } if (!is_null($virtual_machine_id)) { $this->_virtual_machine_id = $virtual_machine_id; } else { $this->logger->error('getList: argument _virtual_machine_id not set.', __FILE__, __LINE__); } if (is_null($network_interface_id) && !is_null($this->_network_interface_id)) { $network_interface_id = $this->_network_interface_id; } if (!is_null($network_interface_id)) { $this->_network_interface_id = $network_interface_id; } else { $this->logger->error('getList: argument _network_interface_id not set.', __FILE__, __LINE__); } return parent::getList(null, $url_args); }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $virtual_machine_id Virtual Machine id * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($virtual_machine_id = null, $url_args = null) { if (is_null($virtual_machine_id) && !is_null($this->_virtual_machine_id)) { $virtual_machine_id = $this->_virtual_machine_id; } if (!is_null($virtual_machine_id)) { $this->_virtual_machine_id = $virtual_machine_id; return parent::getList(); } else { $this->logger->error('getList: argument _virtual_machine_id not set.', __FILE__, __LINE__); } }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $virtual_machine_id Virtual Machine id * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($billing_plan_id = null, $url_args = null) { if (is_null($billing_plan_id) && !is_null($this->_billing_plan_id)) { $billing_plan_id = $this->_billing_plan_id; } if (!is_null($billing_plan_id)) { $this->_billing_plan_id = $billing_plan_id; return parent::getList(); } else { $this->logger->error('getList: argument _billing_plan_id not set.', __FILE__, __LINE__); } }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param int $page * * @return the array of Object instances */ function getList($page = 1) { $data = array('root' => 'page', 'data' => $page); return parent::getList($data); }
/** * Sends an API request to get the Objects. After requesting, * unserializes the received response into the array of Objects * * @param integer $dns_zone_id Virtual Machine id * * @return mixed an array of Object instances on success. Otherwise false * @access public */ function getList($dns_zone_id = null, $url_args = null) { if (is_null($dns_zone_id) && !is_null($this->_dns_zone_id)) { $dns_zone_id = $this->_dns_zone_id; } if (is_null($dns_zone_id) && isset($this->_obj) && !is_null($this->_obj->_dns_zone_id)) { $dns_zone_id = $this->_obj->_dns_zone_id; } if (!is_null($dns_zone_id)) { $this->_dns_zone_id = $dns_zone_id; return parent::getList(); } else { $this->logger->error('getList: argument _dns_zone_id not set.', __FILE__, __LINE__); } }