createdBy = new NullAccount(); $this->createdAt = new \DateTimeImmutable('now'); } /** * Get the path * * @return string * * @since 1.0.0 */ public function getVirtualPath() : string { return $this->virtualPath; } /** * Set the path if file * * @param string $path Path to file * * @return mixed * * @since 1.0.0 */ public function setVirtualPath(string $path) { $this->virtualPath = $path; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'title' => $this->title, 'plain' => $this->plain, 'content' => $this->content, 'createdAt' => $this->createdAt, 'createdBy' => $this->createdBy, ]; } /** * {@inheritdoc} */ public function __toString() { return (string) \json_encode($this->toArray()); } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } use \Modules\Media\Models\MediaListTrait; }