Services webmasters
Partenaires
Jeux concours gratuits
 
hw_api_object->value
<<<
hw_api->object hw_api->objectbyanchor
>>>

7.38 Hyperwave API
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
intégration dans Apache
Configuration à l'exécution
Types de ressources
Constantes prédefinies
Classes
hw_api_attribute->key
hw_api_attribute->langdepvalue
hw_api_attribute->value
hw_api_attribute->values
hw_api_attribute
hw_api->checkin
hw_api->checkout
hw_api->children
hw_api_content->mimetype
hw_api_content->read
hw_api->content
hw_api->copy
hw_api->dbstat
hw_api->dcstat
hw_api->dstanchors
hw_api->dstofsrcanchors
hw_api_error->count
hw_api_error->reason
hw_api->find
hw_api->ftstat
hwapi_hgcsp
hw_api->hwstat
hw_api->identify
hw_api->info
hw_api->insert
hw_api->insertanchor
hw_api->insertcollection
hw_api->insertdocument
hw_api->link
hw_api->lock
hw_api->move
hw_api->content
hw_api_object->assign
hw_api_object->attreditable
hw_api_object->count
hw_api_object->insert
hw_api_object
hw_api_object->remove
hw_api_object->title
hw_api_object->value
->hw_api->object
hw_api->objectbyanchor
hw_api->parents
hw_api_reason->description
hw_api_reason->type
hw_api->remove
hw_api->replace
hw_api->setcommitedversion
hw_api->srcanchors

7.38.49 hw_api->object()Lit les informations d'attribut

[ Exemples avec hwapi_object ]   CVS uniquement

object  hw_api->object ( array   parameter )

hw_api->object lit les informations d'attributs d'un objet de n'importe quelle version. Elle ne retournera pas le contenu du document. Le paramètre parameter est un tableau qui contient l'élément obligatoire 'objectIdentifier' et les éléments optionnels 'attributeSelector' et 'version'.

L'objet retourné est une instance de la classe HW_API_Object en cas de succès ou HW_API_Error en cas d'erreur.

Cet exemple simple lit un objet et vérifie les erreurs.
Lit un objet Hyperwave et le vérifie

<?php
function handle_error($error) {
  
$reason = $error->reason(0);
  echo
"Type: <B>";
  switch(
$reason->type()) {
    case
0:
      echo
"Erreur";
      break;
    case
1:
      echo
"Alerte";
      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>\n",
             
$attr->key(), $attr->value());
  }
  echo
"</TABLE>\n";
}

$hwapi = "));
$root = $hwapi
->object($parms);
if(get_class($root) == "
HW_API_Error") {
  handle_error($root);
  exit;
}
list_attr($root);
?>

Voir aussi hwapi_content .

<< hw_api->object >>
hw_api_object->value Hyperwave API hw_api->objectbyanchor
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -