[ Index ] |
PHP Cross Reference of Phabricator |
[Source view] [Print] [Project Stats]
Add and remove edges between objects. You can use @{class:PhabricatorEdgeQuery} to load object edges. For more information on edges, see @{article:Using Edges}. Edges are not directly policy aware, and this editor makes low-level changes below the policy layer.
File Size: | 407 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
addEdge($src, $type, $dst, array $options = array() X-Ref |
Add a new edge (possibly also adding its inverse). Changes take effect when you call @{method:save}. If the edge already exists, it will not be overwritten, but if data is attached to the edge it will be updated. Removals queued with @{method:removeEdge} are executed before adds, so the effect of removing and adding the same edge is to overwrite any existing edge. The `$options` parameter accepts these values: - `data` Optional, data to write onto the edge. - `inverse_data` Optional, data to write on the inverse edge. If not provided, `data` will be written. param: phid Source object PHID. param: const Edge type constant. param: phid Destination object PHID. param: map Options map (see documentation). return: this |
removeEdge($src, $type, $dst) X-Ref |
Remove an edge (possibly also removing its inverse). Changes take effect when you call @{method:save}. If an edge does not exist, the removal will be ignored. Edges are added after edges are removed, so the effect of a remove plus an add is to overwrite. param: phid Source object PHID. param: const Edge type constant. param: phid Destination object PHID. return: this |
save() X-Ref |
Apply edge additions and removals queued by @{method:addEdge} and @{method:removeEdge}. Note that transactions are opened, all additions and removals are executed, and then transactions are saved. Thus, in some cases it may be slightly more efficient to perform multiple edit operations (e.g., adds followed by removals) if their outcomes are not dependent, since transactions will not be held open as long. return: this |
buildEdgeSpecs($src, $type, $dst, array $options = array() X-Ref |
Build the specification for an edge operation, and possibly build its inverse as well. |
writeEdgeData() X-Ref |
Write edge data. |
executeAdds() X-Ref |
Add queued edges. |
executeRemoves() X-Ref |
Remove queued edges. |
saveTransactions() X-Ref |
Save open transactions. |
killTransactions() X-Ref |
No description |
getPreventCyclesEdgeTypes() X-Ref |
Get a list of all edge types which are being added, and which we should prevent cycles on. return: list<const> List of edge types which should have cycles prevented. |
detectCycles(array $phids, $edge_type) X-Ref |
Detect graph cycles of a given edge type. If the edit introduces a cycle, a @{class:PhabricatorEdgeCycleException} is thrown with details. return: void |
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |