ADoebeling / RP2-Framework

The RPF provides a ide-compatible PHP interface to the DomainFactory RP²-API for developers and collects a bunch of ready-to-use extensions for admins and customers. The system is modularly structured and can be extended easily.
http://doebeling.dev/RP2-Framework/
3 stars 2 forks source link

JSON-API #53

Open ADoebeling opened 8 years ago

ADoebeling commented 8 years ago
$rpf
    ->getApi()                                  // Load the API
    ->getDomainReadEntry()                      // Load the API-module domainReadEntry (bbDomain::readEntry)
    ->setOeid('ZY')                             // Optional: Get domains by hidden rp2-order-id
    ->addNameserver()                           // Optional: Add dns-records
    ->get();                                    // Return result as array, primary-key set to domain

as json-api:

\/(json\.v1|get\w*|add\w*|set\w*)\=?(\w*)(\,\w*)*

$re = "/\\/(json\\.v1|get\\w*|add\\w*|set\\w*)\\=?(\\w*)?\\,?(\\w*)\\,?(\\w*)\\,?(\\w*)\\,?(\\w*)\\,?(\\w*)/s"; 
$str = "\$domain.tld/json.v1=true/getApi=true/getDomainEntry/setOeid=ZY/addNameserver=1,2,test,4/getArray\n\njhkhjk\n\nlkjlj\n\n"; 

preg_match_all($re, $str,  #$matches);

Gibt json als als debug-ansicht im Browser aus

LBeckX commented 7 years ago

Reminder