Comment
extends Collection
in package
Extension to the regular Google\Model that automatically exposes the items array for iteration, so you can just iterate over the object rather than a reference inside.
Table of Contents
Constants
- NULL_VALUE = "{}gapi-php-null"
- If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE instead - it will be replaced when converting to JSON with a real null.
Properties
- $anchor : mixed
- $content : mixed
- $createdTime : mixed
- $deleted : mixed
- $htmlContent : mixed
- $id : mixed
- $kind : mixed
- $modifiedTime : mixed
- $resolved : mixed
- $authorDataType : mixed
- $authorType : mixed
- $collection_key : mixed
- $internal_gapi_mappings : mixed
- $modelData : mixed
- $processed : mixed
- $quotedFileContentDataType : mixed
- $quotedFileContentType : mixed
- $repliesDataType : mixed
- $repliesType : mixed
Methods
- __construct() : mixed
- Polymorphic - accepts a variable number of arguments dependent on the type of the model subclass.
- __get() : mixed
- Getter that handles passthrough access to the data array, and lazy object creation.
- __isset() : mixed
- __unset() : mixed
- assertIsArray() : mixed
- Verify if $obj is an array.
- count() : mixed
- current() : mixed
- getAnchor() : mixed
- getAuthor() : User
- getContent() : mixed
- getCreatedTime() : mixed
- getDeleted() : mixed
- getHtmlContent() : mixed
- getId() : mixed
- getKind() : mixed
- getModifiedTime() : mixed
- getQuotedFileContent() : CommentQuotedFileContent
- getReplies() : array<string|int, Reply>
- getResolved() : mixed
- key() : mixed
- next() : mixed
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- rewind() : mixed
- setAnchor() : mixed
- setAuthor() : mixed
- setContent() : mixed
- setCreatedTime() : mixed
- setDeleted() : mixed
- setHtmlContent() : mixed
- setId() : mixed
- setKind() : mixed
- setModifiedTime() : mixed
- setQuotedFileContent() : mixed
- setReplies() : mixed
- setResolved() : mixed
- toSimpleObject() : mixed
- Create a simplified object suitable for straightforward conversion to JSON. This is relatively expensive due to the usage of reflection, but shouldn't be called a whole lot, and is the most straightforward way to filter.
- valid() : mixed
- dataType() : mixed
- gapiInit() : mixed
- Blank initialiser to be used in subclasses to do post-construction initialisation - this avoids the need for subclasses to have to implement the variadics handling in their constructors.
- isAssociativeArray() : bool
- Returns true only if the array is associative.
- keyType() : mixed
- mapTypes() : void
- Initialize this object's properties from an array.
- camelCase() : string
- Convert a string to camelCase
- coerceType() : mixed
- getMappedName() : mixed
- If there is an internal name mapping, use that.
- getSimpleValue() : mixed
- Handle different types of values, primarily other objects and map and array data types.
- nullPlaceholderCheck() : mixed
- Check whether the value is the null placeholder and return true null.
Constants
NULL_VALUE
If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE instead - it will be replaced when converting to JSON with a real null.
public
mixed
NULL_VALUE
= "{}gapi-php-null"
Properties
$anchor
public
mixed
$anchor
$content
public
mixed
$content
$createdTime
public
mixed
$createdTime
$deleted
public
mixed
$deleted
$htmlContent
public
mixed
$htmlContent
$id
public
mixed
$id
$kind
public
mixed
$kind
$modifiedTime
public
mixed
$modifiedTime
$resolved
public
mixed
$resolved
$authorDataType
protected
mixed
$authorDataType
= ''
$authorType
protected
mixed
$authorType
= \Google\Service\Drive\User::class
$collection_key
protected
mixed
$collection_key
= 'replies'
$internal_gapi_mappings
protected
mixed
$internal_gapi_mappings
= array()
$modelData
protected
mixed
$modelData
= array()
$processed
protected
mixed
$processed
= array()
$quotedFileContentDataType
protected
mixed
$quotedFileContentDataType
= ''
$quotedFileContentType
protected
mixed
$quotedFileContentType
= \Google\Service\Drive\CommentQuotedFileContent::class
$repliesDataType
protected
mixed
$repliesDataType
= 'array'
$repliesType
protected
mixed
$repliesType
= \Google\Service\Drive\Reply::class
Methods
__construct()
Polymorphic - accepts a variable number of arguments dependent on the type of the model subclass.
public
final __construct() : mixed
__get()
Getter that handles passthrough access to the data array, and lazy object creation.
public
__get(string $key) : mixed
Parameters
- $key : string
-
Property name.
Return values
mixed —The value if any, or null.
__isset()
public
__isset(mixed $key) : mixed
Parameters
- $key : mixed
__unset()
public
__unset(mixed $key) : mixed
Parameters
- $key : mixed
assertIsArray()
Verify if $obj is an array.
public
assertIsArray(array<string|int, mixed> $obj, string $method) : mixed
Parameters
- $obj : array<string|int, mixed>
-
Items that should be validated.
- $method : string
-
Method expecting an array as an argument.
Tags
count()
public
count() : mixed
current()
public
current() : mixed
getAnchor()
public
getAnchor() : mixed
getAuthor()
public
getAuthor() : User
Return values
UsergetContent()
public
getContent() : mixed
getCreatedTime()
public
getCreatedTime() : mixed
getDeleted()
public
getDeleted() : mixed
getHtmlContent()
public
getHtmlContent() : mixed
getId()
public
getId() : mixed
getKind()
public
getKind() : mixed
getModifiedTime()
public
getModifiedTime() : mixed
getQuotedFileContent()
public
getQuotedFileContent() : CommentQuotedFileContent
Return values
CommentQuotedFileContentgetReplies()
public
getReplies() : array<string|int, Reply>
Return values
array<string|int, Reply>getResolved()
public
getResolved() : mixed
key()
public
key() : mixed
next()
public
next() : mixed
offsetExists()
public
offsetExists(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
rewind()
public
rewind() : mixed
setAnchor()
public
setAnchor(mixed $anchor) : mixed
Parameters
- $anchor : mixed
setAuthor()
public
setAuthor(User $author) : mixed
Parameters
- $author : User
setContent()
public
setContent(mixed $content) : mixed
Parameters
- $content : mixed
setCreatedTime()
public
setCreatedTime(mixed $createdTime) : mixed
Parameters
- $createdTime : mixed
setDeleted()
public
setDeleted(mixed $deleted) : mixed
Parameters
- $deleted : mixed
setHtmlContent()
public
setHtmlContent(mixed $htmlContent) : mixed
Parameters
- $htmlContent : mixed
setId()
public
setId(mixed $id) : mixed
Parameters
- $id : mixed
setKind()
public
setKind(mixed $kind) : mixed
Parameters
- $kind : mixed
setModifiedTime()
public
setModifiedTime(mixed $modifiedTime) : mixed
Parameters
- $modifiedTime : mixed
setQuotedFileContent()
public
setQuotedFileContent(CommentQuotedFileContent $quotedFileContent) : mixed
Parameters
- $quotedFileContent : CommentQuotedFileContent
setReplies()
public
setReplies(mixed $replies) : mixed
Parameters
- $replies : mixed
setResolved()
public
setResolved(mixed $resolved) : mixed
Parameters
- $resolved : mixed
toSimpleObject()
Create a simplified object suitable for straightforward conversion to JSON. This is relatively expensive due to the usage of reflection, but shouldn't be called a whole lot, and is the most straightforward way to filter.
public
toSimpleObject() : mixed
valid()
public
valid() : mixed
dataType()
protected
dataType(mixed $key) : mixed
Parameters
- $key : mixed
gapiInit()
Blank initialiser to be used in subclasses to do post-construction initialisation - this avoids the need for subclasses to have to implement the variadics handling in their constructors.
protected
gapiInit() : mixed
isAssociativeArray()
Returns true only if the array is associative.
protected
isAssociativeArray(array<string|int, mixed> $array) : bool
Parameters
- $array : array<string|int, mixed>
Return values
bool —True if the array is associative.
keyType()
protected
keyType(mixed $key) : mixed
Parameters
- $key : mixed
mapTypes()
Initialize this object's properties from an array.
protected
mapTypes(array<string|int, mixed> $array) : void
Parameters
- $array : array<string|int, mixed>
-
Used to seed this object's properties.
camelCase()
Convert a string to camelCase
private
camelCase(string $value) : string
Parameters
- $value : string
Return values
stringcoerceType()
private
coerceType(mixed $offset) : mixed
Parameters
- $offset : mixed
getMappedName()
If there is an internal name mapping, use that.
private
getMappedName(mixed $key) : mixed
Parameters
- $key : mixed
getSimpleValue()
Handle different types of values, primarily other objects and map and array data types.
private
getSimpleValue(mixed $value) : mixed
Parameters
- $value : mixed
nullPlaceholderCheck()
Check whether the value is the null placeholder and return true null.
private
nullPlaceholderCheck(mixed $value) : mixed
Parameters
- $value : mixed