Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Unable to find some function #6

Closed
mzdani opened this issue Jan 25, 2016 · 4 comments
Closed

Unable to find some function #6

mzdani opened this issue Jan 25, 2016 · 4 comments

Comments

@mzdani
Copy link

mzdani commented Jan 25, 2016

Hello,

I can't find some function. This is the example :

...
$site   = $this->getSite($siteId);
...

On line 480 and 618 in SoapClient.php

And then getSites() and getAllClientIds(), for example:

...
$domains         = array_merge($reservedDomains, array_map(function($s) {
                    return $s['domain'];
                }, $this->getSites()
                ), $this->getAllClients()
        );
...

on line 170 in AbstractSoapClient.php

and

...
$clientIds  = $this->getAllClientIds();
...

on line 151 in AbstractSoapClient.php

Can you give a correct function sir?

@jnovermars
Copy link

Can you show the exact error line?

The code
$clientIds = $this->getAllClientIds();
is for inside the class AbstractSoapClient if you like to use it outside the class you need to use it like this:
$class = new AbstractSoapClient(); $clientIds = $class->getAllClientIds();

@mzdani
Copy link
Author

mzdani commented Jan 25, 2016

I got error when I use like this :

use GDM\\ISPConfig\\SoapClient;

$cp = new SoapClient('http://devel.server.lc:8080/remote/index.php', 'test', 'test');
$cp->sitesWebAliasdomainAdd(2, 6, 'aliasdomain.lc');

and the error is

 Call to undefined method GDM\\ISPConfig\\SoapClient::getSite() in /var/www/clients/client2/web12/web/SoapClient.php on line 618

Yes, you're correct sir. But I can't see any function with that name in AbstractSoapClient class sir. For example :

public function getAllClientIds(){
...
}

or getSite() function in SoapClient.php.

@jnovermars
Copy link

I have found the problem already, if you can see into my commit: jnovermars@e34c1ae there are functions renamed but not all are renamed... so you can check te commits to see wat is te correct function :)

@mzdani
Copy link
Author

mzdani commented Jan 25, 2016

Yep, that's right sir. I already check and it's good. Thank you sir. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants