Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Controller TextMate Bundle
#!/usr/bin/env php
<?php
$name = $_ENV['TM_FILENAME'];
$class = str_replace('.php', '', $name);
$class = ucfirst($class);
$relative = str_replace($_ENV['TM_PROJECT_DIRECTORY'], '.', $_ENV['TM_FILEPATH']);
$out = <<<CORPUSCLE
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Software
*
*
* @package Project
* @author Your Name
* @copyright Copyright (c) 2010, Your Company
* @link http://ericlbarnes.com
* @since Version 1.0
*/
// ------------------------------------------------------------------------
/**
* $class Controller
*
*
* @subpackage Controllers
* @version \$Revision: 77 \$
* @Updated: \$Date: 2009-10-30 13:30:18 -0400 (Fri, 30 Oct 2009) \$
*/
class $class extends Controller
{
/**
* Constructor
*
* @return void
*/
function __construct()
{
parent::__construct();
log_message('debug', '$class Controller Initialized');
}
// ------------------------------------------------------------------------
/**
* Index File
*
*/
function index()
{
${0}
}
}
/* End of file $name */
/* Location: $relative */
CORPUSCLE;
echo $out;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.