本文整理汇总了PHP中error::createNodeNotFoundError方法的典型用法代码示例。如果您正苦于以下问题:PHP error::createNodeNotFoundError方法的具体用法?PHP error::createNodeNotFoundError怎么用?PHP error::createNodeNotFoundError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类error
的用法示例。
在下文中一共展示了error::createNodeNotFoundError方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* Loads the data for this ViewNode record from the database
* @return ViewNode object (this)
*/
function load($style = 'long')
{
global $DB, $CFG, $USER, $ERROR, $HUB_FLM, $HUB_SQL;
try {
$this->canview();
} catch (Exception $e) {
return access_denied_error();
}
$params = array();
$params[0] = $this->viewid;
$params[1] = $this->nodeid;
$params[2] = $this->userid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_VIEWNODE_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
$ERROR = new error();
$ERROR->createNodeNotFoundError($this->nodeid);
return $ERROR;
} else {
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->xpos = stripslashes(trim($array['XPos']));
$this->ypos = $array['YPos'];
$this->creationdate = $array['CreationDate'];
$this->modificationdate = $array['ModificationDate'];
$this->node = new CNode($this->nodeid);
$this->node = $this->node->load($style);
}
}
} else {
return database_error();
}
return $this;
}
示例2: load
/**
* Loads the data for this ViewNode record from the database
* @return ViewConnection object (this)
*/
function load($style = 'long')
{
global $DB, $CFG, $USER, $ERROR, $HUB_FLM, $HUB_SQL;
try {
$this->canview();
} catch (Exception $e) {
return access_denied_error();
}
$currentuser = '';
if (isset($USER->userid)) {
$currentuser = $USER->userid;
}
$params = array();
$params[0] = $this->viewid;
$params[1] = $this->connid;
$params[2] = $this->userid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_VIEWCONNECTION_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
$ERROR = new error();
$ERROR->createNodeNotFoundError($this->connid);
return $ERROR;
} else {
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->creationdate = $array['CreationDate'];
$this->modificationdate = $array['ModificationDate'];
$this->connection = new Connection($this->connid);
$this->connection = $this->connection->load($style);
}
}
} else {
return database_error();
}
return $this;
}
示例3: load
/**
* Loads the data for the node from the database
*
* @param String $style (optional - default 'long') may be 'short' or 'long' or 'mini' or 'full' or 'shortactivity' (mini used for graphs)
* 'mini' include the base information like name, description, role, user, private, creation and modifications dates, connectedness, image, thumb.
* 'short' includes 'mini' plus address information, start and end date, otherconnections, userfollow.
* 'long' includes 'short' and associated website objects, tag objects, group onjects, votes, view counts and extra properties.
* 'full' includes 'long' and all activity and voting data. This is likely to be very heavy. Use wisely.
* 'shortactivity' includes 'short' plus the activity and voting data.
* 'cif' just what is needed for cif.
* @return Node object (this)
*/
function load($style = 'long')
{
global $DB, $CFG, $USER, $ERROR, $HUB_FLM, $HUB_SQL;
try {
$this->canview();
} catch (Exception $e) {
return access_denied_error();
}
$this->style = $style;
$params = array();
$params[0] = $this->nodeid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_NODE_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
$ERROR = new error();
$ERROR->createNodeNotFoundError($this->nodeid);
return $ERROR;
} else {
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->name = stripslashes(trim($array['Name']));
$this->creationdate = $array['CreationDate'];
$this->modificationdate = $array['ModificationDate'];
if (isset($array['NodeTypeID'])) {
$this->role = new Role($array['NodeTypeID']);
$this->role = $this->role->load();
}
if (trim($array['Description']) != "") {
$this->hasdesc = true;
}
if ($style == 'long' || $style == 'cif') {
$this->description = stripslashes(trim($array['Description']));
}
$this->users = array();
if ($style == 'cif') {
//CIF does not need the whole user info at present
// or just userid at this level?
$this->users[0] = new User($array['UserID']);
} else {
$maps = getMapsForNode($this->nodeid, 0, 0);
$this->mapcount = $maps->totalno;
$this->connectedness = $array['connectedness'];
$this->private = $array['Private'];
$this->users[0] = getUser($array['UserID'], $style);
if ($array['Image']) {
$this->filename = $array['Image'];
$imagedir = $HUB_FLM->getUploadsNodeDir($this->nodeid, $array['UserID']);
$originalphotopath = $HUB_FLM->createUploadsDirPath($imagedir . "/" . stripslashes($array['Image']));
if (file_exists($originalphotopath)) {
$this->image = $HUB_FLM->getUploadsWebPath($imagedir . "/" . stripslashes($array['Image']));
$this->thumb = $HUB_FLM->getUploadsWebPath($imagedir . "/" . str_replace('.', '_thumb.', stripslashes($array['Image'])));
if (!file_exists($this->thumb)) {
create_image_thumb($array['Image'], $CFG->IMAGE_THUMB_WIDTH, $imagedir);
}
} else {
if ($this->role->name == 'Map') {
$this->image = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_ISSUE_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_ISSUE_PHOTO)));
}
}
} else {
if ($this->role->name == 'Map') {
$this->image = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_ISSUE_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_ISSUE_PHOTO)));
}
}
//if(isset($array['Image'])){
// $this->imageurlid = $array['Image'];
//}
//if(isset($array['ImageThumbnail'])){
// $this->thum = $array['ImageThumbnail'];
//}
if ($style != 'mini') {
if (isset($array['StartDate']) && $array['StartDate'] != 0) {
$this->startdatetime = $array['StartDate'];
}
if (isset($array['EndDate']) && $array['EndDate'] != 0) {
$this->enddatetime = $array['EndDate'];
}
if (isset($array['LocationText'])) {
$this->location = $array['LocationText'];
} else {
$this->location = '';
}
if (isset($array['LocationCountry'])) {
$cs = getCountryList();
$this->countrycode = $array['LocationCountry'];
//.........这里部分代码省略.........