\Sampler
Gets a database sample for each given class of DataObject it is provided
- Author: UncleCheese <unclecheese@leftandmain.com>
Synopsis
class Sampler
extends Object
{
- // members
- protected array $limits = ;
- protected $classes;
- protected array $omissions = ;
- protected integer $defaultLimit = 10;
- // methods
- public void __construct()
- public ArrayList execute()
- protected boolean isOmitted()
- protected int getLimitFor()
- public Sampler setOmissions()
- public Sampler setDefaultLimit()
- public Sampler setLimits()
- public Sampler setClasses()
Hierarchy
Extends
- Object
Members
protected
- $classes
—
array
The list of classes being sampled - $defaultLimit
—
integer
The default limit for any given class that does not have a limit specified in $limits - $limits
—
array
A map of class names and their their respective sample sizes - $omissions
—
array
Classes to omit, e.g. "RedirectorPage"
Methods
protected
- getLimitFor() — Gets the limit for a given class
- isOmitted() — Returns true if a class is omitted
public
- __construct() — Constructor
- execute() — Executes the query, gets the samples
- setClasses() — Sets the list of classes
- setDefaultLimit() — Sets the default limit
- setLimits() — Sets the map of limits
- setOmissions() — Sets the list of omitted classes