本文整理汇总了PHP中Position::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Position::get方法的具体用法?PHP Position::get怎么用?PHP Position::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Position
的用法示例。
在下文中一共展示了Position::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUpdate
/**
* @covers ::save
* @covers ::get
*/
public function testUpdate()
{
$position = (object) array('positionId' => 1, 'positionName' => 'MY POSITION', 'positionDescription' => 'THIS IS A COOL JOB', 'employeeArea' => 2, 'deleted' => 0, 'guid' => null);
$accessor = new Position();
$accessor->save($position);
$getter = $accessor->get(1);
$this->assertEquals(1, $getter->positionId);
$this->assertEquals(2, $getter->employeeArea);
$position2 = (object) array('positionId' => 1, 'positionName' => 'MY POSITION', 'positionDescription' => 'THIS IS A COOL JOB', 'employeeArea' => 1, 'deleted' => 0);
$accessor->save($position2);
$getter = $accessor->get(1);
$this->assertEquals(1, $getter->positionId);
$this->assertEquals(1, $getter->employeeArea);
}
示例2: getNode
public static function getNode()
{
$s = Position::get();
self::$node = $s;
return new self();
}
示例3: getPosition
public static function getPosition($key = null, $val = null)
{
if (is_null($key)) {
$c = Position::get();
self::$position = $c;
return new self();
} else {
$c = Position::where($key, '=', $val)->first();
self::$position = $c;
return $c;
}
}
示例4: function
Route::resource('awb', 'Api\\AwbController');
Route::resource('status', 'Api\\StatusController');
Route::get('fl/order', 'Api\\FlapiController@index');
Route::post('fl/status', 'Api\\FlapiController@postStatus');
Route::post('sap/status', 'Api\\SapapiController@postStatus');
Route::resource('sap/awb', 'Api\\SapapiController');
Route::get('g21/order', 'Api\\G21apiController@index');
});
Route::get('lastup/{log}', function ($log) {
$last = Threeplstatuslog::where('consignee_logistic_id', '=', $log)->orderBy('timestamp', 'desc')->first();
print date('Y-m-d H:i:s', $last->timestamp->sec);
print_r($last->toArray());
});
Route::get('tolower', function () {
$pos = new Position();
$nodes = $pos->get();
$blist = array('_id', 'createdDate', 'lastUpdate');
foreach ($nodes as $n) {
$nv = $n->toArray();
print_r($nv);
foreach ($nv as $key => $value) {
if (in_array($key, $blist)) {
} else {
$n->{strtolower($key)} = $value;
}
}
$n->save();
}
});
Route::get('btest', function () {
$model = new Merchant();