Commit Graph

56 Commits

Author SHA1 Message Date
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
Derick Rethans e1663e8d0b Re-scope variables. 2011-06-29 12:47:47 +01:00
Derick Rethans 8bc1f0268b Added the cache creating/fetching method in the code. 2011-06-29 12:46:46 +01:00
Derick Rethans 7367cf942b Added the cache fetching method for methods and properties. 2011-06-29 12:46:00 +01:00
Derick Rethans 9d40c9f8c8 Implemented TWIG_CALL_USER_FUNC_ARRAY, TWIG_GET_STATIC_PROPERTY, TWIG_GET_ARRAY_ELEMENT_ZVAL and TWIG_GET_ARRAY_ELEMENT. 2011-06-29 12:44:10 +01:00
Derick Rethans 2078e50de1 - Implemented the strtolower function. 2011-06-29 12:42:34 +01:00
Derick Rethans e133074da1 - The extension now loads and the pseudo code is mostly ready. 2011-06-08 16:24:53 +01:00
Derick Rethans 1b96539ecb - The parse parameters line was wrong, it still had the extra one that was
removed in Twig itself already.
2011-06-08 13:28:48 +01:00
Derick Rethans d08224457f - Used the template, instead of getThis(), which wouldn't exist. 2011-06-08 13:26:48 +01:00
Derick Rethans 07e38efa70 - Added more generated files to .gitignore 2011-06-07 14:57:54 +01:00
Derick Rethans 6aa1a64c2b - Stubs and more implementations. 2011-06-07 14:57:28 +01:00
Derick Rethans 79f6dc6efc - Implement TWIG_INSTANCEOF_* 2011-06-07 10:42:17 +01:00
Derick Rethans 19fbee7ef6 - Implemented TWIG_ARRAY_KEY_EXISTS (for normal arrays only). 2011-06-07 09:29:02 +01:00
Derick Rethans 4de3659c9b - Reduce compile warnings and errors.
- Initialize the two method names.
2011-06-07 09:22:58 +01:00
Derick Rethans a2f3c34ba5 - Added more files to .gitignore 2011-06-07 08:59:57 +01:00
Derick Rethans fad8e9a7b3 - Fixed ARG INFO 2011-06-06 16:17:45 +01:00
Derick Rethans 15de5334c2 - Added pseudo code 2011-06-06 16:16:58 +01:00