Please refer to the Chinese version of this SRS, github. comPizzaLiuPHP-FIG or English original: www.php-fig.org where PRS-0, PSR-1, PSR-2, PSR-4 are better understood, but do not understand, what is the meaning of PSR-3, is said if write log class, it is best to inherit... look at the Chinese version of this HDR, http
: This article mainly introduces the content of the series of PHP-related SRs. if you are interested in the PHP Tutorial, please refer to it. PSR
Is short for PHP Standard Recommendation, it should actually be called PSRs, that is, the series of Recommendation standards: currently through the specification of PSR-0 (Autoloading Standard), PSR-1 (Basic Coding Sta
advantage of YII is that the core developer is a PSR producer, a member of the PHP framework collaboration organization.
For technical choices, the only advice is not to support the technology platform, but to objectively compare whether they apply to the current application scenario. The simplest example is NoSQL, and the choice of which database depends on the application scenario. Some of the other data storage scenarios are not impossible to do,
Composer works.
For the automatic loading of third-party packages, Composer provides support in four ways: automatic loading of PSR-0 and PSR-4 (one of my articles has also introduced them ), generate class-map and directly include files.
PSR-4 is a recommended method for composer because it is easier to use and can bring a more concise directory structure. In c
at one of my previous articles.)Next, let's see how composer does it.
For automatic loading of third-party packages, composer provides support in four ways, the automatic loading of PSR-0 and PSR-4 (which I have described in an article), the generation of Class-map, and the way in which files are directly contained.
PSR-4 is a recommended way for composer, bec
" LetG:php_cs_fixer_enable_default_mapping =1"Enable the mapping By default (
PCD) Let G:php_cs_fixer_dry_run = 0"
Call command withDry-runoption LetG:php_cs_fixer_verbose =0Return The output of command if 1, else an inline information.
The above configuration we found
let g:php_cs_fixer_enable_default_mapping = 1 " Enable the mapping by default (
pcd)
This configuration shortcut key for \PCD actual operation will find extremely error-prone,
Create a Hello World application, delete the default index. php file in the application directory, and create a new index. php file with the following code:
01 02 require "Slim/Slim. php ";0304 // create new Slim instance05 $ app = new Slim ();0607 // add new Route08 $ app-> get ("/", function (){09 echo "10 });1112 //
What are the content of PHP's series of SRS, and what are the phppsr specifications. In PHP, what are the content of the series of SRS, and what are the descriptions of the phppsr specifications? this is short for PHPStandardRecommendation. it should actually be called PSRs, which is the series of recommendation standards: currently, the accepted specifications include what is included in the srs php series, and what are included in the phppsr specifications?
calling that class. Although this feature can be used starting with PHP 5, the use of PSR-0 (auto-load standard, later replaced by PSR-4) has only started to have a real boost in utilization.We can write our own autoloader to complete the task, but since the Composer we're going to use to manage third-party dependencies already contains a perfect available autoloader, we'll just use it.Make sure you have C
.
Clrs redefined the basic web color, providing a more friendly, modern web page with the available shades. CLRS advocates the use of more accessible color schemes.
Utility Open-type
Utility Open-type is a series of more advanced CSS typesetting features, including font hyphenation, small capitalization font, and so on to advanced functions. They exist to provide users with better user experience details.
CLimate.
If you want to manipulate PHP at the command line then climate
Create a HelloWorld application, delete the default index. php file in the application directory, and create a new index. php file with the following code: 01 lt ;? Php02require quot; Slim/Slim. php quot; 0304 // createnewSliminstance05 $ app ..
Create a Hello World application, delete the default index. php file in the application directory, and create a new index. php file with the following code:
01
(abbreviated form macros for a set of instructions) to describe call command calls, such as: Method name (parameter 1, parameter 2, parameter 3, parameter 4, parameter 5); The compiler translates up to 6 assembly instructions that are relevant. In fact, the parameter I is required to correspond to the Write register ri (ri = R0----R4); This requires a number of instructions; the abbreviation compiler will automatically expand into a corresponding set of instructions. Parameters can have one or
Decoration mode, dynamically add some additional responsibilities to an object. The Decorator mode is more flexible than the subclass generation function.13. 1. Explanation
Main (), Dad
ISchoolReport, transcript Interface
CFourthGradeSchoolReport, fourth-grade transcript
ReportDecorator
HighScoreDecorator, the highest score decorator
SortDecorator
NOTE: For the fourth-grade transcript, ReportDecorator must have a private variable pointing to ISchoolReport.
Note:
Check the Code:
// Decorator. cpp
custom View gallerySlim Middleware: set of custom Middleware of Slim Template
?? Templates and lexical analysis libraries and toolsTwig: a comprehensive template languageTwig Cache Extension: Template segment Cache library for TwigMustache: the Mustache template language implemented by PHPPhly Mustache: Another Mustache template language implemented by PHPMtHaml: HAML template language implemented by PHPPHPTAL: PHP-implemented TAL template languagePl
be equipped with a backend so that administrators have the appropriate permissions to control?The biggest problem is that any Content Management framework (CMF) will most likely plug you into a whole bunch of features you don't even have, and you just have to run a utility. But then again, CMF will give you the appropriate APIs and assistive tools, and may also be quite useful.Otherwise, all the configuration information is saved in a file, allowing only the administrator access.Most of the tim
some sample applications, you can learn how to use the Package manager for the language of your choice. Package Manager helps you use external libraries in your application and distributes libraries for others to use.
If you choose PHP, you will need to learn composer,node.js have NPM or Yarn,python have Pip,ruby have rubygems. regardless of your choice, continue to learn how to use its package manager.
4th Step-standards and best practices
Each language has its own standards and best practices
a typical "coincidence-based programming"
If the project needs are very normal to the general public, then simply on WordPress Drupal and so on, with the right plug-in and fine-tuning itIf the project has its own independent needs or needs long-term maintenance iteration, the less frame function the better
Based on this, my own answer is5.3 Ago (no namespace, no composer)Write your own litphpOpen source to consider CI (function or too much, ancient times no composer also no way)
After 5.3 (Com
, L, WC, Pos;
Long n = bmp h-> bfsize-bmp h-> offbits; // The total number of pixels.
Color _ * image = new color _ [N]; // Bitmap matrix
Color _ * newimage = new color _ [N]; // The filtered Bitmap matrix.
Fread (image, N * 3, 1, F); // read the Bitmap matrix
// --------- Copy the first line of the original image that is not processed first, because the window cannot be obtained from the first line.
Memcpy (void *) newimage, (void *) image, (bmp I-> width + 1) * 3 );
//--!!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.