Review main Merged Breaking

39585[!!!][CLEANUP] ObjectAccess

Claus Due CR +2 V +2 Hard +150 −101 updated 07/15/17, 16:55

Commit message

This patch aims to clean up and improve the
ObjectAccess class which currently does a
*lot* of unnecessary operations, but is intended
for use in many places especially with repeated
use. Therefore, any even small optimisation in
this class would be a benefit.

* Uses more native PHP methods where reasonable
* Uses fewer method calls where reasonable
* Gets rid of a variable passed by reference
* More cases return NULL rather than throw Exceptions
* Fastest decisions and access methods come first
* Reflection-based access isolated to edge cases and
  access with the "force" flag being TRUE.
* Sacrifices ability to read objects of types other
  than persisted objects contained in an ObjectStorage
  or subclass of ObjectStorage.
* Changes verdict from FALSE to TRUE when determining
  if a dynamically added property exists on an object
  (these are, by definition, publicly accessible).

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3