PHP Classes

File: system/Commands/Generators/Views/command.tpl.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   PHP GuestBook with Database   system/Commands/Generators/Views/command.tpl.php   Download  
File: system/Commands/Generators/Views/command.tpl.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP GuestBook with Database
GuestBook application using MySQL to store posts
Author: By
Last change:
Date: 6 months ago
Size: 1,149 bytes
 

Contents

Class file image Download
<@php

namespace {namespace};

use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
<?php if ($type === 'generator'): ?>
use CodeIgniter\CLI\GeneratorTrait;
<?php endif ?>

class {class} extends BaseCommand
{
<?php if ($type === 'generator'): ?>
use GeneratorTrait;

<?php endif ?>
/**
     * The Command's Group
     *
     * @var string
     */
    protected $group = '{group}';

    /**
     * The Command's Name
     *
     * @var string
     */
    protected $name = '{command}';

    /**
     * The Command's Description
     *
     * @var string
     */
    protected $description = '';

    /**
     * The Command's Usage
     *
     * @var string
     */
    protected $usage = '{command} [arguments] [options]';

    /**
     * The Command's Arguments
     *
     * @var array
     */
    protected $arguments = [];

    /**
     * The Command's Options
     *
     * @var array
     */
    protected $options = [];

    /**
     * Actually execute a command.
     *
     * @param array $params
     */
    public function run(array $params)
    {
<?php if ($type === 'generator'): ?>
$this->component = 'Command';
        $this->directory = 'Commands';
        $this->template = 'command.tpl.php';

        $this->execute($params);
<?php else: ?>
//
<?php endif ?>
}
}