/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $copy = $this; $sql = function () use($copy) { $update = []; foreach ($copy->getTableFieldsNames('user') as $_fieldName) { if ('user.id' == $_fieldName) { continue; } $update[] = $_fieldName . ' = <value>'; } $update = implode(',', $update); $sql = str_replace('__UPDATE__', $update, $this->__sql); return $sql; }; $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request updates a user.')->addEntityActionsRelationship(Entities::USER, Actions::UPDATE)->setType($doc::TYPE_UPDATE)->setSql($sql())->addTable('user')->setUpdatedFields(['user.login', 'user.password', 'user.description'])->setConditionFields(self::$__conditionFields); // Note that the following methods are not called: // - addTags // - addOutputDataValue // - setTables // - addSelectedField // - setSelectedFields // - setUpdatedFields // - addConditionField return $doc; }
/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request checks that the authentication data is valid.')->addTags(Tags::AUTHENTICATION)->addOutputDataValue(OutputValues::OUTPUT_VALUE_IS_AUTHENTICATED, 'This value indicates whether the user is authenticated or not.')->addEntityActionsRelationship(Entities::USER, Actions::SELECT)->setType($doc::TYPE_SELECT)->setSql($this->__sql())->addTable('user')->setSelectedFields(['user.*'])->setConditionFields(self::$__conditionFields); // Note that the following methods are not called: // - setTables // - addSelectedField // - addUpdatedField // - setUpdatedFields // - addConditionField return $doc; }
/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request creates a user.')->addEntityActionsRelationship(Entities::USER, Actions::CREATE)->setType($doc::TYPE_INSERT)->setSql($this->__sql)->addTable('user')->setInsertedFields(['user.login', 'user.password', 'user.description']); // Note that the following methods are not called: // - addTags // - addOutputDataValue // - setTables // - addSelectedField // - setSelectedFields // - setUpdatedFields // - addConditionField return $doc; }
/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request delete a user.')->addEntityActionsRelationship(Entities::USER_PROFILE, Actions::SELECT)->setType($doc::TYPE_SELECT)->setSql($this->__sql())->addTable('profile')->setConditionFields(self::$__conditionFields)->addPresentationField('profile.id')->addSelectedField('profile.*'); // Note that the following methods are not called: // - addTags // - addOutputDataValue // - setTables // - setSelectedFields // - addUpdatedField // - setUpdatedFields // - addConditionField return $doc; }
/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request selects a batch of users')->addEntityActionsRelationship(Entities::USER, Actions::SELECT)->addParameterValue(self::KEY_LIMIT_FROM, "Start value for the selection of users")->addParameterValue(self::KEY_LIMIT_COUNT, "Limit the number of selected users")->setType($doc::TYPE_SELECT)->setSql($this->__getSql())->addTable('user')->setSelectedFields(['user.*']); return $doc; }
/** * @see \dbeurive\Backend\Database\EntryPoints\AbstractEntryPoint */ public function getDescription() { $doc = new \dbeurive\Backend\Database\EntryPoints\Description\Sql(); $doc->setDescription('This request insert or update a user.')->addEntityActionsRelationship(Entities::USER, Actions::UPSERT)->setType($doc::TYPE_UPSERT)->setSql($this->__sql)->addTable('user')->setUpsertedFields(['user.login', 'user.password', 'user.description']); return $doc; }