本文整理匯總了PHP中app\Posts::checkImage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Posts::checkImage方法的具體用法?PHP Posts::checkImage怎麽用?PHP Posts::checkImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Posts
的用法示例。
在下文中一共展示了Posts::checkImage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Input
}
}
}
}
$type = (new Input('what', function ($value) {
if (!in_array($value, Posts::$TYPES)) {
return Input::ERROR_INVALID;
}
}, array(Input::IS_OPTIONAL => true, Input::CUSTOM_ERROR_MESSAGES => array(Input::ERROR_INVALID => 'Post type (@value) is invalid'))))->out();
if (!empty($type) && $type === 'reservation') {
if (Permission::insufficient('member')) {
Response::fail();
}
Users::reservationLimitExceeded();
}
$Image = Posts::checkImage(Posts::validateImageURL());
if (empty($type)) {
Response::done(array('preview' => $Image->preview, 'title' => $Image->title));
}
$insert = array('preview' => $Image->preview, 'fullsize' => $Image->fullsize);
$season = Episodes::validateSeason(Episodes::ALLOW_MOVIES);
$episode = Episodes::validateEpisode();
$epdata = Episodes::getActual($season, $episode, Episodes::ALLOW_MOVIES);
if (empty($epdata)) {
Response::fail("The specified episode (S{$season}E{$episode}) does not exist");
}
$insert['season'] = $epdata->season;
$insert['episode'] = $epdata->episode;
$ByID = $currentUser->id;
if (Permission::sufficient('developer')) {
$username = Posts::validatePostAs();