Extending API

Discussion in 'Developers' Forum' started by Xenocide, Jan 28, 2013.

  1. Xenocide

    Xenocide New Member

    Hi Guys,

    Is it possible to extend the API using plugins?

    I just want to add functions like sites_get_domain_by_domainname etc to check a site exists before creating it but obviously don't want to edit the core files.

    Cheers
     
  2. Xenocide

    Xenocide New Member

    If I were to make a new file and include it from the config file (doesn't get over written?) and made a class which extends the remoting class, then changed interface/web/remote.index.php to read $app->load('remoting_other_class');.. would that work?
     
  3. till

    till Super Moderator

    No.

    No need to add a new function for that, you can esily do this with the current functions:

    $domain_record = $client->sites_web_domain_get($session_id, array('domain' => 'mydomain.tld'));
     
  4. Xenocide

    Xenocide New Member

    You blow my mind. Thank you. Fantastic!!
     

Share This Page