Commit Graph

72 Commits

Author SHA1 Message Date
Derick Rethans 16ca05529c Move files into ext/twig. 2011-11-20 21:25:05 +00:00
Derick Rethans 699e1232ab Allow any, but the first two arguments to be optional. 2011-10-28 12:25:41 +02:00
Derick Rethans 952fe6f26c Added missing format specifier to parseparameters. 2011-10-28 12:22:28 +02:00
Derick Rethans 7cc280810f Added support for the new argument called 'ignoreStrictCheck'. 2011-10-28 12:20:22 +02:00
Derick Rethans b7b260bda5 Fixed exception message issue with an array element that didn't exist and strict variables checking turned on. 2011-10-28 12:15:33 +02:00
Derick Rethans 634d8ae9bf Fixed compiler warnings 2011-10-28 11:34:18 +02:00
Derick Rethans 70778119f0 PHP 5.4 compatibility. 2011-10-01 16:18:30 +01:00
Derick Rethans 05cb73fe99 More PHP 5.2 compatibility. 2011-09-29 15:24:59 +01:00
Derick Rethans 163f80641d PHP 5.2 compatibility. 2011-09-29 14:57:53 +01:00
Derick Rethans 8e11c14a5f Sigh, stupid copy and paste error prevented the last tests from passing. All is well now. 2011-07-25 16:34:13 +01:00
Derick Rethans 2dffee98e9 Added a return so that the function ends after throwing an exception. This fixes a segfault too. 2011-07-25 16:24:38 +01:00
Derick Rethans e9c3eda05d - Fixed code that was previously never hit. 2011-07-18 18:46:39 +01:00
Derick Rethans 53e1652d80 Implement HAS_PROPERTY to distinguish between not-set and NULL. 2011-07-18 18:46:12 +01:00
Derick Rethans 541f6c8478 Use "isset" logic as fetch always works, even for elements that don't exist and they then just become NULL. 2011-07-18 18:45:31 +01:00
Derick Rethans a36d11ba0c Fixed memory leaks. 2011-07-15 14:16:25 +01:00
Derick Rethans cbd975ae0c Use the proper zend hash function here. 2011-07-14 12:18:50 +01:00
Derick Rethans 7b38766928 Handle numeric keys for array elements too. 2011-07-14 12:15:50 +01:00
Derick Rethans 49b885c170 After instantiating the object, call the constructor and make sure we return from the function. 2011-07-13 18:20:47 +01:00
Derick Rethans 0ee71a722e Added TWIG_CALL_Z (to use for calling a function with one argument). 2011-07-13 18:20:21 +01:00
Derick Rethans 52b9ae44bb Bailout when we have an exception to defer to PHP's exception handlers. 2011-07-13 16:27:35 +01:00
Derick Rethans 9facb8d991 Split TWIG_CALL_S into TWIG_CALL_S and TWIG_CALL_SB for boolean returning functions. 2011-07-13 16:27:10 +01:00
Derick Rethans b8b89f61a6 Fixed the uninitialized ptr check. This makes all tests in Twig_TemplateTest pass! 2011-07-08 13:01:22 +01:00
Derick Rethans 9096e3f734 Use strtolower on the method names and add them as associative keys so that they are found.
This makes method calls work.
2011-07-08 12:50:26 +01:00
Derick Rethans 0b6cefbb6a Fixed TWIG_PROPERTY to return a NULL instead of a zval(NULL). 2011-07-07 15:43:13 +01:00
Derick Rethans 1e726f436b Those are array elements and not properties. 2011-07-07 14:06:18 +01:00
Derick Rethans 9f6495f447 Return the value immediately. 2011-07-07 14:06:03 +01:00
Derick Rethans f7ae76ef4b Check the property regardless of whether tmp_item is valid/set. 2011-07-07 14:05:38 +01:00
Derick Rethans 3c208ff875 We need to use strlen on hash keys. 2011-07-07 14:05:21 +01:00
Derick Rethans 7d36defef3 Split TWIG_PROPERTY into TWIG_PROPERTY and TWIG_PROPERTY_CHAR so the array key can be both a zval or char. 2011-07-07 14:04:53 +01:00
Derick Rethans 508bb66bf7 Made properties return properly. 2011-07-07 13:06:13 +01:00
Derick Rethans 4e899caee4 Add the properties as assoc keys, so that hash_find actually works on them. 2011-07-07 13:05:40 +01:00
Derick Rethans 63e1f1279d Check normal property before trying to de-mangle it. 2011-07-07 13:05:12 +01:00
Derick Rethans 9d22fddf08 Fixed TWIG_GET_ARRAY_ELEMENT_ZVAL's return value. 2011-07-07 13:04:50 +01:00
Derick Rethans 48b0a5f985 Fixed compiler warning. 2011-07-05 12:37:26 +01:00
Derick Rethans f19ec8a090 Implemented first bit for ArrayAccess support. 2011-07-05 12:37:08 +01:00
Derick Rethans f196f01704 Initialise variable to NULL. 2011-07-04 18:02:39 +01:00
Derick Rethans 803c1a9f83 Apparently this is needed for GCC to not optimise it out... 2011-07-04 18:02:17 +01:00
Derick Rethans 078690b4dc - Remove debugging code. 2011-07-04 18:02:02 +01:00
Derick Rethans 1b55c97eba Only add the object to the cache if there is actually an object. 2011-07-04 16:46:33 +01:00
Derick Rethans f42cd14d2d Fix efree(NULL) when no arguments are passed in. 2011-07-04 16:06:46 +01:00
Derick Rethans 577169c515 Added missing header and switch arguments for the return around as I got that wrong. 2011-06-30 17:03:00 +01:00
Derick Rethans 2b58fec35d Added support for NULL arguments to CALL_USER_FUNC_ARRAY and made CALL_BOOLEAN use that. 2011-06-30 17:02:27 +01:00
Derick Rethans f7fc1ffed6 Fold TWIG_GET_ARRAY_ELEMENT and TWIG_PROPERTY into one worker function. 2011-06-30 17:01:34 +01:00
Derick Rethans 6e1dd56172 Implement TWIG_GET_CLASS_NAME and make use of it. 2011-06-30 14:36:05 +01:00
Derick Rethans b891ad909a Initialise ret to NULL. 2011-06-30 14:25:00 +01:00
Derick Rethans 828c113fa2 Get rid of TWIG_RETURN_ARRAY_ELEMENT and use TWIG_GET_ARRAY_ELEMENT instead. 2011-06-30 14:24:27 +01:00
Derick Rethans 0cc719add3 Implemented TWIG_THROW_EXCEPTION. 2011-06-30 13:21:57 +01:00
Derick Rethans 701be8bb57 Implemented TWIG_IMPLODE_ARRAY_KEYS. 2011-06-30 13:21:26 +01:00
Derick Rethans 3da24d9fda Fixed logic and implemented normal array key return. 2011-06-30 11:26:25 +01:00
Derick Rethans b918f2ea7b Implemented TWIG_RETURN_ARRAY_ELEMENT. 2011-06-30 11:25:57 +01:00