好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

emlog MVC解构18--Model模型之Plugin_Model

模型Plugin_Model是开发插件必须了解的一个模型。

属性表:

属性注释
private $db内部数据库连接对象,用于存取插件数据库数据
private $plugin从本插件根目录到入口文件的路径字符串

方法表:

方法注释
function __construct()构造方法,新建内部数据库连接对象
function activePlugin($plugin)激活插件,更新Option配置,若文件存在,引用插件里面的'插件名_callback.php'文件,调用callback_init()函数,$plugin为从本插件根目录到入口文件的路径字符串,返回是否激活成功
function inactivePlugin($plugin)禁用插件,更新Option配置,若文件存在,引用插件里面的'插件名_callback.php',调用callback_rm()函数
function getPlugins()

获取所有插件列表,未定义插件名称的插件将不予获取

注意:返回全局变量$emPlugins为包含插件相关数据的数组

function getPluginData($pluginFile)

获取插件信息,$pluginFile是从本插件根目录开始到入口文件的路径字符串,返回包含插件信息的数组:

array(

  'Name' => 自定义插件名,

  'Version' => 插件版本,

  'Description' => 插件描述,

  'Url' => 插件说明页面网址,

  'Author' => 开发者,

  'ForEmlog' => 适用emlog版本,

  'AuthorUrl' => 开发者个人网站网址,

  'Setting' => true/false是否存在'插件名_setting.php'插件配置文件,

  'Plugin' => 插件根目录名,

)

注意定义时得这么做:

/*

Plugin Name:自定义插件名

Version:插件版本

Plugin URL:插件说明页面网址

Description:插件说明

ForEmlog:使用emlog版本

Author:开发者

Author URL:开发者个人网站网址

*/

定义时左右的空格将在获取时自动删除


点赞0
 标签: emlog mvc model plugin_model
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
jkjuiceplus
 jkjuiceplus 约 18 小时前回复
#174
<a href="http://www.goodmedusa.com/nike-air-max-thea-prm-bianca-scarpej">nike air max thea prm bianca</a> <a href="http://www.murskacorp.com/nike-air-max-2015-schwarz-and-wei%C3%9F-schuhej">nike air max 2015 schwarz and wei脽</a> <a href="http://www.prajansim.com/cleveland-indians-new-era-mlb-perfect-pastel-9twenty-cap-hath">cleveland indians new era mlb perfect pastel 9twenty cap</a> <a href="http://www.pokersurga.com/air-jordan-retro-3-blanc-gris-rouge-leopard-chaussuresh">air jordan retro 3 blanc gris rouge leopard</a> <a href="http://www.arkmmj.com/nike-roshe-wei%C3%9F-schuheh">nike roshe wei脽</a> <a href="http://www.butterbroad.com/nike-mercurial-superfly-red-yellow-shoesk">nike mercurial superfly red yellow</a>
jkjuiceplus http://www.jkjuiceplus.com/
iranpayamco
 iranpayamco 约 22 小时前回复
#173
<a href="http://www.diplomabroad.com/nike-air-max-command-pelle-bianca-scarpej">nike air max command pelle bianca</a> <a href="http://www.trechadental.com/mizuno-wave-prophecy-6-bianca-argento-oro-scarpei">mizuno wave prophecy 6 bianca argento oro</a> <a href="http://www.akhbarsanaye.com/florida-state-seminoles-47-ncaa-47-franchise-cap-hath">florida state seminoles 47 ncaa 47 franchise cap</a> <a href="http://www.timxes.com/vert-converse-tout-star-high-tops-chaussuresh">vert converse tout star high tops</a> <a href="http://www.leadercheetah.com/nike-air-max-90-essential-noir-and-rouge-chaussuresj">nike air max 90 essential noir and rouge</a> <a href="http://www.arealleader.com/nike-roshe-frau-light-blau-wei%C3%9F-schuhek">nike roshe frau light blau wei脽</a>
iranpayamco http://www.iranpayamco.com/
zeraxia
 zeraxia 2019-04-23 01:26回复
