PHP Classes

File: vendor/jackbooted/cron/SchedulerDAO.php

Recommend this page to a friend!
  Classes of Brett Dutton   JackBooted PHP Framework   vendor/jackbooted/cron/SchedulerDAO.php   Download  
File: vendor/jackbooted/cron/SchedulerDAO.php
Role: Class source
Content type: text/plain
Description: Class source
Class: JackBooted PHP Framework
Web application framework using simplified MVC
Author: By
Last change:
Date: 8 years ago
Size: 1,798 bytes
 

Contents

Class file image Download
<?php
namespace Jackbooted\Cron;

use \
Jackbooted\DB\DAO;
use \
Jackbooted\Util\Log4PHP;
/**
 * @copyright Confidential and copyright (c) 2016 Jackbooted Software. All rights reserved.
 *
 * Written by Brett Dutton of Jackbooted Software
 * brett at brettdutton dot com
 *
 * This software is written and distributed under the GNU General Public
 * License which means that its source code is freely-distributed and
 * available to the general public.
 */

class SchedulerDAO extends DAO {
    const
ACTIVE = 'Yes';

    private static
$log;

   
/**
     * @return void
     */
   
public static function init () {
       
self::$log = Log4PHP::logFactory ( __CLASS__ );
    }

   
/**
     * @return void
     */
   
public function __construct () {
       
$this->db = 'local';
       
$this->primaryKey = 'fldSchedulerID';
       
$this->tableName = 'tblScheduler';
       
$this->tableStructure = <<<SQL
CREATE TABLE IF NOT EXISTS {$this->tableName} (
             
{$this->primaryKey} varchar(11) NOT NULL default '',
              fldCommand varchar(255) NOT NULL DEFAULT '',
              fldActive enum('Yes','No') NOT NULL DEFAULT 'Yes',
              fldStartTime varchar(40) NOT NULL DEFAULT '',
              fldCron varchar(100) NOT NULL DEFAULT '',
              fldLastRun varchar(40) NOT NULL DEFAULT '',
              PRIMARY KEY (
{$this->primaryKey})
            )
SQL;

       
$this->orm = [ 'command' => 'fldCommand',
                       
'cmd' => 'fldCommand',
                       
'active' => 'fldActive',
                       
'start' => 'fldStartTime',
                       
'cron' => 'fldCron',
                       
'lastRun' => 'fldLastRun' ];

       
parent::__construct();
    }
}