PHP advanced feature - combination of Reflection and Factory design pattern [code example]
PHP advanced features - Reflection and the combination of factory design patterns [explained in combination with the example of laravel admin code]
Use reflection to realize the production of factory mode without creating specific factory classes
Article address http://janrs.com/?p=833 Reprint without authorization of the author
Please indic ...
Added by mabans on Wed, 01 Dec 2021 14:38:58 +0200
PHP implements a simple MVC framework
1, Foreword
The full name of MVC is Model View Controller. It is a mode of using Model View Controller to design and create web applications. It is a design model.
Of which:
Model: it is the part of the application used to process the application data logic. It is usually responsible for curd interaction directly with the database. Vie ...
Added by thetick on Wed, 01 Dec 2021 01:36:54 +0200
[hive] record the hive commands used in work
Pre command
Initialize metadata information
schematool -dbType mysql -initSchema
Start hive and hivever2
nohup hive --service metastore 1>/mnt/metastore.log 2>&1 &
nohup hive --service hiveserver2 1>/mnt/hiveserver2.log 2>&1 &
1, Connect hive
beeline connect hive without permission
beeline -u "jdbc:hive2:// ...
Added by Ellypsys on Tue, 30 Nov 2021 13:30:36 +0200
Learn about the use of YaConf extension in PHP
In the last article, we introduced the operations related to a well-known YAML format configuration file. Today I'll learn another configuration file extension. The writing method of this configuration file is actually similar to the PHP standard configuration format of php.ini, but there are some differences. However, the content is very simpl ...
Added by parthatel on Tue, 30 Nov 2021 12:32:01 +0200
Learn to write casually 4
Composite data type (construction type)
map
Golang map is a reference to the Hash table, which is almost a PHP associative array or Python dictionary. Of course, C++ STL also has a map, but golang map should be unordered_map. Map all keys must be of the same type, and values must also be of the same type. This is not as arbitrary as PHP asso ...
Added by Papalex606 on Sat, 20 Nov 2021 03:55:46 +0200
PHP six magic methods
__ construct(), constructor of class__ destruct(), destructor of class__ call () calls when an invocable method is invoked in an object.__ callStatic () calls when an invocable method is invoked in a static way.__ get() is called when the member variable of a class is obtained__ set() is called when setting the member variable of a class
I__ co ...
Added by phpnoobie9 on Sat, 20 Nov 2021 02:32:51 +0200
PHP method and code example for operating hash and zset type data in Redis
1,hset
Description: set the value of the field in the hash table key to value. If the key does not exist, a new hash table is created and HSET operation is performed. If the field already exists in the hash table, the old value will be overwritten. Parameter: key field value Return value: if the field is a new field in the hash table and the v ...
Added by wvwisokee on Fri, 19 Nov 2021 19:53:01 +0200
PHP advanced feature - combination of Reflection and Factory design pattern [code example]
PHP advanced features - Reflection and the combination of factory design patterns [explained in combination with the example of laravel admin code]Use reflection to realize the production of factory mode without creating specific factory classesArticle address http://janrs.com/?p=833 Reprint without authorization of the authorPlease indicate th ...
Added by renegade33 on Thu, 18 Nov 2021 05:14:57 +0200
PHP function parameter description
This article is an original article of Joshua 317. Please note: reprinted from Joshua 317 blog https://www.joshua317.com/article/190
Through the parameter list, you can pass information to the function, that is, a list of expressions separated by commas. Parameters are evaluated from left to right.
PHP supports passing parameters by value (def ...
Added by iii on Thu, 11 Nov 2021 02:38:16 +0200
Current limiting scheme of PHP+laravel high parallel downlink interface
1, What is interface current limiting So what is current limiting? As the name suggests, current limiting is to limit traffic, including concurrent traffic and total traffic within a certain period of time. Just like your broadband package has 1 G of traffic, it will disappear when it is used up, so control your use frequency and the total cons ...
Added by andycole on Wed, 10 Nov 2021 11:35:02 +0200