Table of Contents
-
$_id
: ObjectId
-
$content
: string
-
$createTime
: int
-
$department
: ObjectId|null
-
$files
: array<string|int, mixed>
-
$group
: ObjectId|null
-
$isPublished
: bool
-
$lifeTime
: int
-
$organizationId
: ObjectId|null
-
$title
: string
-
$type
: string
-
__construct()
: mixed
-
__toString()
: string
-
addFile()
: self
-
bsonSerialize()
: array<string|int, mixed>
-
bsonUnserialize()
: void
-
deleteFileByIndex()
: self
-
getContent()
: string
-
getCreateTime()
: int
-
getDepartment()
: ObjectId|null
-
getFileByIndex()
: array<string|int, mixed>
-
getFiles()
: array<string|int, mixed>
-
getGroup()
: ObjectId|null
-
getId()
: ObjectId
-
getLifeTime()
: int
-
getOrganizationId()
: ObjectId|null
-
getTitle()
: string
-
getType()
: string
-
isPublished()
: bool
-
jsonSerialize()
: mixed
-
parseObjectId()
: ObjectId|null
-
setContent()
: self
-
setCreateTime()
: self
-
setDepartment()
: self
-
setFiles()
: self
-
setGroup()
: self
-
setId()
: self
-
setIsPublished()
: self
-
setLifeTime()
: self
-
setOrganizationId()
: NewsEntity
-
setTitle()
: self
-
setType()
: self
-
toArray()
: array<string|int, mixed>
$_id
protected
ObjectId
$_id
$content
private
string
$content
= ''
$createTime
private
int
$createTime
$department
private
ObjectId|null
$department
= null
$files
private
array<string|int, mixed>
$files
= []
$group
private
ObjectId|null
$group
= null
$isPublished
private
bool
$isPublished
= false
$lifeTime
private
int
$lifeTime
$organizationId
private
ObjectId|null
$organizationId
$title
private
string
$title
$type
private
string
$type
__construct()
public
__construct(string $title, ObjectId|null $organizationId, string $type[, ObjectId|null $id = null ]) : mixed
Parameters
-
$title
: string
-
-
$organizationId
: ObjectId|null
-
-
$type
: string
-
-
$id
: ObjectId|null
= null
-
Return values
mixed
—
__toString()
public
__toString() : string
Return values
string
—
addFile()
public
addFile(array<string|int, mixed> $file) : self
Parameters
-
$file
: array<string|int, mixed>
-
Return values
self
—
bsonSerialize()
public
bsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>
—
bsonUnserialize()
public
bsonUnserialize(array<string|int, mixed> $data) : void
Parameters
-
$data
: array<string|int, mixed>
-
Return values
void
—
deleteFileByIndex()
public
deleteFileByIndex(int $index) : self
Parameters
-
$index
: int
-
Return values
self
—
getContent()
public
getContent() : string
Return values
string
—
getCreateTime()
public
getCreateTime() : int
Return values
int
—
getDepartment()
public
getDepartment() : ObjectId|null
Return values
ObjectId|null
—
getFileByIndex()
public
getFileByIndex(int $index) : array<string|int, mixed>
Parameters
-
$index
: int
-
Return values
array<string|int, mixed>
—
getFiles()
public
getFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>
—
getGroup()
public
getGroup() : ObjectId|null
Return values
ObjectId|null
—
getId()
public
getId() : ObjectId
Return values
ObjectId
—
getLifeTime()
public
getLifeTime() : int
Return values
int
—
getOrganizationId()
public
getOrganizationId() : ObjectId|null
Return values
ObjectId|null
—
getTitle()
public
getTitle() : string
Return values
string
—
getType()
public
getType() : string
Return values
string
—
isPublished()
public
isPublished() : bool
Return values
bool
—
jsonSerialize()
public
jsonSerialize() : mixed
Return values
mixed
—
parseObjectId()
public
static parseObjectId(mixed $objectId) : ObjectId|null
Parameters
-
$objectId
: mixed
-
Return values
ObjectId|null
—
setContent()
public
setContent(string $content) : self
Parameters
-
$content
: string
-
Return values
self
—
setCreateTime()
public
setCreateTime(int $createTime) : self
Parameters
-
$createTime
: int
-
Return values
self
—
setDepartment()
public
setDepartment(ObjectId|null $department) : self
Parameters
-
$department
: ObjectId|null
-
Return values
self
—
setFiles()
public
setFiles(array<string|int, mixed> $files) : self
Parameters
-
$files
: array<string|int, mixed>
-
Return values
self
—
setGroup()
public
setGroup(ObjectId|null $group) : self
Parameters
-
$group
: ObjectId|null
-
Return values
self
—
setId()
public
setId(ObjectId $id) : self
Parameters
-
$id
: ObjectId
-
Return values
self
—
setIsPublished()
public
setIsPublished(bool $isPublished) : self
Parameters
-
$isPublished
: bool
-
Return values
self
—
setLifeTime()
public
setLifeTime(int $lifeTime) : self
Parameters
-
$lifeTime
: int
-
Return values
self
—
setOrganizationId()
public
setOrganizationId(ObjectId|null $organizationId) : NewsEntity
Parameters
-
$organizationId
: ObjectId|null
-
Return values
NewsEntity
—
setTitle()
public
setTitle(string $title) : self
Parameters
-
$title
: string
-
Return values
self
—
setType()
public
setType(string $type) : self
Parameters
-
$type
: string
-
Return values
self
—
toArray()
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
—