本文整理匯總了PHP中Book::getBookByDataId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Book::getBookByDataId方法的具體用法?PHP Book::getBookByDataId怎麽用?PHP Book::getBookByDataId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Book
的用法示例。
在下文中一共展示了Book::getBookByDataId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
$idData = 20;
self::$add = "data={$idData}&";
$myBook = Book::getBookByDataId($idData);
self::$book = new EPub($myBook->getFilePath("EPUB", $idData));
self::$book->initSpineComponent();
}
示例2: testGetBookByDataId
public function testGetBookByDataId()
{
$book = Book::getBookByDataId(17);
$this->assertEquals("Alice's Adventures in Wonderland", $book->getTitle());
}
示例3: PHPMailer
}
if (php_sapi_name() === 'cli') {
return;
}
global $config;
if ($error = checkConfiguration()) {
echo $error;
exit;
}
$idData = $_REQUEST["data"];
$emailDest = $_REQUEST["email"];
if ($error = checkRequest($idData, $emailDest)) {
echo $error;
exit;
}
$book = Book::getBookByDataId($idData);
$data = $book->getDataById($idData);
if (filesize($data->getLocalPath()) > 10 * 1024 * 1024) {
echo 'Attachment too big';
exit;
}
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Timeout = 30;
// 30 seconds as some files can be big
$mail->Host = $config['cops_mail_configuration']["smtp.host"];
if (!empty($config['cops_mail_configuration']["smtp.secure"])) {
$mail->SMTPSecure = $config['cops_mail_configuration']["smtp.secure"];
$mail->Port = 465;
}
$mail->SMTPAuth = !empty($config['cops_mail_configuration']["smtp.username"]);