Sorry, it's been a very long time since I wrote this question and I still hadn't read the answer.
I was referring to access level protection “violation”, like this:
$objClass->strFormId
It seems strange to me to see code accessing the internal PROTECTED properties of an ordinary instance in a context unrelated to that specific instance (not “$this”, not “self”, not “static” or “parent”...). It's completely normal when accessing properties related to the current context (using shortcuts like “$this”, “self”...), but not in an instance not related to the current context.
For instance:
<?php
class MyClass {
protected $strProperty;
public function MyMethod($mixValue) {
// This is totally normal.
$this->strProperty = $mixValue;
// But this is weird, as we're accessing a protected property of OTHER instance.
$objInstance = new MyClass();
$objInstance->strProperty = $mixValue;
}
}
?>
I couldn't imagine that was allowed. From my point of view, using protected properties of an ordinary object instance from a static method (or from any other context external to the instance being accessed) is a context abuse and should not be permitted by PHP, as it violates the “black box” nature of objects in OOP.