Skip to content

Commit

Permalink
Adding 0.5.0 alpha. Check CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
phalcon committed Jul 21, 2012
2 parents 5458574 + 9f5b890 commit 45e4f98
Show file tree
Hide file tree
Showing 177 changed files with 13,043 additions and 13,528 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
0.5.0
- Classes now are registered as PHP namespaces.
- Improved stability running Phalcon with PHP versions lower or equal than 5.3.3
- Thousand of innecesary intermediate variables were removed improving stability
- Phalcon now performs a reduced number of copy-on-write checks
- Added class modifiers like Abstract or Final to Phalcon classes
- Fixed memory leaks generated when throwing internal exceptions
- Removed deprecated experimental function and method calls

0.4.3
- Fixed problem with partials, that removed any output previously generated
- Added Phalcon_Session::destroy
- Fixed memory leaks generated when throwing internal exceptions

0.4.2
- Added support for PostgreSQL database
- Phalcon_View is now fully integrated with Phalcon_Cache
Expand Down
40 changes: 20 additions & 20 deletions dev/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
#include "kernel/fcall.h"
#include "kernel/object.h"
#include "kernel/array.h"

/**
* Phalcon_Acl
* Phalcon\Acl
*
* This component allows to manage ACL lists. An access control list (ACL) is a list
* of permissions attached to an object. An ACL specifies which users or system processes
Expand All @@ -56,7 +57,7 @@ PHP_METHOD(Phalcon_Acl, __construct){

zval *adapter_name = NULL, *options = NULL, *adapter_class = NULL;
zval *a0 = NULL;
zval *r0 = NULL, *r1 = NULL, *r2 = NULL;
zval *r0 = NULL, *r1 = NULL;
zval *i0 = NULL, *i1 = NULL;
zend_class_entry *ce0;

Expand All @@ -68,28 +69,27 @@ PHP_METHOD(Phalcon_Acl, __construct){
}

if (!adapter_name) {
PHALCON_INIT_VAR(adapter_name);
PHALCON_ALLOC_ZVAL_MM(adapter_name);
ZVAL_STRING(adapter_name, "Memory", 1);
}

if (!options) {
PHALCON_INIT_VAR(a0);
PHALCON_ALLOC_ZVAL_MM(a0);
array_init(a0);
PHALCON_CPY_WRT(options, a0);
}

PHALCON_ALLOC_ZVAL_MM(r0);
PHALCON_CONCAT_SV(r0, "Phalcon_Acl_Adapter_", adapter_name);
PHALCON_CPY_WRT(adapter_class, r0);
PHALCON_INIT_VAR(adapter_class);
PHALCON_CONCAT_SV(adapter_class, "Phalcon\\Acl\\Adapter\\", adapter_name);

PHALCON_ALLOC_ZVAL_MM(r1);
PHALCON_CALL_FUNC_PARAMS_1(r1, "class_exists", adapter_class);
if (!zend_is_true(r1)) {
PHALCON_ALLOC_ZVAL_MM(r0);
PHALCON_CALL_FUNC_PARAMS_1(r0, "class_exists", adapter_class);
if (!zend_is_true(r0)) {
PHALCON_ALLOC_ZVAL_MM(i0);
object_init_ex(i0, phalcon_acl_exception_ce);
PHALCON_ALLOC_ZVAL_MM(r2);
PHALCON_CONCAT_SVS(r2, "Adapter '", adapter_name, "' does not exist");
PHALCON_CALL_METHOD_PARAMS_1_NORETURN(i0, "__construct", r2, PHALCON_CHECK);
PHALCON_ALLOC_ZVAL_MM(r1);
PHALCON_CONCAT_SVS(r1, "Adapter '", adapter_name, "' does not exist");
PHALCON_CALL_METHOD_PARAMS_1_NORETURN(i0, "__construct", r1, PH_CHECK);
phalcon_throw_exception(i0 TSRMLS_CC);
return;
}
Expand All @@ -98,7 +98,7 @@ PHP_METHOD(Phalcon_Acl, __construct){

PHALCON_ALLOC_ZVAL_MM(i1);
object_init_ex(i1, ce0);
PHALCON_CALL_METHOD_PARAMS_1_NORETURN(i1, "__construct", options, PHALCON_CHECK);
PHALCON_CALL_METHOD_PARAMS_1_NORETURN(i1, "__construct", options, PH_CHECK);
phalcon_update_property_zval(this_ptr, SL("_adapter"), i1 TSRMLS_CC);

PHALCON_MM_RESTORE();
Expand Down Expand Up @@ -126,19 +126,19 @@ PHP_METHOD(Phalcon_Acl, __call){
}

if (!arguments) {
PHALCON_INIT_VAR(a0);
PHALCON_ALLOC_ZVAL_MM(a0);
array_init(a0);
PHALCON_CPY_WRT(arguments, a0);
}

PHALCON_INIT_VAR(a1);
PHALCON_ALLOC_ZVAL_MM(a1);
array_init(a1);
PHALCON_ALLOC_ZVAL_MM(t0);
phalcon_read_property(&t0, this_ptr, SL("_adapter"), PHALCON_NOISY TSRMLS_CC);
phalcon_array_append(&a1, t0, PHALCON_SEPARATE_PLZ TSRMLS_CC);
phalcon_array_append(&a1, method, PHALCON_SEPARATE_PLZ TSRMLS_CC);
phalcon_read_property(&t0, this_ptr, SL("_adapter"), PH_NOISY_CC);
phalcon_array_append(&a1, t0, PH_SEPARATE TSRMLS_CC);
phalcon_array_append(&a1, method, PH_SEPARATE TSRMLS_CC);
PHALCON_ALLOC_ZVAL_MM(r0);
PHALCON_CALL_FUNC_PARAMS_2(r0, "call_user_func_array", a1, arguments);
RETURN_DZVAL(r0);
RETURN_CTOR(r0);
}

Loading

0 comments on commit 45e4f98

Please sign in to comment.