var C = (function(){ // ------Class Creation------ var initializing = false, fnTest = /xyz/.test(function() { xyz; }) ? /\b_super\b/: /.*/; // The base Class implementation (does nothing) this.Class = function() {}; // Create a new Class that inherits from this class Class.extend = function(prop) { var _super = this.prototype; // Instantiate a base class (but only create the instance, // don't run the init constructor) initializing = true; var prototype = new this(); initializing = false;
This library mainly relies on Simple JavaScript Inheritance and has been modified.
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
27Apr2024
PHP provides a rich OOP function library to simplify development work: Commonly used OOP functions: SplFixedArray (fixed length array), SplObjectStorage (storage object), SplPriorityQueue (priority queue), SplQueue (first in, first out queue), SplStack (last in, first out) out of the stack). Other useful OOP functions: array_map (application callback function), array_reduce (aggregate results), class_exists (check class), is_a (check class relationship), get_class (get class name).
09Oct2016
The mysqli extension library is an improved version of the mysql extension library. It improves stability and efficiency on the basis of the mysql extension library. The mysqli extension library has two sets of things, one is process-oriented mysqli and the other is object-oriented mysqli. The operation method is generally the same as that of the mysql extension library. This time, we first extract a tool class for operating mysql and the calling class.
12Jul2016
PHP mysqli extension library (object-oriented/database operation encapsulation/transaction control/precompilation), mysqli object-oriented. PHP mysqli extension library (object-oriented/database operation encapsulation/transaction control/precompilation), mysqli object-oriented 1. Differences from the mysql extension library: (1 Higher security and stability (2 Provided
30Sep2016
PHP uses the mysqli extension library to implement addition, deletion, modification and query (object-oriented version)
08Oct2016
PHP uses the mysqli extension library to implement addition, deletion, modification and query (object-oriented version)
19May2018
This article mainly introduces the PHP implementation of the object-oriented mysqli extension library add, delete, modify and query operation tool class, and analyzes the encapsulation and usage skills of the mysqli add, delete, modify and query operation class in the form of examples. Friends in need can refer to the following
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images