本文整理汇总了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');
}
}
示例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;
//.........这里部分代码省略.........