本文整理汇总了PHP中Program::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Program::getName方法的具体用法?PHP Program::getName怎么用?PHP Program::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Program
的用法示例。
在下文中一共展示了Program::getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllProgramsFromDatabase
public static function getAllProgramsFromDatabase($dbConn)
{
$programIds = readFromDatabase::readEntireColumnFromTable($dbConn, array(self::ID_COLUMN_NAME), self::TABLE_NAME);
$programs = array();
foreach ($programIds as $programId) {
$program = new Program($dbConn, $programId[self::ID_COLUMN_NAME]);
$programs[$program->getId()] = $program->getName();
}
return $programs;
}
示例2: actionIndex
/**
* Display welcome information
* Might display list of program, cycles in a program, or an application welcome page dependign on the url
* Enter description here ...
*/
public function actionIndex()
{
if (is_null($this->program)) {
$this->setVar('programs', $this->_em->getRepository('Jazzee\\Entity\\Program')->findAllActive());
$this->setLayoutVar('layoutTitle', 'Select a Program');
$this->loadView($this->controllerName . '/programs');
return true;
}
if (empty($this->application)) {
$this->setLayoutVar('layoutTitle', $this->program->getName() . ' Application');
$this->setVar('applications', $this->_em->getRepository('Jazzee\\Entity\\Application')->findByProgram($this->program, false, true));
$this->loadView($this->controllerName . '/cycles');
return true;
}
if (!$this->application->isPublished() or $this->application->getOpen() > new DateTime('now')) {
$this->addMessage('error', $this->application->getCycle()->getName() . ' ' . $this->application->getProgram()->getName() . ' is not open for applicants');
$this->redirectPath('apply/' . $this->application->getProgram()->getShortName());
}
$this->setLayoutVar('layoutTitle', $this->cycle->getName() . ' ' . $this->program->getName() . ' Application');
$this->setVar('application', $this->application);
}
示例3: setProgram
/**
* Set program
*
* @param \Jazzee\Entity\Program $program
*/
public function setProgram(Program $program)
{
if ($this->isGlobal) {
throw new \Jazzee\Exception("{$this->name} is global but you are trying to set its program to " . $program->getName());
}
$this->program = $program;
}
示例4: getProgramName
/**
* @return string
*/
public function getProgramName()
{
return $this->program != null ? $this->program->getName() : "";
}