<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.::灵狼天::. &#187; Libraries</title>
	<atom:link href="http://icyleaf.com/tag/libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://icyleaf.com</link>
	<description>icyleaf&#039;s blog - 心外无理，心外无物，心外无事</description>
	<lastBuildDate>Tue, 13 Dec 2011 02:34:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Modules Library 和 DBManager Module</title>
		<link>http://icyleaf.com/2009/03/modules-helper-and-dbmanager-module/</link>
		<comments>http://icyleaf.com/2009/03/modules-helper-and-dbmanager-module/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:02:36 +0000</pubDate>
		<dc:creator>icyleaf</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Modules]]></category>

		<guid isPermaLink="false">http://icyleaf.com/?p=565</guid>
		<description><![CDATA[或许大家可能有了解到，本人目前一直在对 Kohana 这个纯 PHP5 框架进行文档翻译和维护，同时也建立一个站点：Kohana爱好者。 站点提供中文化的文档，包含中文语言包的中文镜像下载支持以及中文化论坛。Kohana  凭借着基于 CodeIgniter 框架+PHP5，赢得了一群使用者，我也希望无论是国外的还是国内的使用者都能共享自己的力量。 恩&#8230;以上算是给自己打个广告。Modules Library 和 DBManager Module 均是为 Kohana 框架编写的，以后会根据自己和大家的寻求做适当的更新。 Modules Library，中文译为 扩展管理库，是一个方便管理 Kohana 系统自身扩展配置的库类，通过它使用代码就可以轻松实现获取当前所有 Modules 信息，已激活的 Moduels， 未激活的 Modules，最重要的是还可以添加 Modules，激活和关闭 Module。 范例代码： // Instance Module library $module = Module::instance(); // list all &#8230; <a href="http://icyleaf.com/2009/03/modules-helper-and-dbmanager-module/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>或许大家可能有了解到，本人目前一直在对 <a href="http://kohanaphp.com" target="_self">Kohana </a>这个纯 PHP5 框架进行文档翻译和维护，同时也建立一个站点：<a title="Kohana爱好者" href="http://khnfans.cn/" target="_self">Kohana爱好者</a>。 站点提供中文化的文档，包含中文语言包的中文镜像下载支持以及中文化论坛。Kohana  凭借着基于 CodeIgniter 框架+PHP5，赢得了一群使用者，我也希望无论是国外的还是国内的使用者都能共享自己的力量。</p>
<p>恩&#8230;以上算是给自己打个广告。Modules Library 和 DBManager Module 均是为 Kohana 框架编写的，以后会根据自己和大家的寻求做适当的更新。</p>
<p><span id="more-565"></span><br />
<strong>Modules Library</strong>，中文译为 扩展管理库，是一个方便管理 Kohana 系统自身扩展配置的库类，通过它使用代码就可以轻松实现获取当前所有 Modules 信息，已激活的 Moduels， 未激活的 Modules，最重要的是还可以添加 Modules，激活和关闭 Module。</p>
<p>范例代码：</p>
<pre lang="php" line="1" colla="+">
// Instance Module library
$module = Module::instance();

// list all modules of application in application/config/config.php
echo Kohana::debug($module->list_all());

// list active modules of application in application/config/config.php
echo Kohana::debug($module->list_active());

// list inactive modules of application in application/config/config.php
echo Kohana::debug($module->list_inactive());

// active 'auth' module
$module->active('auth');

// inactive 'auth' module
$module->inactive('auth');

// add 'sample_module' module with description.
$module->add('sample_module', 'Just a sample module');
</pre>
<p><strong>DBManager Module </strong>灵感来自 WordPress 插件 WP_DBManager，就连名字都很类似，其实对于其功能也是按照它实现。哈哈～～</p>
<p>目前对于此扩展实现的功能如下：</p>
<ul>
<li>获得当前 Mysql 版本以及 Kohana 连接数据库等信息</li>
<li>获取当前所有表数据</li>
<li>备份数据库（支持Gzip压缩和自动备份）</li>
<li>优化数据库（支持自动优化）</li>
<li>修复数据库</li>
<li>获得，下载，删除数据库备份文件</li>
</ul>
<p>此扩展支持配置和 i18n，以及对目前来说一个简易的演示页面。</p>
<p>目前还没有对实现自动备份后进行 Email 通知的功能，以及以后会对多种数据库支持。和限制最大化数据库备份文件。至于是否可以在进行数据库表数据的操作（比如查询，删除表，修改表等）是否还需要支持？</p>
<p>以后对自己发布的 Kohana 相关的代码都会托管在 Google Code 上面，地址：<a href="http://code.google.com/p/kohana-fans-cn/">http://code.google.com/p/kohana-fans-cn/</a></p>
<blockquote><p>
Hi, Don&#8217;t understand Chinese? ok, No problem. Here to view <a href="http://forum.kohanaphp.com/comments.php?DiscussionID=2117&#038;page=1">Modules Library</a> and <a href="http://forum.kohanaphp.com/comments.php?DiscussionID=2156&#038;page=1">DBManager Module</a>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://icyleaf.com/2009/03/modules-helper-and-dbmanager-module/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

