ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Simple MVC Framework Snippets

by nova-framework ST2/ST3

Collection of Simple MVC Framework Snippets for Sublime Text

Labels snippets

Details

  • 2015.11.03.20.28.48
  • github.​com
  • github.​com
  • 2 years ago
  • 42 minutes ago
  • 4 years ago

Installs

  • Total 3K
  • Win 2K
  • OS X 454
  • Linux 351
Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7
Windows 0 4 1 0 2 1 0 0 1 3 1 1 3 3 0 2 5 2 0 0 0 1 5 2 0 2 2 2 0 1 3 2 2 3 1 0 1 3 4 4 2 1 2 0 2 2
OS X 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0
Linux 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 2 0

Readme

Source
raw.​githubusercontent.​com

SMVC Framework Snippets

This is a Sublime Text package which includes a collection of Snippets for Simple MVC Framework.

Installation

With Package Control

If you have Package Control installed, you can install SMVC Framework Snippets from inside Sublime Text itself. Open the Command Palette and select “Package Control: Install Package”, then search for Simple MVC Framework Snippets.

All shortcuts start with the sm prefix to use type the snippet and press tab.

List of avaiable shortcuts

(placeholder) = cursor will be placed on each tab.

Routes

Core

Helpers

Assets
Csrf (Cross Site Request Forgeries)
Data
Database
Date
Document
Form
FTP
Number
Paginator
Password
Request
Url
Session

Router

Any

smanyroute
Router::any((placeholder), 'Controllers\Welcome@index');
smanyrouteany
Router::any('(placeholder)/(:any)', 'Controllers\Welcome@index');
smanyroutenum
Router::any('(placeholder)/(:num)', 'Controllers\Welcome@index');
smanyrouteall
Router::any('(placeholder)/(:all)', 'Controllers\Welcome@index');

Get

smgetroute
Router::get((placeholder), 'Controllers\Welcome@index');
smgetrouteany
Router::get('(placeholder)/(:any)', 'Controllers\Welcome@index');
smgetroutenum
Router::get('(placeholder)/(:num)', 'Controllers\Welcome@index');
smgetrouteall
Router::get('(placeholder)/(:all)', 'Controllers\Welcome@index');

Post

smpostroute
Router::post((placeholder), 'Controllers\Welcome@index');
smpostrouteany
Router::post('(placeholder)/(:any)', 'Controllers\Welcome@index');
smpostroutenum
Router::post('(placeholder)/(:num)', 'Controllers\Welcome@index');
smpostrouteall
Router::post('(placeholder)/(:all)', 'Controllers\Welcome@index');

Controller

smcontroller
namespace Controllers;

use Core\View;
use Core\Controller;

/*
*
* class_name controller
*/
class class_name extends Controller
{

    /**
     * Call the parent construct
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Define Index method
     */
    public function index()
    {

    }
}
smcon
public function __construct()
{
    parent::__construct();
    (placeholder)
}
smdocblock
/**
 * (placeholder) (placeholder)
 *
 * @author (placeholder)
 * @version (placeholder)
 * @date (placeholder)
 */
