Menu

#52 GENERAL - Work on Phprojekt_ModelInformation_Interface

6.1
open
Back-end (42)
5
2009-07-03
2009-06-04
No

The Phprojekt_ModelInformation_Interface in its current form is present unaltered since its initial commit. This interface is very outdated and needs to be adjusted for the current needs.

1) It defines a method "getTitles" that is never used anywhere in P6. A commonly used default implementation simply returns an empty array instead of something useful.
2) The only other method returns an array that might fit the requirements of converting it into JSON metadata, but effectively makes it impossible to properly use for other purposes inside PHP, because it's internal structure is optimized for the JSON output. I think it is a good idea to add new methods that allow accessing this data with the scope of PHP usage.

To give an idea of what I mean have a look at application/Minutes/Models/ItemInformation.php. The ModelInformation class should be the single source of metadata for the model, and be able to deliver this data in pieces that are suitable for PHP usage. The current positioning of the information class inside the model is great, but the access methods need to be improved.

Discussion

  • Anonymous

    Anonymous - 2009-06-10

    Addionally: The method getFieldInformation has no parameter defined in the interface, but in reality needs a parameter for the ordering just like the IMO obsolete getTitles method.

     
  • Anonymous

    Anonymous - 2009-06-22
    • assigned_to: nobody --> gsolt
     
  • Gustavo Solt

    Gustavo Solt - 2009-07-03
    • milestone: 899257 --> 6.1
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.