本文整理汇总了PHP中Security::checkForEmptyFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Security::checkForEmptyFields方法的具体用法?PHP Security::checkForEmptyFields怎么用?PHP Security::checkForEmptyFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security::checkForEmptyFields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$guid = getInput("guid");
$entity = getEntity($guid);
$title = getInput("title");
$description = getInput("description");
$access_id = getInput("access_id");
Security::checkForEmptyFields(array("title"));
$entity->title = $title;
$entity->description = $description;
$entity->access_id = $access_id;
$entity->save();
new SystemMessage("Your video has been updated.");
forward("videos");
}
示例2: __construct
public function __construct()
{
$title = getInput("title");
$description = getInput("description");
Security::checkForEmptyFields(array("title"));
$logged_in_user = getLoggedInUser();
$logged_in_user_guid = $logged_in_user->guid;
$album = new Videoalbum();
$album->title = $title;
$album->description = $description;
$album->owner_guid = $logged_in_user_guid;
$album->save();
$album->createAvatar();
new Activity(getLoggedInUserGuid(), "activity:video:album:add", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $album->getURL(), $album->title, $album->icon(EXTRALARGE, "img-responsive")));
new SystemMessage("Your album has been created.");
forward("videos");
}
示例3: __construct
public function __construct()
{
$guid = getInput("guid");
$album = getEntity($guid);
$title = getInput("title");
$description = getInput("description");
$access_id = getInput("access_id");
Security::checkForEmptyFields(array("title"));
$album->title = $title;
$album->description = $description;
$album->access_id = $access_id;
$album->save();
if (isset($_FILES['avatar']['tmp_name'])) {
$album->createAvatar();
}
new SystemMessage("Your album has been updated.");
forward("photos");
}
示例4: __construct
public function __construct($data = array())
{
gateKeeper();
$guid = getInput("guid");
if (!$guid) {
$guid = $data['guid'];
}
$user = getLoggedInUser();
$status = getInput("status");
if (!$status) {
$status = $data['status'];
} else {
Security::checkForEmptyFields(array("status"));
}
if ($guid == $user->guid) {
if (strpos($status, "<img") == false || strpos($status, "<img") == false) {
$user->profile_status = $status;
$user->save();
}
}
$status = display("output/editor", array("value" => $status));
$s = new Profilestatus();
$s->description = $status;
$s->owner_guid = getLoggedInUserGuid();
$s->container_guid = $guid;
$s->owner_full_name = getLoggedInUser()->full_name;
$s->owner_icon = getLoggedInUser()->icon;
$s->save();
$owner = getEntity($guid);
if ($guid == $user->guid) {
new Activity($guid, "activity:status:update:self", array($user->getURL(), $user->full_name, truncate($status)));
} else {
new Activity($user->guid, "activity:status:update:friend", array($user->getURL(), $user->full_name, $owner->getURL(), $owner->full_name, truncate($status)));
}
forward();
}
示例5: checkForEmptyFields
function checkForEmptyFields($fieldnames = array())
{
return Security::checkForEmptyFields($fieldnames);
}