"Six Principles Overview"1. Single Responsibility Principle2. The Richter replacement principle3. Reliance leads to principles4. Interface Isolation principle5. Dimitri Law6. Opening and closing principle"Principle one: the principle of single
The static keyword declares that a property or method is related to a class and not to a particular instance of a class, so such a property or method is also referred to as a class property or class method.
If the access Control permission allows,
When developing a system using the PHP OO model, it is often customary to store the implementation of each class in a separate file, which makes it easy to reuse the classes and facilitate future maintenance. This is also one of the basic ideas of
Free to find a little bit of PHP about OO point data to see, access control modifiers, self,parent,const,static a few keywords, the arrow operator (the book is also called. That is, "and"), the scope of the resolution operator (that is, double
PHP AutoLoad Mechanism detailed(1) AutoLoad mechanism overviewWhen developing a system using the PHP OO model, it is often customary to store the implementation of each class in a separate file, which makes it easy to reuse the classes and
FIG-PHPPSR specification series 1-basic code specification 1. Introduction to FIG-PHP and PSR
The FIG-PHP has developed a series of PHP Development specifications, called the PSR, which is short for the Framework Interoperability Group, which is
Learning content: Pumping like class, interface, final, class constants
First, the extraction class (abstract)
In our actual development process, some classes do not need to be instantiated, such as some of the previous learning of the parent
Read the manual that define defines constants that allow only:
Only scalar and null are allowed. The type of scalar is integer, Float,string, or Boolean. It is also possible to define a constant value of type resource, but it is not recommended to
One: Structure and invocation (instantiation):
Class classname{}, called: $obj = new ClassName (), and when the class has a constructor, it should also pass in the parameter. such as $obj = new ClassName ($v, $v 2 ...);
Two: Constructors and
The problem of assigning a class value is defined as a class.
Class myclass {function test () echo "good" ;}$ test1 = "myclass"; $ test2 = new myclass ();
All assign classes to Variables. What are the differences between the two assignment
Ask for advice! PHP Object-Oriented Learning recently encountered some trouble in learning PHP object-oriented programming. I 'd like to give it a try.
1. use static variables in the class to reduce resource usage. Under what circumstances should
PHP AutoLoad Mechanism detailed
(1) AutoLoad mechanism overview
When developing a system using the PHP OO model, it is often customary to store the implementation of each class in a separate file, which makes it easy to reuse the classes and
How to Implement the condition Assembly function similar to C language in java
The so-called Conditional compilation is to enable the assembler to compile a program or not compile a program based on the set conditions. For example, in java, some
1. attributes, methods, constants
Attribute. A constant is used to save data. Method used to store the executedCode Note: you cannot directly obtain the attributes of an object in a method.
2. Access Control
Public, protected, and private
We recommend that you plan for the rain and explore the wells without thirst. ---- Zhu Yichun zhijia Maxim
Offline download: downloads server data in the case of a network, so that you can read data without a network, that is, read data offline.
The role of the volatile keyword volatile reminds the compiler that the variables defined after it may change at any time. Therefore, each time a compiled program needs to store or read this variable, data is read directly from the variable address.
①
Const should be calledConstant;
ReadonlyIs calledRead-Only variables.
Const can be used to modify the field of a class or a local variable );
Readonly is only used to modify the field of the class.
②
The value of the const constant must be
Class variables and class methodsFor a long time, all classes we created contain instance variables and instance methods: variables and methods associated with a specific class instance.Sometimes, classes also need to have their own States. So there
A better jvm parameter configuration and jvm introduction, better jvm parameter Introduction
Jvm parameter configuration for a good web server:
-Server // server mode-Xmx2g // maximum heap memory that can be allocated by JVM, allocated as
6, Using a Thread Group
A thread group is a way to manage threads. It logically associates threads with each other. Generally, all threads belong to the Default thread group (it is a class constant ). If a new thread group is created, the new thread
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.