Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: jccrosby/cakephp-sublime-snippets
base: a3e3620ca6
...
head fork: jccrosby/cakephp-sublime-snippets
compare: 261b4aaa6e
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
5 .gitignore
View
@@ -1,5 +0,0 @@
-tmp/*
-config/database.php
-app/tmp/*
-app/config/database.php
-!empty
25 README.md
View
@@ -1,4 +1,23 @@
-cakephp-sublime-snippets
-========================
+This is a [Sublime Text][sublime] package which includes a a few snippets for CakePHP development.
-CakePHP Snippets for Sublime Text
+## Installation ##
+
+
+Make a clone of this repository into your packages folder:
+
+ git clone https://github.com/mpmont/ci-snippets.git CakePHP-Snippets
+
+
+[sublime]: http://www.sublimetext.com/
+
+If you find error or wathever just fork it and send me a pull request.
+
+
+#### Misc
+
+* construct
+* controller
+* model
+
+
+## List of Contributors
14 construct.sublime-snippet
View
@@ -0,0 +1,14 @@
+<snippet>
+ <content><![CDATA[
+public function __construct()
+{
+ parent::__construct();
+ ${0://Do your magic here}
+}
+]]></content>
+ <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
+ <tabTrigger>construct</tabTrigger>
+ <!-- Optional: Set a scope to limit where the snippet will trigger -->
+ <scope>source.php</scope>
+ <description>CakePHP Class Constructor</description>
+</snippet>
22 controller.sublime-snippet
View
@@ -0,0 +1,22 @@
+<snippet>
+ <content><![CDATA[
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class ${1:${TM_FILENAME/(.+)\..+|.*/\u$1/:Controllername}} extends AppController {
+
+ public function index()
+ {
+ $0
+ }
+
+}
+
+/* End of file ${1/(.+)/\l$1/:Controllername}.php */
+/* Location: ./application/controllers/${1/(.+)/\l$1/:Controllername}.php */
+]]></content>
+ <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
+ <tabTrigger>controller</tabTrigger>
+ <!-- Optional: Set a scope to limit where the snippet will trigger -->
+ <scope>source.php, text.html.basic, text.plain</scope>
+ <description>CakePHP Base Controller</description>
+</snippet>
1  messages/0.1.1.txt
View
@@ -0,0 +1 @@
+CakePHP Snippets 0.0.1 Changelog:
19 model.sublime-snippet
View
@@ -0,0 +1,19 @@
+<snippet>
+ <content><![CDATA[
+<?php
+
+class ${1:${TM_FILENAME/(.+)\..+|.*/\u$1/:ModelName}} extends AppModel {
+
+ $0
+
+}
+
+/* End of file ${1/(.+)/\l$1/:ModelName}.php */
+/* Location: ./application/controllers/${1/(.+)/\l$1/:ModelName}.php */
+]]></content>
+ <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
+ <tabTrigger>model</tabTrigger>
+ <!-- Optional: Set a scope to limit where the snippet will trigger -->
+ <scope>source.php, text.html.basic, text.plain</scope>
+ <description>CakePHP Base Model</description>
+</snippet>

No commit comments for this range

Something went wrong with that request. Please try again.