smdata
$data[(placeholder)] = (placeholder);
smdatatitle
$data['title'] = (placeholder);
smechodata
$data[(placeholder)];
smview
View::renderTemplate('header', $data);
View::render('(placeholder)/(placeholder)', $data);
View::renderTemplate('footer', $data);
smloadlang
$this->language->load((placeholder));
smgetlang
$this->language->get((placeholder));
smsetlang
$lang[(placeholder)] = (placeholder);
smuse
use Core\View;
smalias
use Helpers\(placeholder);
smfun
public function (placeholder)((placeholder)){
    (placeholder)
}
smpostdata
$postdata = array();
smthis
$this->(placeholder);
smdatarow
$data[''][0]->(placeholder);
smcss
Assets::css((placeholder));
smjs
Assets::js((placeholder));
smmaketoken
Csrf::makeToken();
smistokenvalid
Csrf::isTokenValid();
smpr
Data::pr((placeholder));
smsl
Data::sl((placeholder));
smstl
Data::stl((placeholder));
smstu
Data::stu((placeholder));
smucw
Data::ucw((placeholder));
smvd
Data::vd((placeholder));
smdbselect
$this->db->select("SELECT (placeholder) FROM ".PREFIX."(placeholder)"(placeholder));
smdbinsert
$this->db->insert(PREFIX.(placeholder),$data);
smdblastid
$this->db->lastInsertId((placeholder));
smdbupdate
$this->db->update(PREFIX.(placeholder),$data, $where);
smdbdelete
$this->db->delete(PREFIX.(placeholder),$data);
smdbtrun
$this->db->truncate($table);
smdifferencedate
Date::difference((placeholder), (placeholder));
smformatbytes
Document::formatBytes((placeholder));
smbytessize
Document::getBytesSize((placeholder));
smextension
Document::getExtension((placeholder));
smgetfiletype
Document::getFileType((placeholder));
smfoldersize
Document::getFolderSize((placeholder));
smremoveextension
Document::removeExtension((placeholder));
smformbutton
Form::button(array('name' => (placeholder), 'value' => (placeholder), 'class' => (placeholder)));
smformcheckbox
Form::checkbox(array('name' => (placeholder)));
smformclose
Form::close();
smformhidden
Form::hidden(array('name' => (placeholder), 'value' => (placeholder)));
smforminput
Form::input(array('name' => (placeholder), 'value' => (placeholder), 'class' => (placeholder)));
smformopen
Form::open(array('method' => 'post' (placeholder)));
smformradio
Form::radio(array('name' => (placeholder)));
smformselect
Form::select(array('name' => (placeholder)));
smformtextbox
Form::textarea(array('name' => (placeholder), 'value' => (placeholder), 'class' => (placeholder)));
smftpclose
$ftp->close();
smftpconnect
$ftp = new Ftp((placeholder), (placeholder), (placeholder), (placeholder));
smftpdeletedirectory
$ftp->deleteDirectory((placeholder));
smdeletefile
$ftp->deleteFile((placeholder));
smftpfolderpermission
$ftp->folderPermission((placeholder),(placeholder));
smftpmakedirectory
$ftp->makeDirectory((placeholder));
smftpuploadfile
$ftp->uploadFile((placeholder));
smnumberformat
$Number::format((placeholder));
smnumberpercentage
$Number::percentage((placeholder), (placeholder));
smpagconnect
$pages = new Paginator((placeholder), (placeholder));
smpaggetinstance
$pages->getInstance();
smpaggetlimit
$pages->getLimit();
smpaggetperpage
$pages->getPerPage();
smpaggetstart
$pages->getStart();
smpagpagelinks
$pages->pageLinks();
smpagsettotal
$pages->setTotal((placeholder));
smpasswordgetinfos
Password::getInfos((placeholder));
smpasswordmake
Password::make((placeholder));
smpasswordneedsrehash
Password::needsRehash((placeholder));
smpasswordverify
Password::verify((placeholder), (placeholder));
smrequestfiles
Request::files((placeholder), (placeholder));
smrequestisajax
Request::isAjax();
smrequestisget
Request::isGet();
smrequestispost
Request::isPost();
smrequestpost
Request::post((placeholder));
smrequestquery
Request::query((placeholder));
smautolink
Url::autolink((placeholder), (placeholder));
smtemppath
Url::templatePath();
smprev
Url::previous();
smredirect
Url::redirect((placeholder));
smgeneratesafeslug
Url::generateSafeSlug((placeholder));
smsegments
Url::segments();
smgetsegment
Url::getSegment((placeholder), (placeholder));
smfirstsegment
Url::firstSegment((placeholder));
smlastsegment
Url::lastSegment((placeholder));
smsetses
Session::set((placeholder),(placeholder));
smpullses
Session::pull((placeholder));
smgetses
Session::get((placeholder));
smidses
Session::id();
smdisplayses
Session::display();
smdestroyses
Session::destroy((placeholder));