Documentation

PA_Attachment
in package

The PuzzleAnywhere attachment class. It allows for attachment metadata info retrieval, general and puzzle url generation, and general and puzzle attachment retrieval.

Table of Contents

$attachment_name  : string
The internal base name for the attachment.
$byte_size  : int
The attachment byte size.
$download_count  : int
The number of times the attachment has been downloaded.
$download_url  : string
The attachment download URL.
$ext_type  : string
The attachment extension type.
$filename  : string
The attachment filename.
$full_name  : int
The base attachment name with mimetype.
$human_filesize  : string
A more readable filesize for the attachment.
$id  : int
The attachment ID.
$kbyte_size  : int
The attachment kbyte size.
$max_download_count  : int
The maximum number of times the attachment can be downloaded.
$mimetype  : string
The attachment mimetype.
$name  : string
The base name of the attachment.
$puzzle  : object
The PA_Puzzle object attached to the attachment.
$puzzle_id  : int
The puzzle ID the attachment belongs to.
$type  : string
The attachment type.
download_attachment()  : string
Returns the attachment data.
download_puzzle_attachment()  : string
Returns the puzzle attachment data.
download_puzzle_url()  : string
Retrieves the puzzle download URL.
download_url()  : string
Retrieves the attachment download URL.
get()  : object
Retrieves attachment metadata from the API server.

Properties

$download_count

The number of times the attachment has been downloaded.

public int $download_count

Defaults to puzzle_attachment.

The number of times the attachment has been downloaded. Defaults to puzzle_attachment.

$human_filesize

A more readable filesize for the attachment.

public string $human_filesize

A more readable filesize for the attachment.

$max_download_count

The maximum number of times the attachment can be downloaded.

public int $max_download_count

The maximum number of times the attachment can be downloaded.

Methods

download_attachment()

Returns the attachment data.

public download_attachment([mixed $subscr = false ]) : string
Parameters
$subscr : mixed = false
Return values
string

The attachment data.

download_puzzle_attachment()

Returns the puzzle attachment data.

public static download_puzzle_attachment(mixed $attachment_id[, mixed $subscr = false ]) : string
Parameters
$attachment_id : mixed
$subscr : mixed = false
Return values
string

The puzzle attachment data.

download_puzzle_url()

Retrieves the puzzle download URL.

public download_puzzle_url([mixed $subscr = false ]) : string
Parameters
$subscr : mixed = false
Return values
string

The puzzle download URL.

download_url()

Retrieves the attachment download URL.

public download_url() : string
Return values
string

The attachment download URL.

get()

Retrieves attachment metadata from the API server.

public static get(int $attachment_id) : object
Parameters
$attachment_id : int

The attachment ID

Return values
object

Search results