title: Wordpress - return the class variables/function from shortcode function?
body: <p>How to return the class variables/function from the shortcode method?</p>
  
  <pre><code>class MyClass
  {
      private $content;
  
      function MyClass()
      {
          $this-&gt;content= "value";
      }
  
      public function getContent()
      {
          ob_start();
          print "This is content: ". $this-&gt;content;
          $output = ob_get_contents();
          ob_end_clean();
          return $this-&gt;content;
      }
  }
  add_shortcode('architects-side', array( 'MyClass', 'getContent' )); // not work
  </code></pre>
  
  <p>The problem is that not work because I use <code>$this-&gt;content</code> in <code>getContent()</code>, what is the right way to use variables/functions in <code>getContent()</code>?</p>