Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an array
is_array(mixed $value): bool
public function __construct($event)
{
if (
! is_array($event) ||
! isset($event['requestContext']['routeKey']) ||
! isset($event['requestContext']['eventType']) ||
! isset($event['requestContext']['connectionId']) ||
{
if (
! is_array($event) ||
! isset($event['requestContext']['routeKey']) ||
! isset($event['requestContext']['eventType']) ||
! isset($event['requestContext']['connectionId']) ||
public function __construct($event)
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('DynamoDB', $event);
}
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('DynamoDB', $event);
}
public function __construct($record)
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:dynamodb') {
throw new \InvalidArgumentException('Event source must come from DynamoDB');
}
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:dynamodb') {
throw new \InvalidArgumentException('Event source must come from DynamoDB');
}
public function __construct($event)
{
if (! is_array($event) || ! isset($event['detail-type'])) {
throw new InvalidLambdaEvent('EventBridge', $event);
}
$this->event = $event;
{
if (! is_array($event) || ! isset($event['detail-type'])) {
throw new InvalidLambdaEvent('EventBridge', $event);
}
$this->event = $event;
if (isset($responseHeaders['status'])) {
$status = (int) (is_array($responseHeaders['status']) ? $responseHeaders['status'][0] : $responseHeaders['status']);
unset($responseHeaders['status']);
}
$status = (int) (is_array($responseHeaders['status']) ? $responseHeaders['status'][0] : $responseHeaders['status']);
unset($responseHeaders['status']);
}
if ($multiHeaders) {
$headers[$name] = is_array($values) ? $values : [$values];
} else {
$headers[$name] = is_array($values) ? end($values) : $values;
$headers[$name] = is_array($values) ? $values : [$values];
} else {
$headers[$name] = is_array($values) ? end($values) : $values;
$headers[$name] = is_array($values) ? $values : [$values];
} else {
$headers[$name] = is_array($values) ? end($values) : $values;
}
}
} else {
$headers[$name] = is_array($values) ? end($values) : $values;
}
}
$name = $this->capitalizeHeaderName($name);
if ($name === 'Set-Cookie') {
$cookies = is_array($values) ? $values : [$values];
} else {
if ($name === 'Set-Cookie') {
$cookies = is_array($values) ? $values : [$values];
} else {
} else {
$headers[$name] = is_array($values) ? end($values) : $values;
}
}
$headers[$name] = is_array($values) ? end($values) : $values;
}
}
public function __construct($event)
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('Kinesis', $event);
}
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('Kinesis', $event);
}
public function __construct($record)
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:kinesis') {
throw new \InvalidArgumentException('Event source must come from Kinesis');
}
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:kinesis') {
throw new \InvalidArgumentException('Event source must come from Kinesis');
}
public function __construct($event)
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('S3', $event);
}
$this->event = $event;
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('S3', $event);
}
$this->event = $event;
public function __construct($record)
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:s3') {
throw new InvalidArgumentException;
}
$this->record = $record;
{
if (! is_array($record) || ! isset($record['eventSource']) || $record['eventSource'] !== 'aws:s3') {
throw new InvalidArgumentException;
}
$this->record = $record;
public function __construct($event)
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('SNS', $event);
}
$this->event = $event;
{
if (! is_array($event) || ! isset($event['Records'])) {
throw new InvalidLambdaEvent('SNS', $event);
}
$this->event = $event;
public function __construct($record)
{
if (! is_array($record) || ! isset($record['EventSource']) || $record['EventSource'] !== 'aws:sns') {
throw new InvalidArgumentException;
}
$this->record = $record;
{
if (! is_array($record) || ! isset($record['EventSource']) || $record['EventSource'] !== 'aws:sns') {
throw new InvalidArgumentException;
}
$this->record = $record;