本文整理汇总了PHP中Requirement::setDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirement::setDescription方法的具体用法?PHP Requirement::setDescription怎么用?PHP Requirement::setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requirement
的用法示例。
在下文中一共展示了Requirement::setDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save()
{
// yo thau ma requirement save huna aaucha
// yei bata feri "index.php" ma falne jun chai profile ma jancha
$req = new Requirement();
if (isset($_POST['title'])) {
$req->setTitle($_POST['title']);
} else {
$req->setTitle("");
}
if (isset($_POST['date'])) {
$req->setDate($_POST['date']);
} else {
$req->setDate("01-01-2001");
}
if (isset($_POST['details'])) {
$req->setDescription($_POST['details']);
} else {
$req->setDescription("");
}
$req->setStatus(1);
$req->setOrgname("");
$this->requirement_repository->insert($req);
}
示例2: get_by_id
public function get_by_id($requirement_id)
{
$this->database->connect();
$sql = "SELECT * FROM welfrequirement WHERE welfreq_id=?";
//prepare the statement
$statement = $this->database->initialize($sql);
//Bind the parameters
$statement->bind_param("i", $requirement_id);
//Execute the above statement
$statement->execute();
//Bind the result
$statement->bind_result($welfreq_id, $title, $description, $end_date, $status, $org_name, $welf_id);
$req = NULL;
while ($statement->fetch()) {
$req = new Requirement();
$req->setRequirementId($welfreq_id);
$req->setTitle($title);
$req->setDescription($description);
$req->setDate($end_date);
$req->setStatus($status);
$req->setOrgname($org_name);
$req->setWelfId($welf_id);
}
//Close Connection
$this->database->close();
return $req;
}