



|
Manuel PHP
|
|
Table : .hw Array2Objrec.hw changeobject .hw Children .hw ChildrenObj .hw Close .hw Connect .hw connection info .hw cp .hw Deleteobject .hw DocByAnchor .hw DocByAnchorObj .hw Document Attributes .hw Document BodyTag .hw Document Content .hw Document SetContent .hw Document Size .hw dummy .hw EditText .hw Error .hw ErrorMsg .hw Free Document .hw GetAnchors .hw GetAnchorsObj .hw GetAndLock .hw GetChildColl .hw GetChildCollObj .hw GetChildDocColl .hw GetChildDocCollObj .hw GetObject .hw GetObjectByQuery .hw GetObjectByQueryColl .hw GetObjectByQueryCollObj .hw GetObjectByQueryObj .hw GetParents .hw GetParentsObj .hw getrellink .hw GetRemote .hw getremotechildren .hw GetSrcByDestObj .hw GetText .hw getusername .hw Identify .hw InCollections .hw Info .hw InsColl .hw InsDoc .hw insertanchors .hw InsertDocument .hw InsertObject .hw mapid .hw Modifyobject .hw mv .hw New Document .hw objrec2array .hw Output Document .hw pConnect .hw PipeDocument .hw Root .hw setlinkroot .hw stat .hw Unlock .hw Who |
hw_modifyobjecthw_ModifyobjectDescriptionbool hw_modifyobject ( int connection, int object_to_change, array remove, array add [, int mode] )
hw_Modifyobject() permet d'effacer, d'ajouter ou de
modifier les attributs d'un objet. L'objet est reperé par son
identifiant Le dernier paramètre détermine si la modification est récursive ou pas. 1 signifie que la modification est récursive. Si un objet ne peut pas être modifié, il sera ignoré. hw_error() n'indiquera alors pas toujours d'erreur, même si certains objets n'ont pas pu être modifiés. Les clés des deux tableaux sont les noms des attributs. La valeur de chaque élément peut être un tableau, une chaîne ou n'importe quoi d'autre. Dans le cas du tableau, la valeur de l'attribut est construite en séparant chaque élément par un point virgule. Dans le cas de la chaîne, elle sert directement de valeur. Une chaîne vide provoquera un effacement de l'attribut. Si la valeur n'est ni un tableau, ni une chaîne, aucune opération ne sera effectuée. Cela est nécessaire si vous voulez ajouter un attribut complètement nouveau, pas seulement une nouvelle valeur pour un attribut existant. Si le tableau d'effacement contenait une chaîne vide comme attribut, le serveur tenterait d'effacer l'attribut, ce qui échouerait de toute manière, car cet attribut n'existe pas. L'ajout de cet attribut échouerait aussi. Affecter la valeur de 0 à cet attribut ne l'effacerait pas, et l'ajout fonctionnerait. Si vous voulez changer l'attribut 'Nom' de valeur courante 'livres' en 'articles' vous devrez faire deux tableaux, et appeler hw_modifyobject().
Retourne TRUE si aucune erreur ne survient et FALSE sinon.
|

