createGroup() public method

createGroup
public createGroup ( )
コード例 #1
0
    echo "End of Pad Text\n\n<hr>";
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\ngetText Failed with message " . $e->getMessage();
}
/* Example: Delete Pad */
try {
    $instance->deletePad('testPad');
} catch (Exception $e) {
    // the pad doesn't exist?
    echo "\n\ndeletePad Failed with message " . $e->getMessage();
}
echo "<h1>Groups</h1>";
/* Example: Create Group */
try {
    $createGroup = $instance->createGroup();
    $groupID = $createGroup->groupID;
    echo "New GroupID is {$groupID}\n\n";
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\ncreateGroup Failed with message " . $e->getMessage();
}
/* Example: Create Group Pad */
try {
    $newPad = $instance->createGroupPad($groupID, 'testpad', 'Example text body');
    $padID = $newPad->padID;
    echo "Created new pad with padID: {$padID}\n\n";
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\ncreateGroupPad Failed with message " . $e->getMessage();
}