Static Public Member Functions | |
static | bulkApprove ($base, $from, $to, $options=array()) |
Changes state of selected versions to new state. | |
static | listDirectoriesRecursive ($base= '//', $depth=self::DEPTH_ALL, $constraint=array(), $limit=array(), $order=array()) |
Retrieves a list of directories contained within a directory and possibly its children. | |
static | listResourcesRecursive ($base= '//', $depth=self::DEPTH_ALL, $constraint=array(), $limit=array(), $order=array()) |
Retrieves a list of resources contained within a directory and possibly its children. | |
static | listVersionsRecursive ($base= '//', $depth=self::DEPTH_ALL, $constraint=array(), $limit=array(), $order=array()) |
Retrieves a list of versions contained within a directory and possibly its children. | |
Public Attributes | |
const | DEPTH_ALL |
const | DEPTH_IMMEDIATE |
This class is a repository of static methods that can perform queries and actions on groups of Snap objects that may not be easily retrievable using methods available from, e.g., SnapDirectory. For example, this class has a method that lets you change the status of a set of versions from one state to another. The set of versions can be derived by recursively collecting versions from a directory tree.
static SnapBulkAction::bulkApprove | ( | $ | base, | |
$ | from, | |||
$ | to, | |||
$ | options = array() | |||
) | [static] |
Changes state of selected versions to new state.
You can use this method to, e.g., approve all pending versions to dev. You can use any of the following transitions:
$base | [string]: base directory to search for versions in | |
$from | [int]: one of the SnapVersion STATUS_* constants, specifying the status that versions will be converted from; versions not having this status will not be converted | |
$to | [int]: one of the SnapVersion STATUS_* constants, specifying the status that matching versions will be converted to; must follow a valid transition as given above | |
$options | [array]: there are four options that can be specified:
|
static SnapBulkAction::listDirectoriesRecursive | ( | $ | base = '//' , |
|
$ | depth = self::DEPTH_ALL , |
|||
$ | constraint = array() , |
|||
$ | limit = array() , |
|||
$ | order = array() | |||
) | [static] |
Retrieves a list of directories contained within a directory and possibly its children.
This function searches a directory, and optionally its descendant directories, for directories. You can specify additional constraints on what directories to search for. By default, the function will return all directories in the entire Snap2 tree (excluding those in /DELETED/). Note that the base directory is included in the search results.
$base | [string]: base directory to start from (defaults to '//') | |
$depth | [int]: either DEPTH_IMMEDIATE (non-recursive) or DEPTH_ALL (recursive) | |
$constraint | [array]: array of constraints | |
$limit | [mixed]: describes how many results to return | |
$order | [array]: describes how to order the results |
static SnapBulkAction::listResourcesRecursive | ( | $ | base = '//' , |
|
$ | depth = self::DEPTH_ALL , |
|||
$ | constraint = array() , |
|||
$ | limit = array() , |
|||
$ | order = array() | |||
) | [static] |
Retrieves a list of resources contained within a directory and possibly its children.
This function searches a directory, and optionally its descendant directories, for resources. You can specify additional constraints on what resources to search for. By default, the function will return all resources in the entire Snap2 tree (excluding those in /DELETED/).
$base | [string]: base directory to start from (defaults to '//') | |
$depth | [int]: either DEPTH_IMMEDIATE (non-recursive) or DEPTH_ALL (recursive) | |
$constraint | [array]: array of constraints | |
$limit | [mixed]: describes how many results to return | |
$order | [array]: describes how to order the results |
static SnapBulkAction::listVersionsRecursive | ( | $ | base = '//' , |
|
$ | depth = self::DEPTH_ALL , |
|||
$ | constraint = array() , |
|||
$ | limit = array() , |
|||
$ | order = array() | |||
) | [static] |
Retrieves a list of versions contained within a directory and possibly its children.
This function searches a directory, and optionally its descendant directories, for versions. You can specify additional constraints on what versions to search for. By default, the function will return all versions in the entire Snap2 tree (excluding those in /DELETED/).
$base | [string]: base directory to start from (defaults to '//') | |
$depth | [int]: either DEPTH_IMMEDIATE (non-recursive) or DEPTH_ALL (recursive) | |
$constraint | [array]: array of constraints | |
$limit | [mixed]: describes how many results to return | |
$order | [array]: describes how to order the results |
Search current directory and subdirectories recursively
Only search the current directory/resource and none its subdirectories