public function findEndpoint($name)
    {
        $endpointArr = null;

        foreach($this->endpoints as $key => $value)
        {
            if(strpos($name, $key) !== false)
            {
                $endpointArr = [$key => $value];
                break;
            }
        }

        return $endpointArr;
    }
public function findEndpoint($name)
    {
        $endpointArr = null;

        foreach($this->endpoints as $key => $value)
        {
            if(strpos($name, $key) !== false)
            {
                $endpointArr = [$key => $value];
                break;
            }
        }

        return $endpointArr;
    }
public function findEndpoint ( $ name ) { $ endpointArr = null ; foreach ( $ this -> endpoints as $ key => $ value ) { if ( strpos ( $ name , $ key ) !== false ) { $ endpointArr = [ $ key => $ value ] ; break ; } } return $ endpointArr ; }
Find the associated endpoint array from the config file,
given string consist of the first level key.

eg. $name = 'productsAll', would return [ 'products' => ['images', 'variant'] ]

@param $name
@return array|null
Find the associated endpoint array from the config file given string consist of the first level key .