本文整理汇总了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"]);