標籤:
今天(周一)看到一位同仁的生活規劃,感覺挺適合我,實踐一下,就theo&tools day+code day+blog day,間歇性有happy day嘛~
blog day這樣做,一篇blog總結,內容多的分出去寫單篇,在總結篇中給連結
=================================================
2016.06.20
本來打算寫一個小網頁的,關於摩斯碼的,但是zend工具都用不好,找了個部落格寫的不錯,實踐下,有時間的話再去學點其他的
===================
坑http://my.oschina.net/junn/blog/161409——zend
2. 預設情況下,zend studio打不開.tpl檔案,有沒有什麼方法,能讓其支援.tpl的模板檔案,以及其它格式,如dwt等相關的檔案.
要 開啟.tpl檔案,你可以開啟window->preferences ->general->content types,在右邊選擇一個檔案類型,比如html,在下面添加*.tpl,儲存之。這樣雙擊*.tpl的檔案即可用zde內建的編輯器開啟了。
4、如何在zend studio for eclipse中,每次建立一個檔案時,顯示
/**
*
* @copyright(c) 2009
* @author oo
* @package common
* @version $Id: template.php
*/
現實累死(顯示類似[gently注])這樣子的東西 網上查說叫PHPDOC,但是還是沒搞明白 謝謝
這個是zend studio for eclipse的Templates功能
老版本:進入菜單window->preferences->php->templates,在右邊找到New simple PHP file
新版本:進入菜單window->preferences->php->code style->code templates, 在左邊找到Simple php file,
預設的內容是這樣的:
< ?php
${cursor}
?>
就 是我們使用zend studio for eclipse new phpfile的時候預設的模板,你可以直接修改這個模板來滿足你的要求,當然更好的做法是建立一個template,其context選擇new php,然後編輯你的模板,這裡支援一些變數。BTW:很多人可能以為${user}可以作為Author來用,而實際上這個變數是你的OS登入名稱,例如 我的就是administrator。
那麼,怎麼使用它呢?在使用New->php file建立檔案的時候,在嚮導的下一步使用你修改過的New simple PHP file或者建立的模板名稱
新版本:進入菜單window->preferences->php->code style->code templates可以添加檔案頭注釋:
<?php/** * xxx.php * ============================================== * Copy right 2013-2014 http://www.123.com * ---------------------------------------------- * This is not a free software, without any authorization is not allowed to use and spread. * ============================================== * @param ${unknowtype} * @return ${return_type} * @author: ${user} * @date: ${date} * @version: v1.0.0 */ /** * @func: 函數功能描述 * @date: ${date} * @author: ${user} * @return: ${return_type} *//** * 檔案描述 * @date ${date} ${time} * @author xxx * @version 1.0.0 * @copyright xxx *//** * @desc: 功能描述(description) * @author: ${user} * @date: ${date} */#要添加的模板格式##名稱:mdt#描述:Methods describe the template#模式:/** * The descriptions of functions. * * @access public|private|protected * @param mixed $$name comment * @param int $$name comment * @param string $$name comment * @param bool $$name comment * @param array $$name comment * @return void|int|string|boolean|array comment */#樣本如下# /** * The descriptions of functions. * * @access public|private|protected * @param mixed $name comment * @param int $name comment * @param string $name comment * @param bool $name comment * @param array $name comment * @return void|int|string|boolean|array comment */?>
新版本:進入菜單window->preferences->php->editor->templates可以建立模板 :
6、zend stdio for ecplise的程式碼摺疊功能功能?
主要要設定兩個地方,分別針對PHP以及其它的檔案
現在的視圖:
程式碼摺疊功能快速鍵:
Ctrl+/(小鍵盤) 摺疊當前類中的所有代碼
Ctrl+*(小鍵盤) 全部展開當前類中的所有代碼
Ctrl+Shift+/ 全部摺疊當前類中的所有代碼
7、常用的一些快速鍵:
1. ctrl+D 鍵 ,這樣可以來刪除當前游標所在的行.
2. 在編輯視窗中,再按按鍵組合 CTRL+E。 可以彈出要進行切換的頁面.
3. 增加多行動縮排度
在編輯視窗中,選擇任意多行代碼,再按Tab 鍵,這些代碼的縮排增加一個Tab的距離。(要移除縮排,選擇這些代碼,再按按鍵組合 Shift + Tab)。
4. Ctrl+/ 單行注釋。當前為代碼時,則在游標所在行添加雙斜杠行注釋,多行則每一行都添加雙斜杠;而當代碼為html時則在行前後添加<!-- -->注釋,選中多行將在選區前後添加<!-- -->注釋,而非每行添加
5. Ctrl+Shift+/ 塊注釋,為選擇的PHP代碼添加/* */塊注釋,如果沒有選擇任何代碼,則將游標所在行添加塊注釋
6. ctrl+shilft+f 對代碼進行快速的格式化
7. ctrl+H 在整個項目中來尋找某一個方法名,或者是其它相關的檔案
8. 當游標移動到某一行時,左鍵單擊三次,來選中整個行.
9. zend studio for ecplise 下的tab代碼縮排
=============
http://blog.csdn.net/e421083458/article/details/48712691
zend studio自動添加檔案注釋和方法注釋
進入喜好設定=>PHP=>Editor=>Template=>New
檔案注釋:
Name\Description\Pattern裡面分別填入(換行作為間隔):
3cfile
檔案注釋模板
/**
* 檔案用途描述
* @date: ${date} ${time}
* @author: ${user}
*/
函數注釋:
3cmethod
方法注釋模板
/**
* 函數用途描述
* @date: ${date} ${time}
* @author: ${user}
* @param: ${variable}
* @return:
*/
使用方法:
敲個字母3然後按照代碼提示,選擇即可。
==================
以上基本上都是轉載的,但是總結兩邊的東西,自己做了建立檔案simple php的架構,以及類,方法和函數等的模板,明天貼上來!
明天,周三嘛,code day好了,做摩斯碼網頁給自己用,先不嘗試模板了,先是簡單的OO&MVC模式的製作吧,嘻嘻
按日子來幹活——第一個Blog Day&Happy Day