PHP code example of webdevvie / nestis

1. Go to this page and download the library: Download webdevvie/nestis library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webdevvie / nestis example snippets


public function getThatThingIWant($apiResponse)
{
    return $nestis->getNestedItem('someObject/someOtherProperty/itemIWant',$apiResponse);
}

public function getThatThingIWant($apiResponse)
{
   $someObject = $apiResponse->getSomeObject();
   
   if(!is_null($someObject))
   {
        $someOtherProperty = $someObject->getSomeOtherProperty();
        if(!is_null($someOtherProperty))
        {
            return $someOtherProperty->getItemIWant();
        }
   }
   
   return null;
}