title: PHP Amazon Ses as an abstract class gives use fatal error
body: <p>I'm using the Amazon Simple Email Service and am trying to implement it as an abstract class so that I can simply use it throughout as needed.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>The problem occurs with the use, I cannot work out how to require the files and classes needed to use <code>Ses</code> as an abstract class without incurring errors.</p>
  
  <pre><code>require 'lib/aws/aws-autoloader.php';
  
  use Aws\Common\Enum\Region;
  use Aws\Ses\SesClient;
  
  abstract class simpleemail {
  
      function sendSesEmail($to, $subject, $body, $bodyHtml){
  
          try {   
              $client = SesClient::factory(array(
                  'key' =&gt; "",
                  'secret' =&gt; "",
                  'region' =&gt; Region::US_EAST_1
              ));
  
              $send = $client-&gt;sendEmail(array(
                  'Source' =&gt; 'Name &lt;no-reply@contact.com&gt;',
                  'Destination' =&gt; array('ToAddresses' =&gt; array($to)),
                  'Message' =&gt; array('Subject' =&gt; array('Data' =&gt; $subject), 'Body' =&gt; array('Html' =&gt; array('Data' =&gt; $bodyHtml)))));
  
              return true;
          }
          catch(Exception $e){
              echo $e-&gt;getMessage();
              return false;
          }
      }
  }
  </code></pre>
  
  <p><strong>Error Messages</strong></p>
  
  <p><code>Fatal error: Class 'Aes\Ses\SesClient' not found in ....</code></p>
  
  <p>I have tried changing the <code>use</code> to require but then get:</p>
  
  <pre><code>require 'lib/aws/Aws/Common/Enum/Region.php';
  require 'lib/aws/Aws/Ses/SesClient.php';
  </code></pre>
  
  <p><code>Fatal error: 'SesClient' not found in ...</code></p>
  
  <p><strong>Solution?</strong></p>
  
  <p>How can I use/require the files I need to get this working inside an abstract class?</p>