Config Config App Auth Cache Database Languages Mail Modules Routing Session Config Settings for the framework setup in app/Config.php Set the timezone to your local date_default_timezone_set('Europe/London'); Next, set the application web URL, Once…
原文:Introduction to Tag Helpers 作者:Rick Anderson 翻译:刘浩杨 校对:高嵩(Jack) 什么是 Tag Helpers? Tag Helpers 提供了什么 管理 Tag Helper 范围 Tag Helpers 智能感知支持 Tag Helpers 和 HTML Helpers 比较 Tag Helpers 和 Web 服务器控件比较 自定义 Tag Helper 元素字体 附加资源 什么是 Tag Helpers ? 在 Razor 文件中,T…
原文:Authoring Tag Helpers 作者:Rick Anderson 翻译:张海龙(jiechen) 校对:许登洋(Seay) 示例代码查看与下载 从 Tag Helper 讲起 本篇教程是对 Tag Helper 编程作以介绍. Tag Helpers 介绍 描述了 Tag Helper 的优势. Tag Helper 是任何实现 ITagHelper 接口的类(Class).然而,当你编写一个 Tag Helper,你通常是从 TagHelper 开始,这样做让你可以访问 Pr…
原文地址 https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/authoring Getting started with Tag Helpers This tutorial provides an introduction to programming Tag Helpers. Introduction to Tag Helpers describes the benefits that Tag Helpers…
原文地址 https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/intro What are Tag Helpers? Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files. For example, the built-in ImageTagHelper ca…
在 ASP.NET MVC 中使用 HTML Helpers 方法,可以返回得到标准的 HTML 标签,就像 <input>.<button> 或者 <img> 等等. 同样,你也可以创建自己的 HTML Helpers 方法,生成更加复杂的 HTML 内容. 几种不同类型的 HTML Helpers 从以下三种类型去考察 HTML Helpers 的创建和使用 01 在 View 中创建并重复使用 @helper ListingItems(string[] items…
Helpers\URL The URL class is used for having handy methods or redirecting the page and returning the path to the current template. Redirect - To redirect to another page instead of using a header call the static method redirect: Url::redirect('path/t…
Helpers\SimpleCurl The SimpleCurl class is there to curl data from RESTful services. A lot of companies use it nowadays for example twitter, google and facebook. There are four methods available these are get, post and put. You will need to declare t…
Helpers\TableBuilder Table builder helper is a class that would help you to create tables in MySQL (primarily) without really going into details of SQL query. Features Table builder allows you to add rows, aliases, set primary key, default values, ta…
Helpers\Tags The tags helper is a collection of useful methods: Tags::clean($data) Clean function to convert data into an array. Tags::get($string) This method converts the $string depending on the condition: Tags::get('[year]') Returns the year Tags…
Helpers\Sessions The session is a static class, this means it can be used in any controller without needing to be instantiated, the class has an init method if session_start() has not been set then it starts it. This call is in place in (Core/Config.…
Helpers\PHPMailer PHPMailer is a third party class for sending emails, Full docs are available athttps://github.com/Synchro/PHPMailer Make an alias: use Helpers\PhpMailer\Mail; To use PHPMailer create a new instance of it: $mail = new Mail(); Once an…
Helpers\RainCaptcha This class can validate CAPTCHA images with RainCaptcha. It can generate an URL to display a CAPTCHA validation image served by the RainCaptcha service. The class can also send a request to RainCaptcha API to verify if the text th…
Helpers\Request The Helpers\Request class is used for detecting the type of request and retrieving the request. getMethod() Request::getMethod() Returns either GET or POST, depending if a $_GET request or a $_POST request has happened. getIpAddress()…
Helpers\Number This helper has 2 methods for converting a number format and to get a percentage. Number::format($number, $prefix = '4') Converts a given number to start with a prefix, useful to making sure mobile numbers start with a 0 only when they…
Helpers\Pagination Break recordset into a series of pages. First create a new instance of the class pass in the number of items per page and the instance identifier, this is used for the GET parameter such as ?p=2 The setTotal method expects the tota…
Helpers\Password The password class uses php 5 password_ functions. To create a hash of a password, call the make method and provide the password to be hashed, once done save the $hash. $hash = Password::make($password); When logging in a user their…
Helpers\Hooks Add modules with hooks The hooks helper allows modules to be created within the module folder. Hooks allow code to be injected into various parts of the framework as well as creating new routes for modules to use. The following hooks ha…
Helpers\GeoCode This function connects to google maps and retrieves the lat/lon of the address provided GeoCode::getLngLat(['Hessle Road', 'Hull']) Returns: Array ( [lon] => -0.348839 [lat] => 53.7388284 ) Parameters are passed as an array there are…