0

What's going wrong? Before I used static properties and methods and self::, but I now i don't need it. Don't know where is mistake.

class Main_PopupTemplate 
    {
        public $arg = null;

        public function setMark($k) {
            $this->arg = func_get_arg(0);
        }

        public function getMark() {
            $discTexts = $this->getArg();
            $result = isset($discTexts[$this->arg]) ? $discTexts[$this->arg] : null;

            return $result;
        }

        public static function getArg()
        {
            return array(
                'disclaimer-01' => 'Text-1',
                'disclaimer-02' => 'Text-2',
                'disclaimer-03' => 'Text-3',
                'disclaimer-04' => 'Text-4'
            );
        }
    }

1 Answers1

-1

Issue is solved. Method call was static :)

$selectPopupText = new Main_PopupTemplate;
$selectPopupText->setMark('disclaimer-03');
  • 1
    Please show how you fixed it. Otherwise, this is a totally useless answer and it should be deleted. – Barmar Dec 29 '15 at 17:16