task = $task; $this->type = $controller->getDirectoryType(); $this->key = $controller->getObjectKey(); $this->object = $object; $this->controller = $controller; } /** * @return AbstractController */ public function getController(): AbstractController { return $this->controller; } /** * @return FlexDirectoryInterface */ public function getDirectory(): FlexDirectoryInterface { return $this->getController()->getDirectory(); } /** * @return FlexObjectInterface * @phpstan-return T */ public function getModifiedObject(): FlexObjectInterface { return $this->object; } /** * @return FlexObjectInterface * @phpstan-return T */ public function getOriginalObject(): FlexObjectInterface { return $this->controller->getObject(); } /** * @return FlexCollectionInterface * @phpstan-return C */ public function getCollection(): FlexCollectionInterface { return $this->getController()->getDirectory()->getCollection(); } }