當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Release::setName方法代碼示例

本文整理匯總了PHP中Release::setName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Release::setName方法的具體用法?PHP Release::setName怎麽用?PHP Release::setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Release的用法示例。


在下文中一共展示了Release::setName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editRelease

 private function editRelease()
 {
     if (!$this->oRequest->existParam('name')) {
         throw new Error('Vous devez renseigner un nom.', 1163);
     }
     if (!$this->oRequest->existParam('pre')) {
         throw new Error('Vous devez renseigner un PRE Time.', 1163);
     }
     //Suppression
     if ($this->oRequest->existParam('delete') && $this->oRequest->getParam('delete', 'boolean')) {
         $this->oRelease->delete();
         Logger::log('admin', 'La release' . $this->oRelease->getName() . ' a été supprimée par ' . $this->oCurrentUser->getLogin());
         $this->oView->addAlert('La release a été supprimée.', 'success');
     } else {
         $this->oRelease->setName($this->oRequest->getParam('name', 'string'));
         $this->oRelease->setPre($this->oRequest->getParam('pre', 'string'));
         $this->oRelease->update();
         Logger::log('admin', 'La release' . $this->oRelease->getName() . ' a été modifiée par ' . $this->oCurrentUser->getLogin());
         $this->oView->addAlert('La release a été modifiée.', 'success');
     }
 }
開發者ID:Jatax,項目名稱:TKS,代碼行數:21,代碼來源:modrelease.controller.php

示例2: getAllReleases

 public static function getAllReleases()
 {
     if (Release::$allReleases === null) {
         Release::$allReleases = array();
         $xvid = Codec::getCodec("xvid");
         $mp3 = Codec::getCodec("mp3");
         $avi = Codec::getCodec("avi");
         $h264 = Codec::getCodec("h264");
         $aac = Codec::getCodec("aac");
         $ac3 = Codec::getCodec("ac3");
         $mp4 = Codec::getCodec("mp4");
         $mkv = Codec::getCodec("mkv");
         $dvd = ReleaseSource::getSource("DVD");
         $bd = ReleaseSource::getSource("BD");
         $release = new Release(Project::getProject("mitsudomoe"), "ep0");
         $release->setName("preview");
         $release->setPreviewUrl("images/episodes/mitsudomoepreview.jpg");
         $release->setSynopsis("Bande-Annonce de la série Mitsudomoe qui débutera en juillet 2010.");
         $release->setOriginalTitle("Trailer");
         $release->setLocalizedTitle("Bande-Annonce");
         $release->addStaff(TeamMember::getMemberByPseudo("Sazaju HITOKAGE"), Role::getRole('tradJp'));
         $release->addStaff(TeamMember::getMemberByPseudo("db0"), Role::getRole('adapt'));
         $release->addStaff(TeamMember::getMemberByPseudo("db0"), Role::getRole('time'));
         $release->addStaff(TeamMember::getMemberByPseudo("db0"), Role::getRole('edit'));
         $release->addStaff(TeamMember::getMemberByPseudo("praia"), Role::getRole('qc'));
         $release->addStaff(TeamMember::getMemberByPseudo("lepims"), Role::getRole('encod'));
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_Preview[Xvid-MP3][5ED85545].avi");
         $descriptor->setVideoCodec($xvid);
         $descriptor->setSoundCodec($mp3);
         $descriptor->setContainerCodec($avi);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep1");
         $release->setName("épisode 01");
         $release->setPreviewUrl("images/episodes/mitsudomoe1.jpg");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_01[BD][H264-AAC][A551786E].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep2");
         $release->setName("épisode 02");
         $release->setPreviewUrl("images/episodes/mitsudomoe2.jpg");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_02[BD][H264-AAC][D324A25E].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep3");
         $release->setName("épisode 03");
         $release->setPreviewUrl("images/episodes/mitsudomoe3.jpg");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_03[BD][H264-AAC][8C7C6BC3].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep4");
         $release->setName("épisode 04");
         $release->setPreviewUrl("images/episodes/mitsudomoe4.jpg");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_04[BD][H264-AAC][A9514039].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep5");
         $release->setName("épisode 05");
         $release->setPreviewUrl("images/episodes/mitsudomoe5.jpg");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_05[BD][H264-AAC][199319E2].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(0);
         Release::$allReleases[] = $release;
         $release = new Release(Project::getProject("mitsudomoe"), "ep6");
         $release->setName("épisode 06");
         $release->setPreviewUrl("images/episodes/mitsudomoe6.jpg");
         $release->setHeaderImage("images/sorties/mitsudomoe6.png");
         $descriptor = new ReleaseFileDescriptor("[Zero]Mitsudomoe[BD][H264-AAC]/[Zero]Mitsudomoe_06[BD][H264-AAC][43B2986A].mp4");
         $descriptor->setReleaseSource($bd);
         $descriptor->setVideoCodec($h264);
         $descriptor->setSoundCodec($aac);
         $descriptor->setContainerCodec($mp4);
         $release->addFileDescriptor($descriptor);
         $release->setReleasingTime(strtotime("10 October 2011"));
         Release::$allReleases[] = $release;
//.........這裏部分代碼省略.........
開發者ID:KasaiDot,項目名稱:Zero-Fansub-website,代碼行數:101,代碼來源:Release.php


注:本文中的Release::setName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。