namespace OCP\TextProcessing;
use OCP\IL10N;
+use OCP\L10N\IFactory;
/**
* This is the text processing task type for free prompting
* @since 27.1.0
*/
class FreePromptTaskType implements ITaskType {
+ private IL10N $l;
+
/**
* Constructor for FreePromptTaskType
*
- * @param IL10N $l
+ * @param IFactory $l10nFactory
* @since 27.1.0
*/
public function __construct(
- private IL10N $l,
+ IFactory $l10nFactory,
) {
+ $this->l = $l10nFactory->get('core');
}
namespace OCP\TextProcessing;
use OCP\IL10N;
+use OCP\L10N\IFactory;
/**
* This is the text processing task type for creating headline
* @since 27.1.0
*/
class HeadlineTaskType implements ITaskType {
+ private IL10N $l;
+
/**
* Constructor for HeadlineTaskType
*
- * @param IL10N $l
+ * @param IFactory $l10nFactory
* @since 27.1.0
*/
public function __construct(
- private IL10N $l,
+ IFactory $l10nFactory,
) {
+ $this->l = $l10nFactory->get('core');
}
* @since 27.1.0
*/
public function getDescription(): string {
- return $this->l->t('Generates a possible headline for a text');
+ return $this->l->t('Generates a possible headline for a text.');
}
}
namespace OCP\TextProcessing;
use OCP\IL10N;
+use OCP\L10N\IFactory;
/**
* This is the text processing task type for summaries
* @since 27.1.0
*/
class SummaryTaskType implements ITaskType {
+
+ private IL10N $l;
+
/**
* Constructor for SummaryTaskType
*
- * @param IL10N $l
+ * @param IFactory $l10nFactory
* @since 27.1.0
*/
public function __construct(
- private IL10N $l,
+ IFactory $l10nFactory,
) {
+ $this->l = $l10nFactory->get('core');
}
namespace OCP\TextProcessing;
use OCP\IL10N;
+use OCP\L10N\IFactory;
/**
* This is the text processing task type for topics extraction
* @since 27.1.0
*/
class TopicsTaskType implements ITaskType {
+ private IL10N $l;
+
/**
* Constructor for TopicsTaskType
*
- * @param IL10N $l
+ * @param IFactory $l10nFactory
* @since 27.1.0
*/
public function __construct(
- private IL10N $l,
+ IFactory $l10nFactory,
) {
+ $this->l = $l10nFactory->get('core');
}