当前位置: 首页>>代码示例>>PHP>>正文


PHP Program::getById方法代码示例

本文整理汇总了PHP中Program::getById方法的典型用法代码示例。如果您正苦于以下问题:PHP Program::getById方法的具体用法?PHP Program::getById怎么用?PHP Program::getById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Program的用法示例。


在下文中一共展示了Program::getById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listofmodule

	public function listofmodule($request, $response)
	{/*{{{*/
		$response->programList = DAL::get()->find_all('Program');
		$moduleId = $request->moduleid;
		$programId = $request->programid;
		
		$response->moduleId = $moduleId;
		
		$response->moduleid_seleted = $request->moduleid;
		$response->programid_seleted = $request->programid;
		
		$response->module = Module::getById($moduleId);
		
		$response->funpoints = array();
		if($response->module instanceof Module)
		{
			$response->funpoints = $response->module->getFunpoints();
			
			//fix programid_seleted
			$response->programid_seleted = $response->module->program->id;
			$response->program = $response->module->program;
		}elseif($request->programid > 0){
			$response->program = Program::getById($request->programid);
			$response->funpoints = $response->program->getFunpoints();
		}
	}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:26,代码来源:funpointcontroller.php

示例2: listofprogram

	public function listofprogram($request, $response)
	{/*{{{*/
		$response->programList = DAL::get()->find_all('Program');
		$programId =  $request->programid;
		$response->programId = $programId;
		$response->program = $program = Program::getById($programId);
		
		$response->modules = array();
		
		if($program instanceof Program)
		{
			$response->modules = $program->getModules();
		}elseif($request->programid === '0') {
			$response->modules = DAL::get()->find_all('Module');
		}
		
	}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:modulecontroller.php

示例3: foreach

<?php
$programId_i = 0;
foreach($testTask->getTaskItems4Process() as $programId => $arr1)
{
	$aProgram = Program::getById($programId);
	$programId_i ++;
?>

<div class='greenBorderDiv'>
	<span style='font-weight:bold;'>
		<?php if($aProgram->id != $taskItem->usecase->funpoint->module->program->id){ ?>
			<a href='/taskitem/next?testTaskId=<?=$testTask->id ?>&programId=<?=$programId ?>'>项目<?=$programId_i?>:<?=$aProgram->name?></a> 
		<?php }else{ ?>项目<?=$programId_i?>:<?=$aProgram->name?>
		<?php }?>
	</span>
	 <?php ?>
	
	<?php if( $aProgram->id != $taskItem->usecase->funpoint->module->program->id){
				echo $testTask->getSumInfoStr4Program($arr1);
				echo '</div>';
				continue;
			}else{
				echo $testTask->getSimpleSumInfoStr4Program($arr1);
			} ?>
	
	<?php 
		$moduleId_i = 0;
		foreach($arr1 as $moduleId => $arr2){
			$aModule = Module::getById($moduleId);
			$moduleId_i ++;
	?>
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:next.suminfostr.inner.php


注:本文中的Program::getById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。