P4A 3 commit digest
Jan 28, 2008 -
10 Comments
Hi to all and welcome to the P4A 3 commit digest of this week :-)
Let’s start saying that I worked a lot porting to PHP5 all P4A core objects and widgets (the only one left behind is the db_navigator, I’ll work on it soon) so now we finally have a full PHP5 code, I still need to work on strict validation but most of the work is done. Having a full PHP5 code raised some bugs, cause we sometimes used to access to private variables from outside an object and this is not possible anymore, so I’ve added a few methods and patched some code, now everything is a lot more clean. I also fixed some small graphical issues with P4A_Buttons within toolbars. I also worked a bit on making P4A work with oracle, we’re almost there :) Then I added a new and improved version of P4A_Base_Mask (which uses system messages instead of P4A_Messages) to the core and ported the products_catalogue application to it, doing that made me remove a lot of code, all now is clean and much more readable. I also put a definitive fix to the addslashes issue, we add some getSQLvalue() methods within P4A, now they use the “double single quote” instead of addslashes, this is the right SQL behaviour and anyway addslashes has been marked deprecated within PHP.
These were a few things I wanted to point out, now let’s take a look at the changelog:
- P4A::init() method was removed
- helpers, P4A_Box, P4A_Object, P4A_Button, P4A_Collection, P4A_Field, P4A_Array_Source, P4A_DB_Source, P4A_Widget, P4A_Mask, P4A, P4A_Frame, P4A_Fieldset, P4A_Label, P4A_Line, P4A_Link, P4A_Menu, P4A_Menu_Item and P4A_Canvas were php5ized
- P4A_Widget::composeStringClassStyle() was rewritten and renamed to composeStringClass()
- P4A_Toolbar default size is now 32
- P4A_Button now inherits height from toolbar (just done via CSS)
- P4A_Mask::setIcon() now supports a path to an image instead of the icon name
- P4A_Fieldset::setTitle() and getTitle() methods were removed cause deprecated, use setLabel() and getLabel() instead
- P4A::getPopupMask() and getPopupMaskName() methods were added
- P4A_Mask::getFocusedObjectId() method was added
- P4A_Link::setLabel() method was removed ’cause inherited from P4A_Widget
- P4A_Menu_Item::setAccessKey() and getAccessKey() methods were removed ’cause inherited from P4A_Widget
- P4A_Table::addToolbar() and newToolbar() methods were removed ’cause not implemented
- P4A_Table::addNavigationBar() method was removed
- P4A_Menu_Item::setIcon() now supports a path to an image instead of the icon name
- P4A_Sheet was removed ’cause had too many performance issues and it should be rewritten
- FCKEditor was updated to 2.5.1
- “oracle” was renamed to “oci” within P4A_DB to reflect PDO naming
- P4A_DB_Source::setSchema() and getSchema() methods were added
- some minor bugfixes to P4A_DB_Source were applied in order to make oracle work
- P4A_Generate_Default_Label() global function now turns the original label lowercase before applying the default rules, this is due for databases which returns uppercase field names
- a new version of P4A_Base_Mask was added to the core
- “products catalogue” sample app was ported to P4A_Base_Mask
- sample_en, sample_it and sample_i18n applications were removed
- some minor enhancements were made to products_catalogue sample
- P4A_Widget::intercept() and implementMethod() methods now automatically call the addAction() method when the event is recognized as a browser event
- P4A_Data_Field::getSQLValue() and getSQLNewValue() now returns data quoted with “double single quote” instead using addslashes (which is deprecated and not working for oracle)
- P4A_Object::dropIntercept() method was removed
- P4A_Object::dropMethod() method was added
- P4A_Object::destroy() method now does not unset the variable from parent but sets it to null
- a bug with P4A_Object::destroy() was solved, it happened when destroying an object directly stored in the $p4a object
Now, my TODO is getting thinner and, if I’ll have time, we could have a sort of preview release in a few weeks, anyway:
- implement application level translations
- port products_catalogue to the new translation system
- change p4a_table_col image handling, we’ve to pass by index.php and not phpthumb.php
- implement p4a_table::addCheckboxCol
- p4a_table action col should also support html (for images)
- implement errors with exceptions
- redo the css
- check if p4a_validate can be ported to ZF, maybe drop p4a_validate, add a valitator to p4a_field, user could add a ZF validator object to the field
- php5ize db_navigator
as you can see, some things are new features, some others are tasks for the sample applications… this means we’ve almost completed our work also if I know I got to check other few things within the P4A 3 core programming. Anyway see you next week with a new digest :-)
Filed in: P4A, PHP, Things I do











