Home > Download >  Library download

  • ElasticSearch PHP library

    ElasticSearch is a search server based on Lucene. It provides a distributed multi-user capable full-text search engine based on a RESTful web interface. Developed in Java and released as open source under the terms of the Apache license, Elasticsearch is a popular enterprise-level search engine. Designed for use in cloud computing, it can achieve real-time search, is stable, reliable, fast, and is easy to install and use. Course Recommendation→: "Elasticsearch Full Text Search Practical Combat" (Practical Video) From the course"Ten Million Level Data Concurrency Solution (Theory and Practice)》We build a website or application and want to add a search function, but it is very difficult to complete the creation of the search work. We want our search solution to be fast, we want to have a zero-configuration and a completely free search mode, we want to be able to simply use JSON to index data over HTTP, we want our search server to be always available, we want to be able Starting with one and scaling to hundreds, we want real-time search, we want simple multi-tenancy, and we want to build a cloud solution. So we use Elasticsearch to solve all of these problems and many more that may arise. ElasticSearch’s PHP client library<?php namespace Elastica; class Index implements SearchableInterface {     protected $_name;     protected $_client;     public function __construct(Client $client, $name)     {         $this->_client = $client;         if (!is_scalar($name)) {             throw new InvalidException('Index name should be a scalar type');         }         $this->_name = (string) $name;     }

    Other libraries17922017-12-12
  • Beanstalk, a high-performance, lightweight distributed memory queue system, was originally designed to reduce the page access delay of high-capacity web application systems by asynchronously executing time-consuming tasks in the background. It has supported 9.5 million User's Facebook Causes application. Later open sourced, PostRank is now deployed and used on a large scale, processing millions of tasks every day. Beanstalkd is a typical Memcached-like design. The protocol and usage are the same, so users who have used memcached will feel that Beanstalkd looks familiar. High performance cannot be separated from asynchronous, and asynchronous cannot be separated from queues, and internally they are the principles of the Producer-Comsumer model. Beanstalkd’s PHP client library#!/usr/bin/env php <?php define('BASE_DIR', realpath(__DIR__.'/..')); define('PHAR_FILENAME', 'pheanstalk.phar'); define('PHAR_FULLPATH', BASE_DIR.'/'.PHAR_FILENAME); // ---------------------------------------- reexecute_if_phar_readonly($argv); delete_existing_pheanstalk_phar(); build_pheanstalk_phar(); verify_pheanstalk_phar(); exit(0); // ---------------------------------------- // See: http://www.php.net/manual/en/phar.configuration.php#ini.phar.readonly function reexecute_if_phar_readonly($argv) {     if (ini_get('phar.readonly') && !in_array('--ignore-readonly', $argv)) {         $command = sprintf(             'php -d phar.readonly=0 %s --ignore-readonly',             implode($argv, ' ')         );         echo "Phar configured readonly in php.ini; attempting to re-execute:\n";         echo "$command\n";         passthru($command, $exitStatus);         exit($exitStatus);     } } function delete_existing_pheanstalk_phar() {     if (file_exists(PHAR_FULLPATH)) {         printf("- Deleting existing %s\n", PHAR_FILENAME);         unlink(PHAR_FULLPATH);     } } function build_pheanstalk_phar() {     printf("- Building %s from %s\n", PHAR_FILENAME, BASE_DIR);     $phar = new Phar(PHAR_FULLPATH);     $phar->buildFromDirectory(BASE_DIR);     $phar->setStub(         $phar->createDefaultStub('vendor/autoload.php')     ); } function verify_pheanstalk_phar() {     $phar = new Phar(PHAR_FULLPATH);     printf("- %s built with %d files.\n", PHAR_FILENAME, $phar->count()); }

    Other libraries10902017-12-12
  • A class library is a comprehensive collection of object-oriented reusable types, including interfaces, abstract classes, and concrete classes. Class libraries can solve a range of common programming tasks (including tasks such as string management, data collection, database connections, and file access), as well as a variety of specialized development tasks (console applications, desktop applications, WEB applications, etc. )

    Other libraries10722017-12-11
  • With the widespread use of php, it is also very common to use different databases. PHP needs to support more database connection interfaces. If you only write programs for a single database through a single interface, this will greatly increase the complexity and learning threshold of PHP. The abstract PHP library for payment emerged to solve this problem. This defines a lightweight, consistent interface for PHP to access the database. It provides a data access abstraction layer. No matter what database PHP is connected to, it can perform queries and obtain data through consistent functions. PDO began to ship with the release of php5.1. Previous versions of php did not support the abstract PHP library for payment Features: (1) Flexibility, which can be used during php running, Load new databases directly without resetting and compiling when new databases are used. (2) Object-oriented: Control the use of the database through objects. (3) Fast. Since PDO is written in C language and compiled into PHP, it is much faster than those abstract classes written in PHP.

    Other libraries11092017-12-11
  • If you already have an idea of ​​image conversion and want to use it in your application, you can spend a few minutes to learn about the PHP library that converts XML to PDF and images. It is a collection of methods that provide various Picasso transformations. It's well worth learning for your implementation. This class library has two different versions. The extended version includes richer image conversion, using the device's GPU for calculation and rendering. An additional dependency is required, so the two versions are added a little differently. You should go through the cast list to decide which version is really needed.

    Other libraries24922017-12-11
  • The time and date function library can use these functions to get the date and time of the server where PHP is running. You can use these functions to format dates and times in many different ways. Note: Please note that these functions depend on the server's locale settings. Be sure to take daylight saving time settings and leap years into account when using these functions. These functions are part of the PHP core and can be used without being installed.  Runtime configuration This extension module does not define any setting instructions. Resource Type This extension module does not define any resource type. Predefined constants This extension module does not define any constants. The class library is a comprehensive collection of object-oriented reusable types, including: interfaces, abstract classes and concrete classes. Class libraries can solve a range of common programming tasks (including tasks such as string management, data collection, database connections, and file access), as well as a variety of specialized development tasks (console applications, desktop applications, WEB applications, etc. )

    Other libraries12032017-12-11
  • Transaction Log File Transaction Log File, with the extension ldf, is a very important but often overlooked part of the database structure. It is a file used to record database updates. It can record any operation on the database and save the recorded results to a separate file. For each database update process, the transaction log file has a very comprehensive record. Based on these records, the state before the database update can be restored. For performance reasons, SQL Server stores user changes in the cache. These changes will be written to the transaction log immediately, but not to the data file immediately. The transaction log uses a mark point to determine whether a transaction has written data from the cache to the data file. When SQL Server restarts, it will check the latest mark point in the log and erase the transaction records after this mark point, because these transaction records do not actually write the data in the cache to the data file. This prevents those interrupted transactions from modifying the data files.

    Other libraries12142017-12-11
  • Specific function method: Current timeCarbon::now();One week agoCarbon::now()- >subWeek();Vancouver timeCarbon::now('America/Vancouver');Calculate ageCarbon::createFromDate (1984, 8, 28)->age;Determine whether it is a weekendCarbon::now()->isWeekend();Number of days per month Carbon::now()->daysInMonth;What day is todayCarbon::now()->dayOfWeek;一Day of the yearCarbon::now()->dayOfYear; 1 hourCarbon::now()->addHour(1) ); 1 minuteCarbon::now()->addMinute(1); 1 dayCarbon::now() ->addDay(1); 1 week.Carbon::now()->addWeek(1);Tomorrow Carbon::now()->tomorrow();//Tomorrow-1 hourCarbon::now()->subHour(); Whether MondayCarbon::now()->isMonday()The last day of the monthCarbon::now()->lastOfMonth();

    Other libraries12762017-12-11
  • Many people are looking for PHP libraries related to geographical tools. Today I will summarize and compile a PHP library related to geographical tools. The following is a code snippet <?php namespace League\Geotools; use League\Geotools\Coordinate\CoordinateInterface; trait CoordinateCouple {     protected $from;     protected $to; } The class library is a comprehensive object-oriented A collection of reusable types, including interfaces, abstract classes, and concrete classes. Class libraries can solve a range of common programming tasks (including tasks such as string management, data collection, database connections, and file access), as well as a variety of specialized development tasks (console applications, desktop applications, WEB applications, etc. )

    Other libraries9502017-12-11
  • Currency refers to any commodity that can perform the functions of a medium of exchange, a measure of value, a deferred payment standard, and a completely mobile means of wealth storage. It can be regarded as currency; it is separated from commodities and serves as a fixed general equivalent. The commodity is currency; currency is the product of the development of commodity exchange to a certain stage. This software displays different prices of currencies in different periods. If you like currency collection, come and check it out! <?php namespace SebastianBergmann\Money; use NumberFormatter; class IntlFormatter implements Formatter {     private $numberFormatter;     public function __construct($locale)     {         $this->numberFormatter = new NumberFormatter(             $locale,             NumberFormatter::CURRENCY         );     }     public function format(Money $money)     {         return $this->numberFormatter->formatCurrency(             $money->getConvertedAmount(),             $money->getCurrency()->getCurrencyCode()         );     } }

    Other libraries13072017-12-11
  • This is a PHP library for processing Word documents, which can insert text, text symbols, pagination, headers/footers, tables, elements in lists, hyperlinks, etc. This library is equipped with more than a dozen practical examples that can be used as development references, and it is also equipped with corresponding Chinese documents. It is very convenient to use, and there is no need to read English words. <?php $vendorDirPath = realpath(__DIR__ . '/vendor'); if (file_exists($vendorDirPath . '/autoload.php')) {     require $vendorDirPath . '/autoload.php'; } else {     throw new Exception(         sprintf(             'Could not find file \'%s\'. It is generated by Composer. Use \'install --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.',             $vendorDirPath . '/autoload.php'         )     ); }

    Other libraries24792017-12-11
  • The PHP library for operating PPT documents can present documents, add slides, support the addition of images, media, author information, etc., and is perfectly compatible with MS Office. This library is equipped with more than a dozen practical examples that can be used as development references, and it is also equipped with corresponding Chinese documents. It is very convenient to use, and there is no need to read English words. <?php date_default_timezone_set('UTC'); if (!defined('PHPPRESENTATION_TESTS_BASE_DIR')) {     define('PHPPRESENTATION_TESTS_BASE_DIR', realpath(__DIR__)); } $vendor = realpath(__DIR__ . '/../vendor'); if (file_exists($vendor . "/autoload.php")) {     require $vendor . "/autoload.php"; } else {     $vendor = realpath(__DIR__ . '/../../../');     if (file_exists($vendor . "/autoload.php")) {         require $vendor . "/autoload.php";     } else {         throw new Exception("Unable to load dependencies");     } } spl_autoload_register(function ($class) {     $class = ltrim($class, '\');     $prefix = 'PhpOffice\PhpPresentation\Tests';     if (strpos($class, $prefix) === 0) {         $class = str_replace('\', DIRECTORY_SEPARATOR, $class);         $class = join(DIRECTORY_SEPARATOR, array('PhpPresentation', 'Tests', '_includes')) .         substr($class, strlen($prefix));         $file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php';         if (file_exists($file)) {             require_once $file;         }     } }); require_once __DIR__ . "/../src/PhpPresentation/Autoloader.php"; \PhpOffice\PhpPresentation\Autoloader::register();

    Other libraries12802017-12-11