# css-javascript-toolbox/11.2/controllers/package.php

CSS &amp; JavaScript Toolbox, version 11.2. 68 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/11.2/code/controllers/package.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/11.2/raw/controllers/package.php
- Modified: 2020-11-13T10:05:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/11.2/code/controllers/package.php#L10-L20`.

```php
<?php
/**
* @version $ Id; ?FILE_NAME ?DATE ?TIME ?AUTHOR $
*/

// Disallow direct access.
defined('ABSPATH') or die("Access denied");

// import dependencies.
cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');

/**
* 
* DESCRIPTION
* 
* @author ??
* @version ??
*/
class CJTPackageController extends CJTAjaxController {
	
	/**
	* put your comment there...
	* 
	* @var mixed
	*/
	protected $controllerInfo = array('model' => 'package');
	
	/**
	* 
	* Initialize new object.
	* 
	* @return void
	*/
	public function __construct() {
		// Initialize parent!
		parent::__construct();
		// Add actions.
		$this->registryAction('getReadmeFile');
		$this->registryAction('getLicenseFile');
	}
	
	/**
	* put your comment there...
	* 
	*/
	protected function getReadmeFileAction() {
		// Get package model.
		$model =& $this->model;
		// Set action parameter.
		$model->setParam('file', 'readme');
		// Load view.
		parent::displayAction();
	}

	/**
	* put your comment there...
	* 
	*/
	protected function getLicenseFileAction() {
		// Get package model.
		$model =& $this->model;
		// Set action parameter.
		$model->setParam('file', 'license');
		// Load view.
		parent::displayAction();
	}
	
} // End class.
```
