Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • AbstractTask
  • StaffNoticeTask

Interfaces

  • LoggableInterface
  • RunnableInterface
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class AbstractTask

Base abstract class from which executable automation tasks may extend. Also provides for logging task output.

Blesta\Core\Automation\Tasks\Common\AbstractTask implements Blesta\Core\Automation\Tasks\Common\LoggableInterface, Blesta\Core\Automation\Tasks\Common\RunnableInterface

Direct known subclasses

Blesta\Core\Automation\Tasks\Common\StaffNoticeTask, Blesta\Core\Automation\Tasks\Task\ApplyInvoiceLateFees, Blesta\Core\Automation\Tasks\Task\DeliverReports, Blesta\Core\Automation\Tasks\Task\ExchangeRates, Blesta\Core\Automation\Tasks\Task\LicenseValidation, Blesta\Core\Automation\Tasks\Task\Module, Blesta\Core\Automation\Tasks\Task\PaymentReminders, Blesta\Core\Automation\Tasks\Task\Plugin, Blesta\Core\Automation\Tasks\Task\ProcessServiceChanges, Blesta\Core\Automation\Tasks\Task\ApplyPayments, Blesta\Core\Automation\Tasks\Task\Autodebit, Blesta\Core\Automation\Tasks\Task\BackupsAmazons3, Blesta\Core\Automation\Tasks\Task\BackupsSftp, Blesta\Core\Automation\Tasks\Task\CardExpirationReminders, Blesta\Core\Automation\Tasks\Task\CleanupLogs, Blesta\Core\Automation\Tasks\Task\CreateInvoices, Blesta\Core\Automation\Tasks\Task\DeliverInvoices

Indirect known subclasses

Blesta\Core\Automation\Tasks\Task\CancelScheduledServices, Blesta\Core\Automation\Tasks\Task\ProcessRenewingServices, Blesta\Core\Automation\Tasks\Task\ProvisionPendingServices, Blesta\Core\Automation\Tasks\Task\SuspendServices, Blesta\Core\Automation\Tasks\Task\UnsuspendServices
Abstract
Namespace: Blesta\Core\Automation\Tasks\Common
Package: blesta\core\Automation\Tasks\Common
Copyright: Copyright (c) 2018, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Automation/Tasks/Common/AbstractTask.php
Methods summary
public
# __construct( Blesta\Core\Automation\Type\Common\AutomationTypeInterface $task, array $options = [] )

Initialize a new task

Initialize a new task

Parameters

$task
The raw automation task
$options

An additional options necessary for the task:

  • print_log True to print logged content to stdout, or false otherwise (default false)
  • cli True if this is being run via the Command-Line Interface, or false otherwise (default true)
abstract protected boolean
# isTimeToRun( )

Determines whether this task can run at the given date

Determines whether this task can run at the given date

Returns

boolean
True if it is time for the task to run, or false otherwise
protected boolean
# isCurrentDay( integer $day )

Determines whether today is the day of the month given

Determines whether today is the day of the month given

Parameters

$day
The day of the month to check (i.e. in range [1,31])

Returns

boolean
True if today is the current day given, false otherwise
public
# setDate( Minphp\Date\Date $date )

Sets the date object for date calculations

Sets the date object for date calculations

Parameters

$date
An instance of Minphp\Date\Date
public
# loadLanguage( string $directory = null, string $langCode = null, string $filename = null )

Attempts to load a language file for use

Attempts to load a language file for use

Parameters

$directory

The path to the directory containing the language file (optional, defaults to the default language directory)

$langCode

The ISO 639-1/2 language to load the $filename for (e.g. en_us) (optional, defaults to the current language)

$filename

The name of the file (without extension) containing the file (optional, attempts to load based on the current task name)

public
# log( string $content )

Logs the given content for this task

Logs the given content for this task

Parameters

$content
The content to log to cron

Implementation of

Blesta\Core\Automation\Tasks\Common\LoggableInterface::log()
public
# logComplete( )

Marks the log completed

Marks the log completed

Implementation of

Blesta\Core\Automation\Tasks\Common\LoggableInterface::logComplete()
protected
# resetErrors( object $object )

Reset Input errors on a given object

Reset Input errors on a given object

Parameters

$object
An instance of an object containing the Input component
Methods inherited from Blesta\Core\Automation\Tasks\Common\RunnableInterface
run()
Properties summary
protected Minphp\Date\Date $date

An instance of Minphp\Date\Date

An instance of Minphp\Date\Date

#
protected The $logger

monolog logger

monolog logger

#
protected An $options

array of options for this task:

  • print_log True to print logged content to stdout, or false otherwise (default false)
  • cli True if this is being run via the Command-Line Interface, or false otherwise (default true)

array of options for this task: - print_log True to print logged content to stdout, or false otherwise (default false) - cli True if this is being run via the Command-Line Interface, or false otherwise (default true)

# []
protected An $task

instance of the task

instance of the task

#
Blesta API documentation generated by ApiGen