path = $path; return $this; } /** * Get path. * * @return string */ public function getPath() { return $this->path; } /** * Set comment. * * @param string $comment * * @return CDocument */ public function setComment($comment) { $this->comment = $comment; return $this; } /** * Get comment. * * @return string */ public function getComment() { return $this->comment; } /** * Set title. * * @param string $title * * @return CDocument */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title. * * @return string */ public function getTitle() { return $this->title; } /** * Set filetype. * * @param string $filetype * * @return CDocument */ public function setFiletype($filetype) { $this->filetype = $filetype; return $this; } /** * Get filetype. * * @return string */ public function getFiletype() { return $this->filetype; } /** * Set size. * * @param int $size * * @return CDocument */ public function setSize($size) { $this->size = $size; return $this; } /** * Get size. * * @return int */ public function getSize() { return $this->size; } /** * Set readonly. * * @param bool $readonly * * @return CDocument */ public function setReadonly($readonly) { $this->readonly = $readonly; return $this; } /** * Get readonly. * * @return bool */ public function getReadonly() { return $this->readonly; } /** * Set id. * * @param int $id * * @return CDocument */ public function setId($id) { $this->id = $id; return $this; } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * @return Course */ public function getCourse(): Course { return $this->course; } /** * @param Course $course * * @return CDocument */ public function setCourse($course) { $this->course = $course; return $this; } /** * @return int */ public function getIid() { return $this->iid; } /** * @return Session */ public function getSession() { return $this->session; } /** * @param Session $session * * @return CDocument */ public function setSession($session) { $this->session = $session; return $this; } /** * @ORM\PostPersist() * * @param LifecycleEventArgs $args * */ public function postPersist(LifecycleEventArgs $args) { // Update id with iid value $em = $args->getEntityManager(); $this->setId($this->iid); $em->persist($this); $em->flush($this); } // Resource classes public function getResourceIdentifier(): int { return $this->getIid(); } public function getResourceName(): string { return $this->getTitle(); } public function getToolName(): string { return 'document'; } public function __get($a) { } }