title: How can use switch case statement using class names as case in php?
body: <p>Is there a way to use the class names as cases in the folowing example? (pseudo code)</p>
  
  <pre><code>class Some_Class {
  
      static function get_image_size() {
  
          switch (get_class($image_size)) {
  
              case 'Class_1':
                          $image_size = 'related-post';
                          break;
                      }
              case 'Class_2':
                          $image_size = 'full';
                          break;
                      }                   
  
                          return $image_size;
  
                      }
  
  }
  </code></pre>
  
  <p>I need this to call a specific variable form different php classes.
  Basically I need something like the following code but using switch statement:</p>
  
  <pre><code>class Some_class {
  
      static function get_image_size() {
  
          if Class_Name_1 {
              $image_size = 'related-post';
          }
  
          elseif Class_Name_2 {
              $image_size = 'full';
          }                   
  
          return $image_size;
  
      }
  
  }
  </code></pre>
  
  <p>Thanks.</p>