Skip to content
Snippets Groups Projects
Commit ddaa91c0 authored by Claus Due's avatar Claus Due Committed by Markus Klein
Browse files

[!!!][CLEANUP] ObjectAccess

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).

Change-Id: Ib17051a43f61bb73a1bd5a8a6c710f54eec8f769
Resolves: #66995
Releases: master
Reviewed-on: https://review.typo3.org/39585


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent e2597b25
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment