Library/Bullhorn/FastRest/Api/Services/ControllerHelper/Save.php
private function filterParents(\stdClass $params, ApiInterface $entity) {
        $parents = array();
        foreach($params as $key => $value) {
            if(is_object($value) && get_class($value) == 'stdClass') {
                $alias = ucfirst($key);
                if(in_array($alias, $entity->getParentRelationships())) {
                    $parents[$alias] = $value;
                } else {
                    throw new Exception('Could not find the parent field: ' . $key, 400);
                }
            }
        }
        return $parents;
    }
private function filterParents(\stdClass $params, ApiInterface $entity) {
        $parents = array();
        foreach($params as $key => $value) {
            if(is_object($value) && get_class($value) == 'stdClass') {
                $alias = ucfirst($key);
                if(in_array($alias, $entity->getParentRelationships())) {
                    $parents[$alias] = $value;
                } else {
                    throw new Exception('Could not find the parent field: ' . $key, 400);
                }
            }
        }
        return $parents;
    }
private function filterParents ( \ stdClass $ params , ApiInterface $ entity ) { $ parents = array ( ) ; foreach ( $ params as $ key => $ value ) { if ( is_object ( $ value ) && get_class ( $ value ) == 'stdClass' ) { $ alias = ucfirst ( $ key ) ; if ( in_array ( $ alias , $ entity -> getParentRelationships ( ) ) ) { $ parents [ $ alias ] = $ value ; } else { throw new Exception ( 'Could not find the parent field: ' . $ key , 400 ) ; } } } return $ parents ; }
Filters the params down to just the instance parents

@param \stdClass $params
@param ApiInterface $entity

@return \stdClass[]
@throws Exception
Filters the params down to just the instance parents