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


PHP Program类代码示例

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


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

示例1: actionAdmin

 public function actionAdmin()
 {
     $model = new Program('search');
     $model->unsetAttributes();
     if (isset($_GET['Program'])) {
         $model->setAttributes($_GET['Program']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:hanihh,项目名称:vvs_v2,代码行数:9,代码来源:ProgramController.php

示例2: Main

 public static function Main()
 {
     echo "HELLO\n";
     $app = new Program(array(new Item(array('name' => "+5 Dexterity Vest", 'sellIn' => 10, 'quality' => 20)), new Item(array('name' => "Aged Brie", 'sellIn' => 2, 'quality' => 0)), new Item(array('name' => "Elixir of the Mongoose", 'sellIn' => 5, 'quality' => 7)), new Item(array('name' => "Sulfuras, Hand of Ragnaros", 'sellIn' => 0, 'quality' => 80)), new Item(array('name' => "Backstage passes to a TAFKAL80ETC concert", 'sellIn' => 15, 'quality' => 20)), new Item(array('name' => "Conjured Mana Cake", 'sellIn' => 3, 'quality' => 6))));
     $app->UpdateQuality();
     echo sprintf("%50s - %7s - %7s\n", "Name", "SellIn", "Quality");
     foreach ($app->items as $item) {
         echo sprintf("%50s - %7d - %7d\n", $item->name, $item->sellIn, $item->quality);
     }
 }
开发者ID:MarioBlazek,项目名称:gilded-rose-kata,代码行数:10,代码来源:Program.php

示例3: 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;
 }
开发者ID:radioCKUT,项目名称:digital-logsheets,代码行数:10,代码来源:manageProgramEntries.php

示例4: evaluateShouldTokenizeAndParseCode

 /** @test */
 public function evaluateShouldTokenizeAndParseCode()
 {
     $lexer = $this->getMock('Igorw\\Ilias\\Lexer');
     $lexer->expects($this->once())->method('tokenize')->with('2')->will($this->returnValue(['2']));
     $reader = $this->getMock('Igorw\\Ilias\\Reader');
     $reader->expects($this->once())->method('parse')->with(['2'])->will($this->returnValue([2]));
     $builder = $this->getMock('Igorw\\Ilias\\FormTreeBuilder');
     $builder->expects($this->once())->method('parseAst')->with([2])->will($this->returnValue([new Form\LiteralForm(2)]));
     $walker = $this->getMock('Igorw\\Ilias\\Walker');
     $walker->expects($this->once())->method('expand')->with($this->isInstanceOf('Igorw\\Ilias\\Environment'), $this->isInstanceOf('Igorw\\Ilias\\Form\\Form'))->will($this->returnArgument(1));
     $env = $this->getMock('Igorw\\Ilias\\Environment');
     $program = new Program($lexer, $reader, $builder, $walker);
     $this->assertSame(2, $program->evaluate($env, '2'));
 }
开发者ID:igorw,项目名称:ilias,代码行数:15,代码来源:ProgramTest.php

示例5: index

 public function index()
 {
     $hours = Hour::all();
     $programs = Program::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->get();
     $menu = 'data';
     return View::make('hours.index', compact('hours', 'programs', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:7,代码来源:HoursController.php

示例6: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('studentdelayed', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('studentid');
         $table->integer('programid');
         $table->integer('collegeid');
         $table->integer('semesters');
         $table->timestamps();
     });
     $students = Studentdropout::select('studentid', 'programid', 'collegeid', 'semesters')->where('semesters', '>', 8)->get();
     foreach ($students as $student) {
         $programid = $student->programid;
         $semesters = $student->semesters;
         $programYears = Program::select('numyears')->where('programid', $programid)->first()->numyears;
         if ($semesters > $programYears * 2) {
             $newEntry = new Studentdelayed();
             $newEntry->studentid = $student->studentid;
             $newEntry->programid = $programid;
             $newEntry->collegeid = $student->collegeid;
             $newEntry->semesters = $semesters;
             $newEntry->save();
         }
     }
 }
开发者ID:jpcamba,项目名称:attrition,代码行数:30,代码来源:2016_05_14_090417_create_studentdelayed_table.php

示例7: postDelete

 public function postDelete()
 {
     $id = Input::get('id');
     $delpro = Program::find($id);
     $delpro->delete();
     return 1;
 }
开发者ID:saifurrahman,项目名称:dev,代码行数:7,代码来源:ProgramController.php

示例8: simpleReserve

 /**
  * simpleReserve
  *
  * @TODO 同時間帯に別のチャンネルを予約している場合に警告
  * 同一番組をすでに予約している場合は上書きする
  */
 public static function simpleReserve($program_disc)
 {
     $db = DB::conn();
     $program = Program::get($program_disc);
     $row = array('program_disc' => $program->program_disc, 'autorec' => 0, 'mode' => 0, 'job' => 0);
     return $db->replace(self::TABLE, $row);
 }
开发者ID:ha1t,项目名称:epgrec,代码行数:13,代码来源:reserve.php

示例9: testGetId

 public function testGetId()
 {
     $rows = Program::search('', array());
     $row = current($rows);
     $this->assertEquals('program', strtolower(get_class(Program::get($row['program_disc']))));
     $this->assertFalse(Program::get('dummy'));
 }
开发者ID:ha1t,项目名称:epgrec,代码行数:7,代码来源:ProgramTest.php

示例10: showSpecificProgram

 public function showSpecificProgram()
 {
     $programIDInput = Input::get('program-dropdown');
     $program = Program::find($programIDInput);
     //ave students per year and ave difference
     $yearsArray = Studentterm::where('programid', $program->programid)->where('year', '>', 1999)->where('year', '<', 2014)->groupBy('year')->orderBy('year', 'asc')->lists('year');
     $yearlyStudentAverage = [];
     $yearlySemDifference = [];
     foreach ($yearsArray as $yearData) {
         $aveStudents = $program->getYearlyAveStudents($yearData);
         if ($aveStudents > 1) {
             $yearlyStudentAverage[$yearData] = $aveStudents;
         }
     }
     $aveYearsOfStay = $program->getAveYearsOfStay();
     $aveYearsBeforeDropout = $program->getAveYearsBeforeDropout();
     $aveYearsBeforeShifting = $program->getAveYearsBeforeShifting();
     $aveAttrition = $program->getAveAttrition();
     $aveShiftRate = $program->getAveShiftRate();
     $batchAttrition = $program->getBatchAttrition();
     $batchShiftRate = $program->getBatchShiftRate();
     $division = $program->getDivision();
     $numYears = $program->getNumYears();
     $gradeCount = $program->getGradeCount();
     $shiftGradeCount = $program->getShiftGradeCount();
     $stbracketCount = $program->getSTBracketCount();
     $shiftBracketCount = $program->getShiftSTBracketCount();
     return View::make('program.program-specific', ['program' => $program, 'aveYearsOfStay' => $aveYearsOfStay, 'yearlyStudentAverage' => $yearlyStudentAverage, 'aveYearsBeforeShifting' => $aveYearsBeforeShifting, 'aveYearsBeforeDropout' => $aveYearsBeforeDropout, 'aveAttrition' => $aveAttrition, 'batchAttrition' => $batchAttrition, 'aveShiftRate' => $aveShiftRate, 'batchShiftRate' => $batchShiftRate, 'division' => $division, 'numYears' => $numYears, 'gradeCount' => $gradeCount, 'shiftGradeCount' => $shiftGradeCount, 'stbracketCount' => $stbracketCount, 'shiftBracketCount' => $shiftBracketCount]);
 }
开发者ID:jpcamba,项目名称:attrition,代码行数:29,代码来源:ProgramController.php

示例11: 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

示例12: studentPerprogramFilter

 public function studentPerprogramFilter($id)
 {
     $program_id = $id;
     $program = Program::with('courses')->find($program_id);
     $programs = Program::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->get();
     $menu = 'report';
     return View::make('reports.studentperprogram', compact('programs', 'program', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:ReportsController.php

示例13: actionGetProgram

 public function actionGetProgram()
 {
     if (Yii::app()->request->isAjaxRequest) {
         if ($_POST) {
             $dataProgram = Program::model()->findAll('tahun_anggaran=:tahun_anggaran AND status = 0', array(':tahun_anggaran' => $_POST['tahun_anggaran']));
             $this->renderPartial('_program', array('dataProgram' => $dataProgram));
         }
     }
 }
开发者ID:Mapetik,项目名称:ekeg8791,代码行数:9,代码来源:InputRealisasiController.php

示例14: getCommentProgram

 public static function getCommentProgram($thread_id)
 {
     $comment = Comment::model()->findByPk($thread_id);
     if (isset($comment) && !is_null($comment)) {
         $prod = Program::model()->findByPk($comment->content_id);
         return array('id' => $prod->id, 'name' => $prod->name, 'poster' => $prod->poster, 'type' => $prod->pro_type);
     }
     return array('id' => '', 'name' => '', 'poster' => '', 'type' => '');
 }
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:9,代码来源:CacheManager.php

示例15: edit

 public function edit($id)
 {
     $course = Course::find($id);
     $classifications = Classification::all();
     $generations = Generation::all();
     $programs = Program::all();
     $majors = Major::all();
     $menu = 'project';
     return View::make('courses.edit', compact('course', 'classifications', 'programs', 'generations', 'majors', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:10,代码来源:CoursesController.php


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