• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Program类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: writeProgram

 /**
  * Write a program to a file
  *
  * @param Program $prog
  * @param string $filename
  */
 public static function writeProgram(Program $prog, $filename)
 {
     if ($handle = fopen($filename, 'w')) {
         for ($k = 0; $k < $prog->getStatementCount(); $k++) {
             fprintf($handle, "%s\n", $prog->getStatement($k)->dumpWamCode());
         }
         $handle = fclose($handle);
     }
     return $handle;
 }
开发者ID:trismegiste,项目名称:prolog,代码行数:16,代码来源:CodeReader.php


示例17: destroy

 public function destroy($id)
 {
     $program = Program::with('courses')->find($id);
     if ($program->courses->count() > 0) {
         Session::flash('message', 'Tidak dapat menutup program! Program ini pernah berjalan');
     } else {
         Program::destroy($id);
         Session::flash('message', 'Sukses menutup program!');
         return Redirect::route('programs.index');
     }
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:11,代码来源:ProgramsController.php


示例18: findByProgram

 /**
  * Search for all the Applications belonging to a program
  * @param Program $program
  * @param boolean $onlyPublished only find publisehd applications
  * @param boolean $onlyVisible only find visible applications
  * @param array   $excludedIds any application ids to exclude
  * @return Doctrine\Common\Collections\Collection $applications
  */
 public function findByProgram(Program $program, $onlyPublished = false, $onlyVisible = false, array $excludedIds = array())
 {
     $queryBuilder = $this->_em->createQueryBuilder();
     $queryBuilder->add('select', 'a')->from('Jazzee\\Entity\\Application', 'a');
     $queryBuilder->where('a.program = :programId');
     $queryBuilder->setParameter('programId', $program->getId());
     if ($onlyPublished) {
         $queryBuilder->andWhere('a.published = true');
     }
     if ($onlyVisible) {
         $queryBuilder->andWhere('a.visible = true');
     }
     if (!empty($excludedIds)) {
         //force integers from the values
         $safeids = array_map('intval', $excludedIds);
         $ids = implode(',', $safeids);
         $queryBuilder->andWhere("a.id NOT IN ({$ids})");
     }
     return $queryBuilder->getQuery()->getResult();
 }
开发者ID:Jazzee,项目名称:Jazzee,代码行数:28,代码来源:ApplicationRepository.php


示例19: suggestIssue

 public function suggestIssue($course_id)
 {
     $course = Course::find($course_id);
     $program = Program::find($course->program->id);
     $year = date('y');
     $month = date('m');
     $counter = Issue::where('project_id', '=', Auth::user()->curr_project_id)->count();
     $counter += 1;
     $issue = substr($program->name, 0, 1) . $year . $month . str_pad($counter, 5, "0", STR_PAD_LEFT);
     return Response::json(array('issue' => $issue));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:11,代码来源:AjaxesController.php


示例20: editReservation

 public function editReservation()
 {
     if (!isset($_POST['reserve_id'])) {
         exit('Error: 予約idが指定されていません');
     }
     $reserve_id = $_POST['reserve_id'];
     $program = Program::get($reserve_id);
     if ($program === false) {
         exit('Error: 指定された番組idは存在しません');
     }
     $program->update(array('title' => $_POST['title'], 'description' => $_POST['description']));
 }
开发者ID:ha1t,项目名称:epgrec,代码行数:12,代码来源:api.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Project类代码示例发布时间:2022-05-23
下一篇:
PHP Profiler类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap