Difference between revisions of "METADATA ENCODE()"

From Lianjapedia
Jump to: navigation, search
 
Line 10: Line 10:
 
==Description==
 
==Description==
 
The METADATA_ENCODE() function is used to encode a string from the object representing metadata, <object>.
 
The METADATA_ENCODE() function is used to encode a string from the object representing metadata, <object>.
 +
 +
Note that conditional metadata - where multiple conditions and matching values can be applied to a single attribute name - should be handled using the [[MetaData Editor]], not using an object, since object member names must be unique.
  
 
==Example==
 
==Example==

Latest revision as of 05:03, 11 April 2017

Purpose

Function to encode a string from an object representing metadata

Syntax

METADATA_ENCODE(<object>)

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COLUMNMETADATA(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, JSON_DECODE(), JSON_DECODE_FILE(), JSON_ENCODE(), LIST CLASSES, LOADOBJECT(), MetaData Editor, METADATA_DECODE(), METADATA_FINDTYPE(), NEWOBJECT(), OBJECT(), PRINT_JSON(), PRINT_HTML(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SQL SELECT, SOCKET_CLOSE(), SOCKET_LASTERROR(), SOCKET_OPEN(), SOCKET_PEEK(), SOCKET_READ(), SOCKET_SERVER(), SOCKET_WRITE(), TABLEMETADATA(), TABLEMETADATAVERSION(), WITH, XML_DECODE_FILE()

Description

The METADATA_ENCODE() function is used to encode a string from the object representing metadata, <object>.

Note that conditional metadata - where multiple conditions and matching values can be applied to a single attribute name - should be handled using the MetaData Editor, not using an object, since object member names must be unique.

Example

myobj = METADATA_DECODE("name=barry;company=Lianja;amount=10")
? myobj
 
Object (refcnt=1)
(
    [name] => barry
    [company] => Lianja
    [amount] => 10
)
 
cStr = METADATA_ENCODE(myobj)
? cStr
 
name=barry;company=Lianja;amount=10