public function nestedResource(array $conditions)
    {
        foreach ($this->_nestedResources as $url => $options) {
            if (count(array_intersect_key(array_flip($options['requiredFields']), $conditions)) !== count($options['requiredFields'])) {
                continue;
            }

            return Text::insert($url, $conditions);
        }

        return false;
    }
public function nestedResource(array $conditions)
    {
        foreach ($this->_nestedResources as $url => $options) {
            if (count(array_intersect_key(array_flip($options['requiredFields']), $conditions)) !== count($options['requiredFields'])) {
                continue;
            }

            return Text::insert($url, $conditions);
        }

        return false;
    }
public function nestedResource ( array $ conditions ) { foreach ( $ this -> _nestedResources as $ url => $ options ) { if ( count ( array_intersect_key ( array_flip ( $ options [ 'requiredFields' ] ) , $ conditions ) ) !== count ( $ options [ 'requiredFields' ] ) ) { continue ; } return Text :: insert ( $ url , $ conditions ) ; } return false ; }
Checks if a set of conditions match a nested resource

@param array $conditions The conditions in a query
@return bool|string Either a URL or false in case no nested resource matched
Checks if a set of conditions match a nested resource