#172
<a href="http://www.avantajreyonu.com/adidas-eqt-primeknit-nero-scarpej">adidas eqt primeknit nero</a> <a href="http://www.oranjeskishop.com/nike-high-tops-ic-indoor-magistax-proximo-rot-wei%C3%9F-schuhei">nike high tops ic indoor magistax proximo rot wei脽</a> <a href="http://www.johannafrost.com/nike-cortez-nylon-m%C3%A6nd-guld-gul-r%C3%B8d-skoh">nike cortez nylon m忙nd guld gul r酶d</a> <a href="http://www.rolandviet.com/russell-westbrook-hockey-jersey-nfli">russell westbrook hockey jersey</a> <a href="http://www.classmedya.com/nike-air-max-90-bl%C3%A5-svart-hvit-obuvk">nike air max 90 bl氓 svart hvit</a> <a href="http://www.anteageserums.com/coach-travel-luggage-set-coachh">coach travel luggage set</a>
zeraxia http://www.zeraxia.com/
cacikvideo
 cacikvideo 2019-04-22 18:29回复
#171
<a href="http://www.thebiarritz.com/hombres-nike-flyknit-roshe-run-p%C3%BArpura-naranja-zapatosk">hombres nike flyknit roshe run p煤rpura naranja</a> <a href="http://www.voydnet.com/nike-roshe-run-trainers-in-azul-zapatosp">nike roshe run trainers in azul</a> <a href="http://www.foneandlone.com/womens-north-face-denali-grey-northfaceh">womens north face denali grey</a> <a href="http://www.roomwhiz.com/air-jordan-retro-4-dam%C3%A4nner-minzgr%C3%BCn-gr%C3%BCn-schuhej">air jordan retro 4 dam盲nner minzgr眉n gr眉n</a> <a href="http://www.riffsurfers.com/kvinders-nike-shox-current-r%C3%B8d-sort-skoh">kvinders nike shox current r酶d sort</a> <a href="http://www.davidmgaines.com/femmes-air-jordan-retro-2-gris-rose-chaussuresh">femmes air jordan retro 2 gris rose</a>
cacikvideo http://www.cacikvideo.com/
pragaoviedo
 pragaoviedo 2019-04-22 10:49回复
#170
<a href="http://www.poradanomada.com/nike-shox-gr%C3%A5-gr%C3%B8nnike-air-max-ltd-3-for-salg-skoj">nike shox gr氓 gr酶nnike air max ltd 3 for salg</a> <a href="http://www.njdevsblog.com/mens-white-ralph-lauren-t-shirt-poloh">mens white ralph lauren t shirt</a> <a href="http://www.theuonline.com/womens-nike-lunarglide-7-purple-shoesi">womens nike lunarglide 7 purple</a> <a href="http://www.myflexijob.com/nike-air-zoom-pegasus-grigio-scarpej">nike air zoom pegasus grigio</a> <a href="http://www.myglobalsms.com/nike-lebron-12-wei%C3%9F-schuhej">nike lebron 12 wei脽</a> <a href="http://www.playunreal.com/houston-astros-fitted-hat-hath">houston astros fitted hat</a>
pragaoviedo http://www.pragaoviedo.com/
handykontakte
 handykontakte 2019-04-21 22:48回复
#169
<a href="http://www.drcooper.net/nike-free-run-5.0-gr%C3%A5-kvinners-loafers-obuvc">nike free run 5.0 gr氓 kvinners loafers</a> <a href="http://www.drinkableair.net/nike-air-max-infrarojo-essential-chaussuresg">nike air max infrarojo essential</a>
handykontakte http://www.handykontakte.net/
frugstore
 frugstore 2019-04-21 09:36回复
