php oop private method refrence <p>I have a controller class called "query" and another class named "language" to detect the language from the browser and verify it to be one of the available ones. my code looks like this :</p> <p>in the controller : </p> <pre><code>Language::detect(); </code></pre> <p>in the "language" class :</p> <pre><code>public function detect() { $this-&gt;_verify(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2)); } private function _verify($input) { $languages=array ( 'English' =&gt; 'en', 'German' =&gt; 'de', ); if (in_array($input,$languages)) { echo $input; } } </code></pre> <p>the problem is it seems like the method _verify() is called as if it belongs to the controller and I get a "Fatal error: Call to undefined method ....."</p> <p>how would I go about calling it so it looks for it within the same class?</p> <p>thank you</p>