Was bedeutet das? "Parse-Fehler: Syntaxfehler, unerwarteter T_PAAMAYIM_NEKUDOTAYIM"

T_PAAMAYIM_NEKUDOTAYIM klingt wirklich exotisch, ist für mich aber mit Sicherheit ein absoluter Unsinn. Ich habe alles auf diese Codezeilen zurückgeführt:

<?php
Class Context {
    protected $config;

    public function getConfig($key) { // Here's the problem somewhere...
    $cnf = $this->config;
    return $cnf::getConfig($key);
    }

    function __construct() {
    $this->config = new Config();
    }
}
?>

Im Konstruktor erstelle ich ein Config-Objekt. Hier ist die Klasse:

final class Config {
    private static $instance = NULL;
    private static $config;

    public static function getConfig($key) {
    return self::$config[$key];
    }

    public static function getInstance() {
    if (!self::$instance) {
        self::$instance = new Config();
    }
    return self::$instance;
    }

    private function __construct() {
    // include configuration file
    include __ROOT_INCLUDE_PATH . '/sys/config/config.php'; // defines a $config array
    $this->config = $config;
    }
}

Keine Ahnung warum das nicht geht / was der Fehler bedeutet ...

Antworten auf die Frage(7)

Ihre Antwort auf die Frage