Skip to content

Commit

Permalink
Implement the virtual createResourceImpl method
Browse files Browse the repository at this point in the history
  • Loading branch information
Aatch committed Jun 26, 2015
1 parent ae703cc commit 9959bfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pdo_pgsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ SmartPtr<PDOResource> PDOPgSql::createResourceImpl() {
return makeSmartPtr<PDOPgSqlResource>(std::make_shared<PDOPgSqlConnection>());
}

SmartPtr<PDOResource> PDOPgSql::createResourceImpl(const sp_PDOConnection& conn) {
return makeSmartPtr<PDOPgSqlResource>(
std::dynamic_pointer_cast<PDOPgSqlConnection>(conn)
);
}

long pdo_attr_lval(const Array& options, int opt, long defaultValue){
if(options.exists(opt)){
Expand Down
1 change: 1 addition & 0 deletions pdo_pgsql.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace HPHP {
struct PDOPgSql : public PDODriver {
PDOPgSql();
virtual SmartPtr<PDOResource> createResourceImpl() override;
virtual SmartPtr<PDOResource> createResourceImpl(const sp_PDOConnection& conn) override;
};

long pdo_attr_lval(const Array& options, int opt, long defaultValue);
Expand Down

0 comments on commit 9959bfb

Please sign in to comment.