Class: Gliffy
Source Location: /Gliffy.php
Primary method of interacting with Gliffy.
Author(s):
- David Copeland, Chris Kohlhardt
|
|
|
|
Class Details
Class Variables
Class Methods
constructor Gliffy [line 126]
Gliffy Gliffy(
string
$username, [function
$error_callback = null])
|
|
Create a new connection to Gliffy. This should be done as part of the user authentication/session creation.
Tags:
Parameters:
destructor __destruct [line 153]
method addUser [line 662]
boolean addUser(
string
$username)
|
|
Adds the named user to the account, if sufficient users exist. An exception here indicates a problem unrelated to the account maximum.
Tags:
Parameters:
method addUserToFolder [line 559]
void addUserToFolder(
string
$folderName, string
$username)
|
|
Adds the user to the given folder, so that he may have access to that folder's contents.
Tags:
Parameters:
method createDiagram [line 258]
integer createDiagram(
string
$diagramName, [int
$templateDiagramId = 0])
|
|
Creates a new diagram with the given name, possibly based on an existing diagram.
Tags:
Parameters:
method createFolder [line 508]
void createFolder(
string
$folderPath)
|
|
Creates a folder at the given path. Throws an exception if there was a problem (including the folder already existing)
Tags:
Parameters:
method deleteDiagram [line 288]
void deleteDiagram(
integer
$diagramId)
|
|
Deletes the diagram.
Tags:
Parameters:
method deleteFolder [line 524]
void deleteFolder(
string
$folderPath)
|
|
Deletes the folder with the given path. All diagrams in this folder will move to the default folder (which, incidentially, cannot be deleted). This throws an exception if the folder didn't exist or there was some other problem.
Tags:
Parameters:
method deleteToken [line 166]
Delete the OAuth token for this user, effectively logging the user out. Any image links or other request URL's created using this token will become invalid.
Tags:
method deleteUser [line 642]
void deleteUser(
string
$username)
|
|
Deletes the given user (from this acount), which may not be the user whose session owns this object. If the user doesn't have access to other Gliffy accounts, his record is deleted. This cannot be undone.
Tags:
Parameters:
method getAccountInfo [line 788]
method getAdmins [line 709]
Returns the list of "admins" for the account. Admins can mean whatever you want them to mean, however for Gliffy, an admin is simply someone who has access to all Folders of an account.
Tags:
method getDiagramAsImage [line 313]
mixed getDiagramAsImage(
integer
$diagramId, [string
$mime_type = Gliffy::MIME_TYPE_PNG], [string
$file = null], [string
$size = null], [integer
$version = null])
|
|
Gets the diagram as an image, possibly saving it to a file.
Tags:
Parameters:
method getDiagramAsURL [line 384]
string getDiagramAsURL(
integer
$diagramId, [string
$mime_type = Gliffy::MIME_TYPE_PNG], [string
$size = null], [string
$version = null], [boolean
$force = false])
|
|
Returns a URL to the diagram that can be used in an HTML IMG tag. This URL is only good as long as the user's token is good, so it should not be use for long-term reference to the diagram. Parameters are the same as for getDiagramAsImage, save for the missing file parameter.
Tags:
Parameters:
method getDiagramAsXML [line 784]
void getDiagramAsXML(
$diagramId)
|
|
Tags:
Parameters:
method getDiagramMetaData [line 463]
Returns meta-data about a particular diagram. Note that an anonymous user will get a 401/Unauthorized, if they attempt to get meta data about a non-public diagram. To make things easier, this method will return a GliffyDiagram object. This way "null" can be viewed as a bad diagram id, an exception can be viewed as an legitimate problem and a non-null return as something usable. If the user owning this Gliffy object is anonymous, and the returned diagram is not public, you will know that they recieved a 401 from the back-end.
Tags:
Parameters:
method getDiagrams [line 416]
array getDiagrams(
[string
$folderPath = null])
|
|
Gets a list of diagrams, either for the entire account, or for the given folder.
Tags:
Parameters:
method getEditDiagramLink [line 487]
String getEditDiagramLink(
integer
$diagramId, [string
$returnURL = null], [string
$returnText = null])
|
|
Builds a returns a Gliffy editor launch link for the given diagram id
Tags:
Parameters:
method getFolders [line 539]
Returns all folders in this account.
Tags:
method getUserDiagrams [line 727]
array getUserDiagrams(
[string
$username = null])
|
|
Gets all diagrams that the user can access
Tags:
Parameters:
method getUserFolders [line 623]
array getUserFolders(
string
$username)
|
|
Returns the folders the given user has access to.
Tags:
Parameters:
method getUsers [line 595]
array getUsers(
[string
$folderName = null])
|
|
Returns all users in the account, or in the folder specified.
Tags:
Parameters:
method hasToken [line 177]
Returns true if this object has a token for the user. This makes no call to the server and will not try to update the user's token.
Tags:
method moveDiagram [line 443]
void moveDiagram(
integer
$diagramId, string
$folderPath)
|
|
Moves the diagram from its current folder to the new folder (if the user owning this session has access to the diagram
Tags:
Parameters:
method removeUserFromFolder [line 577]
void removeUserFromFolder(
string
$folderName, stinrg
$username)
|
|
Removes the user from the given folder.
Tags:
Parameters:
method updateDiagramContent [line 748]
void updateDiagramContent(
$diagramId,
$content)
|
|
Tags:
Parameters:
method updateToken [line 190]
Update the user's token, if it needs it. This gets the user token from Gliffy, which can have one of three effects: - If the user exists and has a valid token, it is returned
- If the user exists and has no token, or an expired one, a new one is created and returned
- If the user is unknown to gliffy, they are provisioned
Whatever the outcome, the internal state of this object is updated with the new token.
Tags:
Parameters:
method updateUser [line 686]
void updateUser(
string
$username, [boolean
$admin = null], [string
$email = null], [string
$password = null])
|
|
Updates the user's information. This is useful for three things: - manage account "admins"
- if you wish to store actual user emails with their gliffy accont for simplified association
- if you wish to allow users to access your Gliffy data via the Gliffy website. With the email and password, they
will be able to login to Gliffy outside of your application.
Tags:
Parameters:
Class Constants
|
|