Skip to content

Commit

Permalink
Merge pull request #1295 from dreamsxin/1238
Browse files Browse the repository at this point in the history
Fix nfr #1238
  • Loading branch information
Phalcon committed Sep 30, 2013
2 parents 60200da + 7d49a79 commit 38ed6f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/logger/adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ PHP_METHOD(Phalcon_Logger_Adapter, setFormatter){
RETURN_THISW();
}

/**
* Returns the current transaction
*
* @return Phalcon\Logger\Adapter
*/
PHP_METHOD(Phalcon_Logger_Adapter, isTransaction){

RETURN_MEMBER(this_ptr, "_transaction");
}

/**
* Starts a transaction
*
Expand Down
2 changes: 2 additions & 0 deletions ext/logger/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ PHALCON_INIT_CLASS(Phalcon_Logger_Adapter);
PHP_METHOD(Phalcon_Logger_Adapter, setLogLevel);
PHP_METHOD(Phalcon_Logger_Adapter, getLogLevel);
PHP_METHOD(Phalcon_Logger_Adapter, setFormatter);
PHP_METHOD(Phalcon_Logger_Adapter, isTransaction);
PHP_METHOD(Phalcon_Logger_Adapter, begin);
PHP_METHOD(Phalcon_Logger_Adapter, commit);
PHP_METHOD(Phalcon_Logger_Adapter, rollback);
Expand Down Expand Up @@ -81,6 +82,7 @@ PHALCON_INIT_FUNCS(phalcon_logger_adapter_method_entry){
PHP_ME(Phalcon_Logger_Adapter, setLogLevel, arginfo_phalcon_logger_adapter_setloglevel, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, getLogLevel, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, setFormatter, arginfo_phalcon_logger_adapter_setformatter, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, isTransaction, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, begin, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, commit, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phalcon_Logger_Adapter, rollback, NULL, ZEND_ACC_PUBLIC)
Expand Down

0 comments on commit 38ed6f7

Please sign in to comment.