protected function extractPrimaryKeyValue($record, $returnAs)
    {
        $record = (object) $record;
        $values = [];
        foreach((array) $this->ORMParameters['primaryKey'] as $field) {
            $values[$field] = $record->$field;
        }
        switch($returnAs) {
            case 's':
                return implode('|', $values);
            break;
            case 'a':
                return $values;
            break;
        }   
    }
protected function extractPrimaryKeyValue($record, $returnAs)
    {
        $record = (object) $record;
        $values = [];
        foreach((array) $this->ORMParameters['primaryKey'] as $field) {
            $values[$field] = $record->$field;
        }
        switch($returnAs) {
            case 's':
                return implode('|', $values);
            break;
            case 'a':
                return $values;
            break;
        }   
    }
protected function extractPrimaryKeyValue ( $ record , $ returnAs ) { $ record = ( object ) $ record ; $ values = [ ] ; foreach ( ( array ) $ this -> ORMParameters [ 'primaryKey' ] as $ field ) { $ values [ $ field ] = $ record -> $ field ; } switch ( $ returnAs ) { case 's' : return implode ( '|' , $ values ) ; break ; case 'a' : return $ values ; break ; } }
Builds primary key value for a record
@param mixed $record array or object with record data;
@param string $returnAs s = string (imploded by | in case of composite key) | a = array
Builds primary key value for a record