src/FlexiPeeHP/FlexiBeeRO.php
public function takeData($data)
    {
        $keyColumn = $this->getKeyColumn();
        if (array_key_exists($keyColumn, $data) && is_array($data[$keyColumn])) {
            foreach ($data[$keyColumn] as $recPos => $recordKey) {
                if (substr($recordKey, 0, 4) == 'ext:') {
                    $data['external-ids'][] = $recordKey;
                    unset($data[$keyColumn][$recPos]);
                }
            }
            if (count($data[$keyColumn]) == 1) {
                $data[$keyColumn] = current($data[$keyColumn]);
            }
        }
        $result = parent::takeData($data);

        if (array_key_exists($keyColumn, $data) || array_key_exists('kod', $data)) {
            $this->updateApiURL();
        }

        return $result;
    }
public function takeData($data)
    {
        $keyColumn = $this->getKeyColumn();
        if (array_key_exists($keyColumn, $data) && is_array($data[$keyColumn])) {
            foreach ($data[$keyColumn] as $recPos => $recordKey) {
                if (substr($recordKey, 0, 4) == 'ext:') {
                    $data['external-ids'][] = $recordKey;
                    unset($data[$keyColumn][$recPos]);
                }
            }
            if (count($data[$keyColumn]) == 1) {
                $data[$keyColumn] = current($data[$keyColumn]);
            }
        }
        $result = parent::takeData($data);

        if (array_key_exists($keyColumn, $data) || array_key_exists('kod', $data)) {
            $this->updateApiURL();
        }

        return $result;
    }
public function takeData ( $ data ) { $ keyColumn = $ this -> getKeyColumn ( ) ; if ( array_key_exists ( $ keyColumn , $ data ) && is_array ( $ data [ $ keyColumn ] ) ) { foreach ( $ data [ $ keyColumn ] as $ recPos => $ recordKey ) { if ( substr ( $ recordKey , 0 , 4 ) == 'ext:' ) { $ data [ 'external-ids' ] [ ] = $ recordKey ; unset ( $ data [ $ keyColumn ] [ $ recPos ] ) ; } } if ( count ( $ data [ $ keyColumn ] ) == 1 ) { $ data [ $ keyColumn ] = current ( $ data [ $ keyColumn ] ) ; } } $ result = parent :: takeData ( $ data ) ; if ( array_key_exists ( $ keyColumn , $ data ) || array_key_exists ( 'kod' , $ data ) ) { $ this -> updateApiURL ( ) ; } return $ result ; }
Take data for object. separate external IDs

@param array $data Data to keep

@return int number of records taken
Take data for object . separate external IDs