本文整理汇总了PHP中Movie::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::get方法的具体用法?PHP Movie::get怎么用?PHP Movie::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Movie
的用法示例。
在下文中一共展示了Movie::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testIncrement
public function testIncrement()
{
$movie = new Movie();
$movie->set("score", 60);
$this->assertEquals($movie->get("score"), 60);
$movie->increment("score", 10);
$this->assertEquals($movie->get("score"), 70);
$movie->increment("score", -5);
$this->assertEquals($movie->get("score"), 65);
}
示例2: MovieSelector
public function MovieSelector()
{
$movies = Movie::get();
$map = $movies->map('ID', 'Title')->toArray();
$form = Form::create($this, __FUNCTION__, FieldList::create(DropdownField::create('Movie', 'Movie', $map)), FieldList::create(FormAction::create('selectMovie', 'OK')->addExtraClass('btn btn-default-color btn-lg')));
//TODO setTemplate
//$form->setTemplate('MyCustomField');
return $form;
}
示例3: exit
<?php
include_once 'header.php';
if (!isset($_GET['id'])) {
exit('Undefined param id');
}
$id = intval($_GET['id']);
$movie = Movie::get($id);
include_once 'movie-common.php';