本文整理汇总了PHP中unknown::item方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::item方法的具体用法?PHP unknown::item怎么用?PHP unknown::item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::item方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: item
/**
* Return a specific item object by identifier
*
* @param string $itemIdentifier The unique item identifier
* @return Item Item object
*/
public function item($itemIdentifier)
{
return $this->store->item($itemIdentifier);
}
示例2: readFootprintFromGeolocationGridPoint
/**
* Reads Footprint from geolocation grid point
*
* @param unknown $geolocationGridPoint
* @param unknown $orbitDirection
*/
private function readFootprintFromGeolocationGridPoint($geolocationGridPoint, $orbitDirection)
{
/*
* On Ascending orbit, we are:
* ll : pt(0, 0) i.e pixel 0, line 0 in geolocation grid point
* lr : pt(max, 0)
* ul : pt(0, max)
* ur : pt(max, max),
*
* On Descending orbit, we are:
* ul : pt(0, 0) i.e pixel 0, line 0 in geolocation grid point
* ur : pt(max, 0)
* ll : pt(0, max)
* lr : pt(max, max),
*/
$ll = array();
$lr = array();
$ul = array();
$ur = array();
$lineMax = 0;
$lineMin = 0;
$lineMinStatus = 0;
$pixelMax = 0;
for ($i = 0, $ii = $geolocationGridPoint->length; $i < $ii; $i++) {
$line = (int) $geolocationGridPoint->item($i)->getElementsByTagName('line')->item(0)->nodeValue;
$pixel = (int) $geolocationGridPoint->item($i)->getElementsByTagName('pixel')->item(0)->nodeValue;
$coordinates = array($geolocationGridPoint->item($i)->getElementsByTagName('longitude')->item(0)->nodeValue, $geolocationGridPoint->item($i)->getElementsByTagName('latitude')->item(0)->nodeValue);
if ($lineMinStatus == 0) {
$lineMinStatus = 1;
$lineMin = $line;
}
if ($line === $lineMin) {
if ($pixel === 0) {
$ll = $coordinates;
} else {
if ($pixel >= $pixelMax) {
$pixelMax = $pixel;
$lr = $coordinates;
}
}
} else {
if ($line >= $lineMax) {
$lineMax = $line;
if ($pixel === 0) {
$ul = $coordinates;
} else {
if ($pixel >= $pixelMax) {
$pixelMax = $pixel;
$ur = $coordinates;
}
}
}
}
}
/*
* On descending orbit, the North and South are inverted
*/
if (strtolower($orbitDirection) === "descending") {
/*
* Temporary coordinates
*/
$ll_ = $ll;
$lr_ = $lr;
$ur_ = $ur;
$ul_ = $ul;
/*
* Inverts North and South
*/
$lr = $ul_;
$ll = $ur_;
$ul = $lr_;
$ur = $ll_;
}
$polygon = array($ll, $lr, $ur, $ul, $ll);
return $polygon;
}