Yaf-lib based on YAF application Development framework, simple MVC middle tier inheritance supplement, common cache, database and other driver classes, add widget module, and layout plug-in, RPC service, support Hprose, Yar, etc., Support xhprof performance debugging.
Requirement
PHP 5.3+
Php-yaf 2.3.3
Phpredis 2.2.7
Memcache 2.2.7
ZMQ 1.1.2
Xapian-bindings 1.2.21
SCWS 1.2.2
Swoole 1.7.17
hprose-php 1.5.4
Php-yar 1.2.4
Xhprof 0.9.4
Src/controllers
Madclient
Http://localhost/madclient Madclient is a client of MADZMQ Message Queuing implemented by PHP, which communicates with Madbroker through the MSG protocol and asynchronously sends messages.
Src/bootstrap
Bootstrap is the YAF bootloader, which is split here if the work of the web goes into CGI mode, if the work goes into CLI mode at the command line.
Src/library
Controller
The controller class inherits the Yaf_controller_abstract, which can optionally inherit this class, implemented in classes, layout, widgets, and so on.
Sontroller
The Sontroller class inherits the Yaf_controller_abstract, which works in CLI mode.
Model
The model class is an abstract class of data layers that can be inherited by all data objects, and model can distribute data from different data_center.
Widgets
The Widget class is the base class for the component, and the component classes under the Widgets directory inherit it, and the Widgets/views directory is the view of the corresponding component. The component is called through the $widget method in views
$widget (' Indexwidget ', array (' class_key ' = ' item_condition ', ' output ' = ' html ', ' query ' + = Array (), ' Assist_data ' =>array ( ' one ' = ' one ')) ;
Zmq_msg
Zmq_msg is a PHP implementation of a simple MSG message protocol based on ZEROMQ
Zmq_kvmsg
Zmq_kvmsg is a PHP implementation of a simple Key-value message protocol based on ZEROMQ
Core_processpool
The Core_processpool class encapsulates a process pool.
System_mongo
The System_mongo class encapsulates the client interface of MongoDB.
Conn for connecting MONGO
Selectdb Selecting a Database
Selectcollection Selecting documents
FindOne get a piece of data
Find Get Data List
Select selection data can be sorted or interval
Insert Add Data
Update updates data
Close () Closes the connection
System_socket
System_socket class to encapsulate a network socket
System_memcache
The System_memcache class encapsulates the Memcached client interface
System_redis
System_redis class encapsulated Redis client driver
System_mysqlpdo
The System_mysqlpdo class encapsulates the Pdo_mysql operator interface
:: Bind
:: Bindmore
:: Query
:: Lastinsertid
:: Column
:: Row
:: Single
System_log
The System_log class encapsulates the log processing class
System_sort
The System_sort class encapsulates some of the classic sorting algorithms
:: Insertion Insert Sort
:: Selection Select sort
:: Bubble Bubble sort
:: Merge Merging sort
Search_segment
Chinese participle of search_segment class
Init word breaker Initialization
Close closes
Query to get the original data list
Queryone Get single raw data
Cutquery splitting the original data
Cutstring splitting a string
Search_index
Search_index class for adding indexes
Search_match
Search_match class for matching search results
Search_database
The Search_database class is used to query the original data in the index database
Get_doccount getting the total number of documents
Get_data get Single Document RAW data
Get_termlist get a single document word
Select Get Data list
Search_config
Search_config class can process search results based on configuration
Getapp Get App
Getappname Get app Name
Gettablename get the name of the tag
Formattitle Formatting titles
Formatdetail Formatting details
FormatUrl Formatting the Address bar
Formatimage Formatting pictures
Bin
Main
Server-side program, according to the name of the portal file to find Maincontroller, and then execute the Mainaction method; YAF CLI Mode entry file, in CLI mode can develop a powerful server-side program
./bin/main
Madserver
Madserver is the service side of the MADZMQ message queue implemented by PHP, which is subscribed as a subscriber from Madbroker, and the protocol is kvmsg.
./bin/madserver
hprose_swoole_tcp.php
RPC service, TCP protocol, support method, object method, asynchronous Call object method call:
Server-side code $server->add (New Testmodel (), "', ' test ');//Client call $client->test->one ();
Src/tools
Xapian
Xhprof
hprose-php
Official website:http://www.open-open.com/lib/view/home/1451381728995