title: Ajax call method from class php
body: <p>Hi ,</p>
  
  <p>I want to call a method from a class through ajax.
    The class is something like this :</p>
  
  <pre><code>class MyClass{
        public function myMethod($someParameter,$someParameter2){
            //do something
            return $something;
        }
        private function myMethod2($someParameter3){
            //do something
            return something;
        }
  
  }
  </code></pre>
  
  <p>Can i use ajax to call a class method (myMetod(2,3)) and with the return to do someting?
     Can i use it like this?</p>
  
  <pre><code>$.ajax({
          url : 'myClass.php',
          data : {
                      someData: '2,3',
                 }
          type : 'POST' ,
          success : function(output){
                    alert(output)
          }
  });
  </code></pre>