AdvancedTask

Extends \AdvancedShell

Advanced shell task

package

AdvancedShell

subpackage

Task

Methods

Returns interval value specified by parameter or default value

_getInterval(string $interval) : string

Arguments

$interval

string

If not null method return this value

Response

string

Returns DatePeriod starting from $Date or now with $default_shift splitted by $interval

_getPeriod(\DateTime $Date = null, string $defaultShift = '', string $interval = null) : \DatePeriod

Arguments

$Date

\DateTime

Start date

$defaultShift

string

Shift date if $Date is null, for ex. "1 day"

$interval

string

Interval, for ex. "1 hour"

Response

\DatePeriod

Returns DatePeriod starting from $Date splitted by $interval

_getPeriodByDate(\DateTime $Date, string $interval = null) : \DatePeriod

Arguments

$Date

\DateTime

Start date

$interval

string

Interval, for ex. "1 hour"

Response

\DatePeriod

Returns DateRange starting from $Date or now with $default_shift splitted by $interval

_getRange(\DateTime $Date = null, string $defaultShift = '', string $interval = null) : \DatePeriod

Arguments

$Date

\DateTime

Start date

$defaultShift

string

Shift date if $Date is null, for ex. "1 day"

$interval

string

Interval, for ex. "1 hour"

Response

\DatePeriod

Adds script to sceduler

_schedule(string $command, string $path, array $arguments, array $options) 

Arguments

$command

string

$path

string

$arguments

array

$options

array

Returns variables for schedule

_scheduleVars() : array
global

array $argv

Response

array

Displays a header for the shell

_welcome() 
inherited

Execute command

execute() 

{@inheritdoc}

getOptionParser() : \ConsoleOptionParser
inherited

Response

\ConsoleOptionParser

Returns ScheduleSplitter for current task

getScheduleSplitter() : \ScheduleSplitter

Returns true if script must be scheduled

isScheduled() : boolean

Response

boolean

{@inheritdoc}

runCommand(string $command, array $argv) : boolean

Arguments

$command

string

$argv

array

Response

boolean

Adds script to sceduler (for ex by date range)

schedule() 

Set ScheduleSplitter for current task

setScheduleSplitter(\ScheduleSplitter $Splitter) 

Arguments

$Splitter

\ScheduleSplitter

Shows sql dump

sqlDump(boolean $sorted = false, boolean $clear = true) 
inherited

Arguments

$sorted

boolean

Get the queries sorted by time taken, defaults to false.

$clear

boolean

If True the existing log will cleared.

{@inheritdoc}

startup() 
inherited

Stop and output statistics

statisticsEnd(string $name) 
inherited

Arguments

$name

string

Start statistics

statisticsStart(string $name) 
inherited

Arguments

$name

string

Properties

Current subcommand name (method in task)

action : string
var

Type(s)

string

If true newx task will wait for previous.

_scheduleNextTaskDependsOnPrevious : boolean

First task don't wait anyone

var

Type(s)

boolean

Class for splitting one task into many by arguments

_ScheduleSplitter : \ScheduleSplitter
var

Type(s)

\ScheduleSplitter

{@inheritdoc}

tasks : array
inherited
var

Type(s)

array

{@inheritdoc}

uses : array
inherited
var

Type(s)

array

Timer

_startTime : array
inherited
var

Type(s)

array