public function __construct(array $data) { foreach ($data as $key => &$email) { $email = new CleanEmail($email); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$phone) { $phone = new CleanPhone($phone); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$address) { $address = new CleanAddress($address); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$passport) { $passport = new CleanPassport($passport); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$date) { $date = new CleanDate($date); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$vehicle) { $vehicle = new CleanVehicle($vehicle); } parent::__construct($data); }
public function __construct(array $data) { foreach ($data as $key => &$name) { $name = new CleanName($name); } parent::__construct($data); }
public function __construct(RequestInterface $request, ResponseInterface $response) { $payload = $response->json(); $this->id = $payload['id']; $result = $payload['result']; $this->status = []; if (isset($result['status'])) { $this->status = $result['status']; unset($result['status']); } parent::__construct($result); }
/** * Constructs the PostObject * * The options array accepts the following keys: * * - acl: The access control setting to apply to the uploaded file. Accepts * any of the CannedAcl constants. * - Cache-Control: The Cache-Control HTTP header value to apply to the * uploaded file * - Content-Disposition: The Content-Disposition HTTP header value to * apply to the uploaded file * - Content-Encoding: The Content-Encoding HTTP header value to apply to * the uploaded file. * - Content-Type: The Content-Type HTTP header value to apply to the * uploaded file. The default value is `application/octet-stream`. * - Expires: The Expires HTTP header value to apply to the uploaded file * - key: The location where the file should be uploaded to. The default * value is `^${filename}` which will use the name of the uploaded file. * - policy: A raw policy in JSON format. By default, the PostObject * creates one for you. * - policy_callback: A callback used to modify the policy before encoding * and signing it. The method signature for the callback should accept an * array of the policy data as the 1st argument, (optionally) the * PostObject as the 2nd argument, and return the policy data with the * desired modifications. * - success_action_redirect: The URI for Amazon S3 to redirect to upon * successful upload. * - success_action_status: The status code for Amazon S3 to return upon * successful upload. * - ttd: The expiration time for the generated upload form data * - x-amz-meta-*: Any custom meta tag that should be set to the object * - x-amz-server-side-encryption: The server-side encryption mechanism to * use * - x-amz-storage-class: The storage setting to apply to the object * - x-amz-storage-class: The storage setting to apply to the object * - x-amz-server-side-encryption-customer-algorithm: The SSE-C algorithm * - x-amz-server-side-encryption-customer-key: The SSE-C secret key * - x-amz-server-side-encryption-customer-key-MD5: MD5 hash of the * SSE-C customer secret key * * For the Cache-Control, Content-Disposition, Content-Encoding, * Content-Type, Expires, and key options, to use a "starts-with" comparison * instead of an equals comparison, prefix the value with a ^ (carat) * character. * * @param S3Client $client Client used with the POST object * @param string $bucket Bucket to use * @param array $options Associative array of options */ public function __construct(S3Client $client, $bucket, array $options = []) { $this->client = $client; $this->bucket = $bucket; parent::__construct($options); }