GithubHelp home page GithubHelp logo

phpstorm_codeigniter_livetemplate's Introduction

PhpStorm Live Template for CodeIgniter ver.3 (maybe work on ver.2)

Jetbrain PhpStorm (IntelliJ IDEA) has a Live Template function. Thanks to this feature, makes it very well assist the coding work. As programming becomes more easier of CodeIgniter (ver.3), I tried to add a rule of LiveTemplate.

1. How to install.

・Put the CodeIgniter.xml and CodeIgniter_validation_rules.xml in the folder(see below.) .

Windows: <your home directory>.<product name><version number>\config\templates
Linux: ~/.<product name><version number>/config/templates
OS X: ~/Library/Preferences/<product name><version number>/templates

ex.) Windows
C:\Users\ussername\.WebIde90\config\templates\CodeIgniter.xml

PhpStorm 9.0.0 Help Live Templates

・Another way,you can import codeigniter_livetemplate.jar from menu( File / import settings...).

2. Functions

Since it is troublesome to typeing "$this->", you can complete in the snippet. Just write a snippet and Code Completion (Ctrl + Space) or LiveTemplate "COMMAND (CTRL) + J.

3.support snippets.

CodeIgniter snippets.

snippet expand
t $this->
configitem $this->config->item("configname")
view $this->load->view("name")
library $this->load->library("name")
helper $this->load->helper("name")
model $this->load->model("name")
database $this->load->database()
benchmark $this->benchmark->
config $this->config->
controller $this->controller->
hooks $this->hooks->
input $this->input->
lang $this->lang->
load $this->load->
log $this->log->
output $this->output->
router $this->router->
security $this->security->
uri $this->uri->
db $this->db->
dbforge $this->dbforge->
dbutil $this->dbutil->
calendar $this->calendar->
email $this->email->
encrypt $this->encrypt->
encryption $this->encryption->
form_validation $this->form_validation->
ftp $this->ftp->
image_lib $this->image_lib->
migration $this->migration->
pagination $this->pagination->
parser $this->parser->
table $this->table->
trackback $this->trackback->
typography $this->typography->
unit_test $this->unit_test->
upload $this->upload->
agent $this->agent->
xmlrpc $this->xmlrpc->
xmlrpcs $this->xmlrpcs->
zip $this->zip->
cache $this->cache->
session $this->session->

CodeIgniter form_validation snippets.

Type "rule-" . PhpStorm will suggest form_validation rules.

$this->form_validation->set_rules( 'v', 'somevalue', 'rule-    

CodeIgniter/Form Validation/Rule Reference

snippet expand
rule-required required
rule-alpha alpha
rule-alpha_numeric alpha_numeric
rule-alpha_numeric_spaces alpha_numeric_spaces
rule-alpha_dash alpha_dash
rule-numeric numeric
rule-integer integer
rule-decimal decimal
rule-is_natural is_natural
rule-is_natural_no_zero is_natural_no_zero
rule-valid_url valid_url
rule-valid_email valid_email
rule-valid_emails valid_emails
rule-valid_ip valid_ip
rule-valid_base64 valid_base64
rule-matches matches[form_item]
rule-regex_match regex_match[/regex/]
rule-differs differs[form_item]
rule-is_unique is_unique[table.field]
rule-min_length min_length[3]
rule-max_length max_length[12]
rule-exact_length exact_length[8]
rule-greater_than greater_than[8]
rule-greater_than_equal_to greater_than_equal_to[8]
rule-less_than less_than[8]
rule-less_than_equal_to less_than_equal_to[8]
rule-in_list in_list[red,blue,green]
rule-trim trim
rule-htmlspecialchars htmlspecialchars
rule-urldecode urldecode

phpstorm_codeigniter_livetemplate's People

Contributors

bj1024 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.