Comments for "PHP_ArrayOf"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • Chuck Burgess  [2007-12-03 15:38 UTC]

    Looks well organized.

    I'm curious about using trigger_error() in the offsetGet() method though. If the overall intent is strong typing behavior, would you want this attempt to use a non-existent array offset to go unnoticed by anything but a PHP Notice? I'd probably lean towards an exception here, to stay consistent with enforcing strong typing and your otherwise global use of exceptions... Java would give you an ArrayIndexOutOfBounds exception in such a scenario. Not doing so seems to lean back a little towards PHP's weak typing.

    I do like this package, though. I'm actually curious to see if there are other packages that create strong typing wrappers for PHP, thereby avoiding other pushes for PHP itself to become more strongly typed. Using this to start a group of such packages together into a strong-typed object library would make sense to me.
  • Philippe Jausions  [2008-03-05 19:37 UTC]

    I could go with removing the trigger_error on unknown indexes. I need to put some more unit tests in place, so I can push the package forward.

    Anybody else has comments?
  • Philippe Jausions  [2008-04-15 16:19 UTC]

    - Added PHPT regression tests
    - Accessing an unavailable offset / index now throws an exception
    - Now constructor also accepts ArrayObject instances

    I'd like to call for votes in about a week.