hw_api::object
(PHP 4, PHP 5 < 5.2.0, PECL hwapi SVN)
hw_api::object — Retrieve attribute information
Описание
hw_api_object hw_api::object
( array
$parameter
)This function retrieves the attribute information of an object of any version. It will not return the document content.
Список параметров
-
parameter
-
The parameter array contains the required elements 'objectIdentifier' and the optional elements 'attributeSelector' and 'version'.
Возвращаемые значения
The returned object is an instance of class HW_API_Object on success or HW_API_Error if an error occurred.
Примеры
This simple example retrieves an object and checks for errors.
Пример #1 Retrieve an object
<?php
function handle_error($error)
{
$reason = $error->reason(0);
echo "Type: <b>";
switch ($reason->type()) {
case 0:
echo "Error";
break;
case 1:
echo "Warning";
break;
case 2:
echo "Message";
break;
}
echo "</b><br />\n";
echo "Description: " . $reason->description("en") . "<br />\n";
}
function list_attr($obj)
{
echo "<table>\n";
$count = $obj->count();
for ($i=0; $i<$count; $i++) {
$attr = $obj->attribute($i);
printf("<tr><td align=\"right\" bgcolor=\"#c0c0c0\"><b>%s</b></td><td bgcolor=\"#F0F0F0\">%s</td></tr>\n",
$attr->key(), $attr->value());
}
echo "</table>\n";
}
$hwapi = hwapi_hgcsp($g_config[HOSTNAME]);
$parms = array("objectIdentifier"=>"rootcollection", "attributeSelector"=>array("Title", "Name", "DocumentType"));
$root = $hwapi->object($parms);
if (get_class($root) == "HW_API_Error") {
handle_error($root);
exit;
}
list_attr($root);
?>
- Функция hw_api::checkin() - Checks in an object
- Функция hw_api::checkout() - Checks out an object
- Функция hw_api::children() - Returns children of an object
- Функция hw_api::content() - Returns content of an object
- Функция hw_api::copy() - Copies physically
- Функция hw_api::dbstat() - Returns statistics about database server
- Функция hw_api::dcstat() - Returns statistics about document cache server
- Функция hw_api::dstanchors() - Returns a list of all destination anchors
- Функция hw_api::dstofsrcanchor() - Returns destination of a source anchor
- Функция hw_api::find() - Search for objects
- Функция hw_api::ftstat() - Returns statistics about fulltext server
- Функция hw_api::hwstat() - Returns statistics about Hyperwave server
- Функция hw_api::identify() - Log into Hyperwave Server
- Функция hw_api::info() - Returns information about server configuration
- Функция hw_api::insert() - Inserts a new object
- Функция hw_api::insertanchor() - Inserts a new object of type anchor
- Функция hw_api::insertcollection() - Inserts a new object of type collection
- Функция hw_api::insertdocument() - Inserts a new object of type document
- Функция hw_api::link() - Creates a link to an object
- Функция hw_api::lock() - Locks an object
- Функция hw_api::move() - Moves object between collections
- Функция hw_api::object() - Retrieve attribute information
- Функция hw_api::objectbyanchor() - Returns the object an anchor belongs to
- Функция hw_api::parents() - Returns parents of an object
- Функция hw_api::remove() - Delete an object
- Функция hw_api::replace() - Replaces an object
- Функция hw_api::setcommittedversion() - Commits version other than last version
- Функция hw_api::srcanchors() - Returns a list of all source anchors
- Функция hw_api::srcsofdst() - Returns source of a destination object
- Функция hw_api::unlock() - Unlocks a locked object
- Функция hw_api::user() - Returns the own user object
- Функция hw_api::userlist() - Returns a list of all logged in users
- Функция hw_api_attribute::key() - Returns key of the attribute
- Функция hw_api_attribute::langdepvalue() - Returns value for a given language
- Функция hw_api_attribute::value() - Returns value of the attribute
- Функция hw_api_attribute::values() - Returns all values of the attribute
- Функция hw_api_content::mimetype() - Returns mimetype
- Функция hw_api_content::read() - Read content
- Функция hw_api_error::count() - Returns number of reasons
- Функция hw_api_error::reason() - Returns reason of error
- Функция hw_api_object::assign() - Clones object
- Функция hw_api_object::attreditable() - Checks whether an attribute is editable
- Функция hw_api_object::count() - Returns number of attributes
- Функция hw_api_object::insert() - Inserts new attribute
- Функция hw_api_object::remove() - Removes attribute
- Функция hw_api_object::title() - Returns the title attribute
- Функция hw_api_object::value() - Returns value of attribute
- Функция hw_api_reason::description() - Returns description of reason
- Функция hw_api_reason::type() - Returns type of reason
- hwapi_attribute_new
- hwapi_content_new
- hwapi_hgcsp
- hwapi_object_new
Коментарии
404 Not Found