[TYPO3-50-general] Strange behavior of $this->SERVER in Utility\Environment

Christoph Blömer chbloemer at gmx.net
Fri Jan 23 05:11:04 CET 2009


Hello,
I'm currently trying to extend the \F3\FLOW3\Utility\Environment class.

This is what I'm doing. I need to add some more REQUEST_METHOD to the 
Environment.

So I basically did this:

class Environment extends \F3\FLOW3\Utility\Environment {
    public function getRequestMethod() {
        echo("_".$this->SERVER['REQUEST_METHOD']."_");
    }
}

After that I changed the Object.yaml of the package to:

F3\FLOW3\MVC\Web\RequestHandler:
  arguments:
    2: { object: F3\WebDAV\Utility\Environment }

This replaces the Environment with the new one in the package.

The methods gets called and shows: __
But it should show: _GET_

I also added a echo to the getRequestMethod of the parent class to check 
if its working their.
It shows: _GET_ as expected.

So why is it not possible to read the $this->SERVER variable in the 
child class???

Anybody a idea?

Greetings
Christoph




More information about the TYPO3-project-5_0-general mailing list