AI助手支持GPT4.0
Churro is a plugin that allows developers to easily create pages and functionality, in a style similar to CodeIgniter.
Churro是一个插件,允许开发人员以类似于CodeIgniter的样式轻松创建页面和功能。
By itself, Churro will not add any functionality to your WordPress site.
Churro本身不会向您的WordPress网站添加任何功能。 p>
Tested with WordPress and WordPress MU 2.8.0 ~ 3.0.5
经过WordPress和WordPress MU 2.8.0〜3.0.5的测试
Requires PHP 5. PHP 4 is like 10 years old, you know?
需要PHP5。PHP4已有10年的历史了, p>
= URLs =
=网址=
Churro requires friendly urls rather than query strings.
Churro需要友好的URL,而不是查询字符串。
Your url will usually be mapped as following: yoursite.com/class/method/variables
yoursite.com/class/method/variables
您的网址通常将按以下方式映射: yoursite.com/class/method/variables code> p>Controllers控制器 h4>The controller will be directly mapped to a file and class with the same name.控制器将直接映射到具有相同名称的文件和类。For example, 例如, yoursite.com/contactyoursite.com/contact will look for a file named contact.php in the /churro/ directory.会在/ churro /目录中查找名为contact.php的文件。This file should have a class contact that extends Churro.该文件应具有扩展Churro的类联系人。Without a defined method, it will default to index.如果没有定义的方法,它将默认为索引。All methods accessible through URLs will have ‘Action’ appended to it.通过网址可访问的所有方法都将附加“操作”。The following code will provide scaffolding for yoursite.com/contact and yoursite.com/contact/submit以下代码将为 yoursite.com/contact code>和 yoursite.com/contact/submit code> p>提供支架 <?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
yoursite.com/class/method/variables code> p>Controllers控制器 h4>The controller will be directly mapped to a file and class with the same name.控制器将直接映射到具有相同名称的文件和类。For example, 例如, yoursite.com/contactyoursite.com/contact will look for a file named contact.php in the /churro/ directory.会在/ churro /目录中查找名为contact.php的文件。This file should have a class contact that extends Churro.该文件应具有扩展Churro的类联系人。Without a defined method, it will default to index.如果没有定义的方法,它将默认为索引。All methods accessible through URLs will have ‘Action’ appended to it.通过网址可访问的所有方法都将附加“操作”。The following code will provide scaffolding for yoursite.com/contact and yoursite.com/contact/submit以下代码将为 yoursite.com/contact code>和 yoursite.com/contact/submit code> p>提供支架 <?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
The controller will be directly mapped to a file and class with the same name.
控制器将直接映射到具有相同名称的文件和类。
For example,
例如,
yoursite.com/contact
will look for a file named contact.php in the /churro/ directory.
会在/ churro /目录中查找名为contact.php的文件。
This file should have a class contact that extends Churro.
该文件应具有扩展Churro的类联系人。
Without a defined method, it will default to index.
如果没有定义的方法,它将默认为索引。
All methods accessible through URLs will have ‘Action’ appended to it.
通过网址可访问的所有方法都将附加“操作”。
The following code will provide scaffolding for yoursite.com/contact and yoursite.com/contact/submit
yoursite.com/contact/submit
以下代码将为 yoursite.com/contact code>和 yoursite.com/contact/submit code> p>提供支架 <?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
yoursite.com/contact code>和 yoursite.com/contact/submit code> p>提供支架 <?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
yoursite.com/contact/submit code> p>提供支架 <?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
<?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}} code> pre>Models模型 h4>Churro gives you access to several important WordPress Models through the $this keyword. Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
<?phpclass contact extends Churro { 班级联系扩展了Churro { public function indexAction(){ 公共函数indexAction(){ } } public function submitAction(){ 公共功能SubmitAction(){ }}}}
class contact extends Churro {
班级联系扩展了Churro {
public function indexAction(){
公共函数indexAction(){
}
public function submitAction(){
公共功能SubmitAction(){
code> pre>
Churro gives you access to several important WordPress Models through the $this keyword.
$this
Churro使您可以通过 $ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ this code>关键字访问几个重要的WordPress模型。 The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availbleMU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availble
$wp
$wpdb
$wp_query
$blog_id
MU中的 $ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ wp code>, $ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ wpdb code>和 $ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ wp_query code>类以及MU中的 $ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ blog_id code>均可用without using the global keyword, eg $this->wpdb.而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
without using the global keyword, eg $this->wpdb.
$this->wpdb
而不使用全局关键字,例如 $ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ this-> wpdb code>。 p>Views观看次数 h4>Your views belong in your normal theme directory.您的视图属于您的常规主题目录。If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
Your views belong in your normal theme directory.
您的视图属于您的常规主题目录。
If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller.
$this->Theme( 'directory-name' )
如果使用多个主题,则可以在控制器中的任何位置使用 $ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ this-> Theme('directory-name') code>覆盖目录。To specify a view to use, $this->View( 'file-name' ).要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
To specify a view to use, $this->View( 'file-name' ).
$this->View( 'file-name' )
要指定要使用的视图,请 $ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ this-> View('file-name') code>。Seperating logic from views is the most important thing to remember in Churro.在Churro中,将逻辑与视图分开是最重要的事情。To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
Seperating logic from views is the most important thing to remember in Churro.
在Churro中,将逻辑与视图分开是最重要的事情。
To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.
$this->vars->var_name
$var_name
要在视图中设置变量,请在控制器中使用 $ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ this-> vars-> var_name code>,并在视图中使用 $ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
$ var_name code>。 p>Ajax / Javascript Ajax / Javascript h4>If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。 Churro defines a constant ISAJAX on each request.Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON.
如果您使用出色的jQuery javascript库,则Churro将检测ajax请求并自动返回JSON。
Churro defines a constant ISAJAX on each request.
ISAJAX
Churro在每个请求上定义一个常量 ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
ISAJAX code>。With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>Learning Churro学习油条 h3>There is much more functionality in Churro than outlined here. Churro中的功能比这里概述的要多得多。As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。Stay tuned to Substance Labs for tutorials.敬请关注物质实验室,以获取教程。 p>>
With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.
只需进行一些计划,就可以轻松创建动态应用程序,而无需使用javascript就可以完全访问它。 p>
There is much more functionality in Churro than outlined here.
Churro中的功能比这里概述的要多得多。
As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro.
截至2009年9月2日,尚没有用于使用Churro编写代码的完整,正式的文档。
Stay tuned to Substance Labs for tutorials.
敬请关注物质实验室,以获取教程。 p>>
p>
>
ol>
原文出处:http://www.sanshu.cn/a/7294.html
群主管理都是支付大佬