private function getIdentifierValues($model)
    {
        if (!$model instanceof $this->class) {
            return array();
        }

        if (1 === count($this->identifier) && current($this->identifier) instanceof \ColumnMap) {
            $phpName = current($this->identifier)->getPhpName();

            if (method_exists($model, 'get'.$phpName)) {
                return array($model->{'get'.$phpName}());
            }
        }

        if ($model instanceof \Persistent) {
            return array($model->getPrimaryKey());
        }

        // readonly="true" models do not implement \Persistent.
        if ($model instanceof \BaseObject && method_exists($model, 'getPrimaryKey')) {
            return array($model->getPrimaryKey());
        }

        if (!method_exists($model, 'getPrimaryKeys')) {
            return array();
        }

        return $model->getPrimaryKeys();
    }
private function getIdentifierValues($model)
    {
        if (!$model instanceof $this->class) {
            return array();
        }

        if (1 === count($this->identifier) && current($this->identifier) instanceof \ColumnMap) {
            $phpName = current($this->identifier)->getPhpName();

            if (method_exists($model, 'get'.$phpName)) {
                return array($model->{'get'.$phpName}());
            }
        }

        if ($model instanceof \Persistent) {
            return array($model->getPrimaryKey());
        }

        // readonly="true" models do not implement \Persistent.
        if ($model instanceof \BaseObject && method_exists($model, 'getPrimaryKey')) {
            return array($model->getPrimaryKey());
        }

        if (!method_exists($model, 'getPrimaryKeys')) {
            return array();
        }

        return $model->getPrimaryKeys();
    }
private function getIdentifierValues ( $ model ) { if ( ! $ model instanceof $ this -> class ) { return array ( ) ; } if ( 1 === count ( $ this -> identifier ) && current ( $ this -> identifier ) instanceof \ ColumnMap ) { $ phpName = current ( $ this -> identifier ) -> getPhpName ( ) ; if ( method_exists ( $ model , 'get' . $ phpName ) ) { return array ( $ model -> { 'get' . $ phpName } ( ) ) ; } } if ( $ model instanceof \ Persistent ) { return array ( $ model -> getPrimaryKey ( ) ) ; } // readonly="true" models do not implement \Persistent. if ( $ model instanceof \ BaseObject && method_exists ( $ model , 'getPrimaryKey' ) ) { return array ( $ model -> getPrimaryKey ( ) ) ; } if ( ! method_exists ( $ model , 'getPrimaryKeys' ) ) { return array ( ) ; } return $ model -> getPrimaryKeys ( ) ; }
Returns the values of the identifier fields of a model.

Propel must know about this model, that is, the model must already
be persisted or added to the idmodel map before. Otherwise an
exception is thrown.

@param object $model The model for which to get the identifier

@return array
Returns the values of the identifier fields of a model .