protected function getPredicateFunctions($array)
    {
        $predicateFunctions = [];
        if(is_array($array))
        {
            if(isset($array['predicates']))
            {
                $predicateFunctions['predicates'] = $array['predicates'];
            } else
            {
                $predicateFunctions[key($array)] = $array[key($array)];
                $predicateFunctions = array_merge($predicateFunctions, $this->getPredicateFunctions($array[key($array)]));
            }
        }
        return $predicateFunctions;
    }