Sprig_Core::pk PHP Method

pk() public method

Returns the primary key of the model, optionally with a table name.
public pk ( $table = NULL ) : string
return string
    public function pk($table = NULL)
    {
        if ($table) {
            if ($table === TRUE) {
                $table = $this->_table;
            }
            return $table . '.' . $this->_primary_key;
        }
        return $this->_primary_key;
    }