对于旧版本的 php 5.2 和更早版本,我应该使用什么代替命名空间,使用下面的代码会给出错误解析错误:语法错误,意外的 T_STRING
<?php
namespace Aws\Tests\CloudWatch;
use Aws\CloudSearch\CloudSearchClient;
class CloudSearchClientTest extends \Guzzle\Tests\GuzzleTestCase
{
/**
* @covers Aws\CloudSearch\CloudSearchClient::factory
*/
public function testFactoryInitializesClient()
{
$client = CloudSearchClient::factory(array(
'key' => 'foo',
'secret' => 'bar',
'region' => 'us-east-1'
));
$this->assertInstanceOf('Aws\Common\Signature\SignatureV4', $this->readAttribute($client, 'signature'));
$this->assertInstanceOf('Aws\Common\Credentials\Credentials', $client->getCredentials());
$this->assertEquals('https://cloudsearch.us-east-1.amazonaws.com', $client->getBaseUrl());
}
}