#168
<a href="http://www.hangrysquad.com/jordan-retro-13-true-rosso-kurpesf">jordan retro 13 true rosso</a> <a href="http://www.lmbaidu.com/asics-gel-kayano-21-blanco-negro-cielo-azul-obuva">asics gel kayano 21 blanco negro cielo azul</a> <a href="http://www.reinerbrach.com/turquoise-bl%C3%A5-polo-shirt-polot">turquoise bl氓 polo shirt</a> <a href="http://www.suyuds.com/nike-kobe-11-gr%C3%A5-himmelen-bl%C3%A5-schuhee">nike kobe 11 gr氓 himmelen bl氓</a> <a href="http://www.betascgx.com/nike-flyknit-racer-volt-sort-sequoia-scarped">nike flyknit racer volt sort sequoia</a> <a href="http://www.betsybucci.com/nfl-nike-pittsburgh-steelers-90-t-j-watt-ash-one-color-pullover-hoodie-nflx">nfl nike pittsburgh steelers 90 t j watt ash one color pullover hoodie</a>
frugstore http://www.frugstore.com/
addaxia
 addaxia 2019-04-21 09:15回复
#167
<a href="http://www.airdirectairways.net/nike-flyknit-air-max-negro-rose-naranja-plata-kurpese">nike flyknit air max negro rose naranja plata</a> <a href="http://www.allinforchrist.net/air-max-90-blumes-rot-rosa-chaussuresa">air max 90 blumes rot rosa</a> <a href="http://www.allproinspections.net/nike-free-5.0-v2-dam%C3%A4nner-gold-silber-kurpesg">nike free 5.0 v2 dam盲nner gold silber</a> <a href="http://www.americanparkinsonla.net/mujeres-nike-roshe-run-speckle-blanco-rosado-schuhee">mujeres nike roshe run speckle blanco rosado</a> <a href="http://www.amicsdelball.net/air-jordan-retro-11-low-blanco-zen-gris-obuvg">air jordan retro 11 low blanco zen gris</a> <a href="http://www.amishcraftedgazebos.net/adidas-zx-flux-zapatos-hombres-health-kurpesf">adidas zx flux zapatos hombres health</a>
[url=http://www.addaxia.net/]addaxia[/url]
lmladeco
 lmladeco 2019-04-21 04:41回复
#166
<a href="http://www.zeraxia.com/milwaukee-brewers-new-era-mlb-x-wilson-circle-patch-59fifty-cap-hatk">milwaukee brewers new era mlb x wilson circle patch 59fifty cap</a> <a href="http://www.turisim.com/kvinders-nike-hyperdunk-low-2017-gr%C3%B8n-skoj">kvinders nike hyperdunk low 2017 gr酶n</a> <a href="http://www.sybelite.com/ralph-lauren-green-striped-shirt-poloh">ralph lauren green striped shirt</a> <a href="http://www.lemodemo.com/nike-air-max-1-men-black-grey-white-shoesi">nike air max 1 men black grey white</a> <a href="http://www.fskanglipu.com/maschio-nike-zoom-out-verde-grigio-scarpej">maschio nike zoom out verde grigio</a> <a href="http://www.tekmenu.com/air-max-90-premium-em-m%C3%A4nner-schwarz-blau-silber-schuhej">air max 90 premium em m盲nner schwarz blau silber</a>
lmladeco http://www.lmladeco.com/
cooterscamera
 cooterscamera 2019-04-20 09:02回复
#165
<a href="http://www.sugarforspice.com/mennns-nike-flyknit-lunar-3-r%C3%B8d-bl%C3%A5-obuvj">mennns nike flyknit lunar 3 r酶d bl氓</a> <a href="http://www.mybancorphsa.com/nike-air-max-shake-evolve-bianca-scarpep">nike air max shake evolve bianca</a> <a href="http://www.scopatore.com/femmes-nike-roshe-run-rouge-jaune-chaussuresh">femmes nike roshe run rouge jaune</a> <a href="http://www.galacticlogos.com/prada-bt1516-handbags-in-black-pradah">prada bt1516 handbags in black</a> <a href="http://www.ispardmore.com/kids-kevin-love-jersey-nfli">kids kevin love jersey</a> <a href="http://www.radioramabc.com/nike-zoom-hyperrev-r%C3%B8d-hvid-skoq">nike zoom hyperrev r酶d hvid</a>
cooterscamera http://www.cooterscamera.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