4 Commits

Autor SHA1 Mensagem Data
Daniel Supernault 096dda22ce Add User Model 2019-11-02 17:11:43 +00:00
Daniel Supernault 84b5dbb305 Add UserGroup Model 2019-11-02 17:11:43 +00:00
Daniel Supernault a42503817b Add basic ORM implementation 2019-11-02 17:11:40 +00:00
Alexei Sorokin 5f97b139bc [DATABASE] Set SQL NULLs properly as string literals
DataObject_Cast's caused problems in (email|sms)settings,
DataObject handles 'NULL' (case-insensitive) as a special case.
2019-11-01 14:09:09 +01:00
1671 arquivos alterados com 170601 adições e 3509 exclusões
+2 -2
Ver Arquivo
@@ -435,7 +435,7 @@ class EmailsettingsAction extends SettingsAction
}
$original = clone($user);
$user->email = DB_DataObject_Cast::sql('NULL');
$user->email = 'NULL';
// Throws exception on failure. Also performs it within a transaction.
$user->updateWithKeys($original);
@@ -458,7 +458,7 @@ class EmailsettingsAction extends SettingsAction
}
$orig = clone($user);
$user->incomingemail = DB_DataObject_Cast::sql('NULL');
$user->incomingemail = 'NULL';
$user->emailpost = false;
// Throws exception on failure. Also performs it within a transaction.
$user->updateWithKeys($orig);
+4 -4
Ver Arquivo
@@ -417,9 +417,9 @@ class SmssettingsAction extends SettingsAction
$original = clone($user);
$user->sms = DB_DataObject_Cast::sql('NULL');
$user->carrier = DB_DataObject_Cast::sql('NULL');
$user->smsemail = DB_DataObject_Cast::sql('NULL');
$user->sms = 'NULL';
$user->carrier = 'NULL';
$user->smsemail = 'NULL';
// Throws exception on failure. Also performs it within a transaction.
$user->updateWithKeys($original);
@@ -531,7 +531,7 @@ class SmssettingsAction extends SettingsAction
$orig = clone($user);
$user->incomingemail = DB_DataObject_Cast::sql('NULL');
$user->incomingemail = 'NULL';
// Throws exception on failure. Also performs it within a transaction.
$user->updateWithKeys($orig);
+10
Ver Arquivo
@@ -0,0 +1,10 @@
<?php
namespace App;
class User extends \Illuminate\Database\Eloquent\Model {
protected $table = 'user';
protected $hidden = [];
public $timestamps = false;
}
+16
Ver Arquivo
@@ -0,0 +1,16 @@
<?php
namespace App;
class UserGroup extends \Illuminate\Database\Eloquent\Model {
protected $table = 'user_group';
protected $guarded = [];
public $timestamps = false;
public function url()
{
return '/groups/' . $this->id;
}
}
+10
Ver Arquivo
@@ -0,0 +1,10 @@
<?php
namespace App;
class UserModel extends \Illuminate\Database\Eloquent\Model {
protected $table = 'user';
protected $hidden = [];
public $timestamps = false;
}
+1 -1
Ver Arquivo
@@ -106,7 +106,7 @@ class Conversation extends Managed_DataObject
common_random_hexstr(8)
);
// locally generated Conversation objects don't get static URLs stored
$conv->url = DB_DataObject_Cast::sql('NULL');
$conv->url = 'NULL';
}
// This insert throws exceptions on failure
$conv->insert();
+25 -9
Ver Arquivo
@@ -283,6 +283,8 @@ abstract class Managed_DataObject extends Memcached_DataObject
* Memcached_DataObject doesn't have enough info to handle properly.
*
* @return array of strings
* @throws MethodNotImplementedException
* @throws ServerException
*/
public function _allCacheKeys()
{
@@ -494,14 +496,18 @@ abstract class Managed_DataObject extends Memcached_DataObject
return $aliases;
}
// 'update' won't write key columns, so we have to do it ourselves.
// This also automatically calls "update" _before_ it sets the keys.
// FIXME: This only works with single-column primary keys so far! Beware!
/**
* @param DB_DataObject &$orig Must be "instanceof" $this
* @param string $pid Primary ID column (no escaping is done on column name!)
* "update" won't write key columns, so we have to do it ourselves.
* This also automatically calls "update" _before_ it sets the keys.
* FIXME: This only works with single-column primary keys so far! Beware!
*
* @param Managed_DataObject $orig Must be "instanceof" $this
* @param string|null $pid (optional) Primary ID column (no escaping is done on column name!)
* @return bool|void|number of changed rows, no guarantees are made about the return really...
* @throws MethodNotImplementedException
* @throws ServerException
*/
public function updateWithKeys(Managed_DataObject $orig, $pid=null)
public function updateWithKeys(Managed_DataObject $orig, ?string $pid = null)
{
if (!$orig instanceof $this) {
throw new ServerException('Tried updating a DataObject with a different class than itself.');
@@ -516,10 +522,20 @@ abstract class Managed_DataObject extends Memcached_DataObject
// do it in a transaction
$this->query('BEGIN');
$parts = array();
$parts = [];
foreach ($this->keys() as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {
$parts[] = $k . ' = ' . $this->_quote($this->$k);
$v = $this->table()[$k];
if ($this->$k !== $orig->$k) {
if (is_object($this->$k) && $this->$k instanceof DB_DataObject_Cast) {
$value = $this->$k->toString($v, $this->getDatabaseConnection());
} elseif (DB_DataObject::_is_null($this, $k)) {
$value = 'NULL';
} elseif ($v & DB_DATAOBJECT_STR) { // if a string
$value = $this->_quote((string) $this->$k);
} else {
$value = (int) $this->$k;
}
$parts[] = "{$k} = {$value}";
}
}
if (count($parts) == 0) {
+4 -2
Ver Arquivo
@@ -6,6 +6,7 @@
"require": {
"php": "^7.3.0",
"ext-bcmath": "*",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-gd": "*",
@@ -16,12 +17,14 @@
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"ext-ctype": "*",
"apereo/phpcas": "^1.3",
"diogocomposer/xmpphp": "^3.0",
"embed/embed": "^3.4",
"ezyang/htmlpurifier": "^4.10",
"hoa/consistency": "^1.17.05.02",
"hoa/console": "^3.17",
"illuminate/database": "5.8.*",
"illuminate/events": "5.8.*",
"intervention/image": "^2.5",
"masterminds/html5": "^2.6",
"mf2/mf2": "^0.4.6",
@@ -34,7 +37,6 @@
"stomp-php/stomp-php": "^4.5.1"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "^2.9",
"phpunit/phpunit": "^8.2",
"psy/psysh": "^0.9.9"
},
+1397 -3289
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+27
Ver Arquivo
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Capsule\Manager as Capsule;
$capsule = new Capsule;
$capsule->addConnection([
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
]);
// Set the event dispatcher used by Eloquent models... (optional)
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
$capsule->setEventDispatcher(new Dispatcher(new Container));
// Make this Capsule instance available globally via static methods... (optional)
$capsule->setAsGlobal();
// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher())
$capsule->bootEloquent();
+1
Ver Arquivo
@@ -94,6 +94,7 @@ global $_PEAR;
$_PEAR = new PEAR;
$_PEAR->setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
require INSTALLDIR . DIRECTORY_SEPARATOR . 'db' . DIRECTORY_SEPARATOR . 'capsule_orm.php';
require_once 'DB.php';
require_once 'DB/DataObject.php';
require_once 'DB/DataObject/Cast.php'; # for dates
+1 -1
Ver Arquivo
@@ -75,7 +75,7 @@ class FavoriteModule extends ActivityVerbHandlerModule
while ($user->fetch()) {
$user->setPref('email', 'notify_fave', $user->emailnotifyfav);
$orig = clone($user);
$user->emailnotifyfav = 'null'; // flag this preference as migrated
$user->emailnotifyfav = 'NULL'; // flag this preference as migrated
$user->update($orig);
}
printfnq("DONE.\n");
+4 -4
Ver Arquivo
@@ -480,7 +480,7 @@ class FeedSub extends Managed_DataObject
$this->sub_end = common_sql_date(time() + $lease_seconds);
} else {
// Backwards compatibility to StatusNet (PuSH <0.4 supported permanent subs)
$this->sub_end = DB_DataObject_Cast::sql('NULL');
$this->sub_end = 'NULL';
}
$this->modified = common_sql_now();
@@ -496,10 +496,10 @@ class FeedSub extends Managed_DataObject
{
$original = clone($this);
$this->secret = DB_DataObject_Cast::sql('NULL');
$this->secret = 'NULL';
$this->sub_state = 'inactive';
$this->sub_start = DB_DataObject_Cast::sql('NULL');
$this->sub_end = DB_DataObject_Cast::sql('NULL');
$this->sub_start = 'NULL';
$this->sub_end = 'NULL';
$this->modified = common_sql_now();
return $this->update($original);
+1 -1
Ver Arquivo
@@ -61,7 +61,7 @@ if (!defined('E_USER_DEPRECATED')) {
/**
* phpCAS version. accessible for the user by phpCAS::getVersion().
*/
define('PHPCAS_VERSION', '1.3.7');
define('PHPCAS_VERSION', '1.3.8');
/**
* @addtogroup public
+71 -14
Ver Arquivo
@@ -997,7 +997,18 @@ class CAS_Client
// set to callback mode if PgtIou and PgtId CGI GET parameters are provided
if ( $this->isProxy() ) {
$this->_setCallbackMode(!empty($_GET['pgtIou'])&&!empty($_GET['pgtId']));
if(!empty($_GET['pgtIou'])&&!empty($_GET['pgtId'])) {
$this->_setCallbackMode(true);
$this->_setCallbackModeUsingPost(false);
} elseif (!empty($_POST['pgtIou'])&&!empty($_POST['pgtId'])) {
$this->_setCallbackMode(true);
$this->_setCallbackModeUsingPost(true);
} else {
$this->_setCallbackMode(false);
$this->_setCallbackModeUsingPost(false);
}
}
if ( $this->_isCallbackMode() ) {
@@ -2329,6 +2340,36 @@ class CAS_Client
return $this->_callback_mode;
}
/**
* @var bool a boolean to know if the CAS client is using POST parameters when in callback mode.
* Written by CAS_Client::_setCallbackModeUsingPost(), read by CAS_Client::_isCallbackModeUsingPost().
*
* @hideinitializer
*/
private $_callback_mode_using_post = false;
/**
* This method sets/unsets usage of POST parameters in callback mode (default/false is GET parameters)
*
* @param bool $callback_mode_using_post true to use POST, false to use GET (default).
*
* @return void
*/
private function _setCallbackModeUsingPost($callback_mode_using_post)
{
$this->_callback_mode_using_post = $callback_mode_using_post;
}
/**
* This method returns true when the callback mode is using POST, false otherwise.
*
* @return bool A boolean.
*/
private function _isCallbackModeUsingPost()
{
return $this->_callback_mode_using_post;
}
/**
* the URL that should be used for the PGT callback (in fact the URL of the
* current request without any CGI parameter). Written and read by
@@ -2387,23 +2428,39 @@ class CAS_Client
private function _callback()
{
phpCAS::traceBegin();
if (preg_match('/^PGTIOU-[\.\-\w]+$/', $_GET['pgtIou'])) {
if (preg_match('/^[PT]GT-[\.\-\w]+$/', $_GET['pgtId'])) {
$this->printHTMLHeader('phpCAS callback');
$pgt_iou = $_GET['pgtIou'];
$pgt = $_GET['pgtId'];
phpCAS::trace('Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\')');
echo '<p>Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\').</p>';
$this->_storePGT($pgt, $pgt_iou);
$this->printHTMLFooter();
if ($this->_isCallbackModeUsingPost()) {
$pgtId = $_POST['pgtId'];
$pgtIou = $_POST['pgtIou'];
} else {
$pgtId = $_GET['pgtId'];
$pgtIou = $_GET['pgtIou'];
}
if (preg_match('/^PGTIOU-[\.\-\w]+$/', $pgtIou)) {
if (preg_match('/^[PT]GT-[\.\-\w]+$/', $pgtId)) {
phpCAS::trace('Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\')');
$this->_storePGT($pgtId, $pgtIou);
if (array_key_exists('HTTP_ACCEPT', $_SERVER) &&
( $_SERVER['HTTP_ACCEPT'] == 'application/xml' ||
$_SERVER['HTTP_ACCEPT'] == 'text/xml'
)
) {
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n";
echo '<proxySuccess xmlns="http://www.yale.edu/tp/cas" />';
phpCAS::traceExit("XML response sent");
} else {
$this->printHTMLHeader('phpCAS callback');
echo '<p>Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\').</p>';
$this->printHTMLFooter();
phpCAS::traceExit("HTML response sent");
}
phpCAS::traceExit("Successfull Callback");
} else {
phpCAS::error('PGT format invalid' . $_GET['pgtId']);
phpCAS::traceExit('PGT format invalid' . $_GET['pgtId']);
phpCAS::error('PGT format invalid' . $pgtId);
phpCAS::traceExit('PGT format invalid' . $pgtId);
}
} else {
phpCAS::error('PGTiou format invalid' . $_GET['pgtIou']);
phpCAS::traceExit('PGTiou format invalid' . $_GET['pgtIou']);
phpCAS::error('PGTiou format invalid' . $pgtIou);
phpCAS::traceExit('PGTiou format invalid' . $pgtIou);
}
// Flush the buffer to prevent from sending anything other then a 200
externo Link simbólico
+1
Ver Arquivo
@@ -0,0 +1 @@
../nesbot/carbon/bin/carbon
+52 -17
Ver Arquivo
@@ -1,21 +1,56 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Composer
Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
Source: https://github.com/composer/composer
Copyright (c) Nils Adermann, Jordi Boggiano
Files: *
Copyright: 2016, Nils Adermann <naderman@naderman.de>
2016, Jordi Boggiano <j.boggiano@seld.be>
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
Files: src/Composer/Util/TlsHelper.php
Copyright: 2016, Nils Adermann <naderman@naderman.de>
2016, Jordi Boggiano <j.boggiano@seld.be>
2013, Evan Coury <me@evancoury.com>
License: Expat and BSD-2-Clause
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
License: BSD-2-Clause
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+599 -1
Ver Arquivo
@@ -145,8 +145,43 @@ return array(
'CAS_Request_MultiRequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php',
'CAS_Request_RequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/RequestInterface.php',
'CAS_TypeMismatchException' => $vendorDir . '/apereo/phpcas/source/CAS/TypeMismatchException.php',
'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonImmutable.php',
'Carbon\\CarbonInterface' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterface.php',
'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\CarbonPeriod' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonPeriod.php',
'Carbon\\CarbonTimeZone' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonTimeZone.php',
'Carbon\\Cli\\Invoker' => $vendorDir . '/nesbot/carbon/src/Carbon/Cli/Invoker.php',
'Carbon\\Exceptions\\BadUnitException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadUnitException.php',
'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
'Carbon\\Exceptions\\NotAPeriodException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php',
'Carbon\\Factory' => $vendorDir . '/nesbot/carbon/src/Carbon/Factory.php',
'Carbon\\FactoryImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/FactoryImmutable.php',
'Carbon\\Language' => $vendorDir . '/nesbot/carbon/src/Carbon/Language.php',
'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php',
'Carbon\\Traits\\Boundaries' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Boundaries.php',
'Carbon\\Traits\\Cast' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Cast.php',
'Carbon\\Traits\\Comparison' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Comparison.php',
'Carbon\\Traits\\Converter' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Converter.php',
'Carbon\\Traits\\Creator' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Creator.php',
'Carbon\\Traits\\Date' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Date.php',
'Carbon\\Traits\\Difference' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Difference.php',
'Carbon\\Traits\\Localization' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Localization.php',
'Carbon\\Traits\\Macro' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Macro.php',
'Carbon\\Traits\\Mixin' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Mixin.php',
'Carbon\\Traits\\Modifiers' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Modifiers.php',
'Carbon\\Traits\\Mutability' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Mutability.php',
'Carbon\\Traits\\Options' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Options.php',
'Carbon\\Traits\\Rounding' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Rounding.php',
'Carbon\\Traits\\Serialization' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Serialization.php',
'Carbon\\Traits\\Test' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Test.php',
'Carbon\\Traits\\Timestamp' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Timestamp.php',
'Carbon\\Traits\\Units' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Units.php',
'Carbon\\Traits\\Week' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Week.php',
'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php',
'Composer\\CaBundle\\CaBundle' => $vendorDir . '/composer/ca-bundle/src/CaBundle.php',
'Console_Getopt' => $vendorDir . '/pear/console_getopt/Console/Getopt.php',
'Doctrine\\Common\\Inflector\\Inflector' => $vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php',
'Embed\\Adapters\\Adapter' => $vendorDir . '/embed/embed/src/Adapters/Adapter.php',
'Embed\\Adapters\\Archive' => $vendorDir . '/embed/embed/src/Adapters/Archive.php',
'Embed\\Adapters\\Cadenaser' => $vendorDir . '/embed/embed/src/Adapters/Cadenaser.php',
@@ -171,6 +206,7 @@ return array(
'Embed\\Adapters\\Sassmeister' => $vendorDir . '/embed/embed/src/Adapters/Sassmeister.php',
'Embed\\Adapters\\Slides' => $vendorDir . '/embed/embed/src/Adapters/Slides.php',
'Embed\\Adapters\\Snipplr' => $vendorDir . '/embed/embed/src/Adapters/Snipplr.php',
'Embed\\Adapters\\Vimeo' => $vendorDir . '/embed/embed/src/Adapters/Vimeo.php',
'Embed\\Adapters\\Webpage' => $vendorDir . '/embed/embed/src/Adapters/Webpage.php',
'Embed\\Adapters\\Wikipedia' => $vendorDir . '/embed/embed/src/Adapters/Wikipedia.php',
'Embed\\Adapters\\Youtube' => $vendorDir . '/embed/embed/src/Adapters/Youtube.php',
@@ -229,6 +265,7 @@ return array(
'Embed\\Providers\\OEmbed\\Twitch' => $vendorDir . '/embed/embed/src/Providers/OEmbed/Twitch.php',
'Embed\\Providers\\OEmbed\\Twitter' => $vendorDir . '/embed/embed/src/Providers/OEmbed/Twitter.php',
'Embed\\Providers\\OEmbed\\Ustream' => $vendorDir . '/embed/embed/src/Providers/OEmbed/Ustream.php',
'Embed\\Providers\\OEmbed\\Vimeo' => $vendorDir . '/embed/embed/src/Providers/OEmbed/Vimeo.php',
'Embed\\Providers\\OEmbed\\WordPress' => $vendorDir . '/embed/embed/src/Providers/OEmbed/WordPress.php',
'Embed\\Providers\\OEmbed\\Youtube' => $vendorDir . '/embed/embed/src/Providers/OEmbed/Youtube.php',
'Embed\\Providers\\OpenGraph' => $vendorDir . '/embed/embed/src/Providers/OpenGraph.php',
@@ -501,6 +538,42 @@ return array(
'Hoa\\Consistency\\Test\\Unit\\Exception' => $vendorDir . '/hoa/consistency/Test/Unit/Exception.php',
'Hoa\\Consistency\\Test\\Unit\\Xcallable' => $vendorDir . '/hoa/consistency/Test/Unit/Xcallable.php',
'Hoa\\Consistency\\Xcallable' => $vendorDir . '/hoa/consistency/Xcallable.php',
'Hoa\\Console\\Bin\\Termcap' => $vendorDir . '/hoa/console/Bin/Termcap.php',
'Hoa\\Console\\Chrome\\Editor' => $vendorDir . '/hoa/console/Chrome/Editor.php',
'Hoa\\Console\\Chrome\\Exception' => $vendorDir . '/hoa/console/Chrome/Exception.php',
'Hoa\\Console\\Chrome\\Pager' => $vendorDir . '/hoa/console/Chrome/Pager.php',
'Hoa\\Console\\Chrome\\Text' => $vendorDir . '/hoa/console/Chrome/Text.php',
'Hoa\\Console\\Console' => $vendorDir . '/hoa/console/Console.php',
'Hoa\\Console\\Cursor' => $vendorDir . '/hoa/console/Cursor.php',
'Hoa\\Console\\Dispatcher\\Kit' => $vendorDir . '/hoa/console/Dispatcher/Kit.php',
'Hoa\\Console\\Exception' => $vendorDir . '/hoa/console/Exception.php',
'Hoa\\Console\\GetOption' => $vendorDir . '/hoa/console/GetOption.php',
'Hoa\\Console\\Input' => $vendorDir . '/hoa/console/Input.php',
'Hoa\\Console\\Mouse' => $vendorDir . '/hoa/console/Mouse.php',
'Hoa\\Console\\Output' => $vendorDir . '/hoa/console/Output.php',
'Hoa\\Console\\Parser' => $vendorDir . '/hoa/console/Parser.php',
'Hoa\\Console\\Processus' => $vendorDir . '/hoa/console/Processus.php',
'Hoa\\Console\\Readline\\Autocompleter\\Aggregate' => $vendorDir . '/hoa/console/Readline/Autocompleter/Aggregate.php',
'Hoa\\Console\\Readline\\Autocompleter\\Autocompleter' => $vendorDir . '/hoa/console/Readline/Autocompleter/Autocompleter.php',
'Hoa\\Console\\Readline\\Autocompleter\\Path' => $vendorDir . '/hoa/console/Readline/Autocompleter/Path.php',
'Hoa\\Console\\Readline\\Autocompleter\\Word' => $vendorDir . '/hoa/console/Readline/Autocompleter/Word.php',
'Hoa\\Console\\Readline\\Password' => $vendorDir . '/hoa/console/Readline/Password.php',
'Hoa\\Console\\Readline\\Readline' => $vendorDir . '/hoa/console/Readline/Readline.php',
'Hoa\\Console\\Test\\Unit\\Console' => $vendorDir . '/hoa/console/Test/Unit/Console.php',
'Hoa\\Console\\Test\\Unit\\Cursor' => $vendorDir . '/hoa/console/Test/Unit/Cursor.php',
'Hoa\\Console\\Test\\Unit\\GetOption' => $vendorDir . '/hoa/console/Test/Unit/GetOption.php',
'Hoa\\Console\\Test\\Unit\\Input' => $vendorDir . '/hoa/console/Test/Unit/Input.php',
'Hoa\\Console\\Test\\Unit\\Mouse' => $vendorDir . '/hoa/console/Test/Unit/Mouse.php',
'Hoa\\Console\\Test\\Unit\\Output' => $vendorDir . '/hoa/console/Test/Unit/Output.php',
'Hoa\\Console\\Test\\Unit\\Parser' => $vendorDir . '/hoa/console/Test/Unit/Parser.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Aggregate' => $vendorDir . '/hoa/console/Test/Unit/Readline/Autocompleter/Aggregate.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Path' => $vendorDir . '/hoa/console/Test/Unit/Readline/Autocompleter/Path.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Word' => $vendorDir . '/hoa/console/Test/Unit/Readline/Autocompleter/Word.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Password' => $vendorDir . '/hoa/console/Test/Unit/Readline/Password.php',
'Hoa\\Console\\Test\\Unit\\Tput' => $vendorDir . '/hoa/console/Test/Unit/Tput.php',
'Hoa\\Console\\Test\\Unit\\Window' => $vendorDir . '/hoa/console/Test/Unit/Window.php',
'Hoa\\Console\\Tput' => $vendorDir . '/hoa/console/Tput.php',
'Hoa\\Console\\Window' => $vendorDir . '/hoa/console/Window.php',
'Hoa\\Event\\Bucket' => $vendorDir . '/hoa/event/Bucket.php',
'Hoa\\Event\\Event' => $vendorDir . '/hoa/event/Event.php',
'Hoa\\Event\\Exception' => $vendorDir . '/hoa/event/Exception.php',
@@ -524,6 +597,450 @@ return array(
'Hoa\\Exception\\Test\\Unit\\Exception' => $vendorDir . '/hoa/exception/Test/Unit/Exception.php',
'Hoa\\Exception\\Test\\Unit\\Group' => $vendorDir . '/hoa/exception/Test/Unit/Group.php',
'Hoa\\Exception\\Test\\Unit\\Idle' => $vendorDir . '/hoa/exception/Test/Unit/Idle.php',
'Hoa\\File\\Directory' => $vendorDir . '/hoa/file/Directory.php',
'Hoa\\File\\Exception\\Exception' => $vendorDir . '/hoa/file/Exception/Exception.php',
'Hoa\\File\\Exception\\FileDoesNotExist' => $vendorDir . '/hoa/file/Exception/FileDoesNotExist.php',
'Hoa\\File\\File' => $vendorDir . '/hoa/file/File.php',
'Hoa\\File\\Finder' => $vendorDir . '/hoa/file/Finder.php',
'Hoa\\File\\Generic' => $vendorDir . '/hoa/file/Generic.php',
'Hoa\\File\\Link\\Link' => $vendorDir . '/hoa/file/Link/Link.php',
'Hoa\\File\\Link\\Read' => $vendorDir . '/hoa/file/Link/Read.php',
'Hoa\\File\\Link\\ReadWrite' => $vendorDir . '/hoa/file/Link/ReadWrite.php',
'Hoa\\File\\Link\\Write' => $vendorDir . '/hoa/file/Link/Write.php',
'Hoa\\File\\Read' => $vendorDir . '/hoa/file/Read.php',
'Hoa\\File\\ReadWrite' => $vendorDir . '/hoa/file/ReadWrite.php',
'Hoa\\File\\SplFileInfo' => $vendorDir . '/hoa/file/SplFileInfo.php',
'Hoa\\File\\Temporary\\Read' => $vendorDir . '/hoa/file/Temporary/Read.php',
'Hoa\\File\\Temporary\\ReadWrite' => $vendorDir . '/hoa/file/Temporary/ReadWrite.php',
'Hoa\\File\\Temporary\\Temporary' => $vendorDir . '/hoa/file/Temporary/Temporary.php',
'Hoa\\File\\Temporary\\Write' => $vendorDir . '/hoa/file/Temporary/Write.php',
'Hoa\\File\\Watcher' => $vendorDir . '/hoa/file/Watcher.php',
'Hoa\\File\\Write' => $vendorDir . '/hoa/file/Write.php',
'Hoa\\Iterator\\Aggregate' => $vendorDir . '/hoa/iterator/Aggregate.php',
'Hoa\\Iterator\\Append' => $vendorDir . '/hoa/iterator/Append.php',
'Hoa\\Iterator\\Buffer' => $vendorDir . '/hoa/iterator/Buffer.php',
'Hoa\\Iterator\\CallbackFilter' => $vendorDir . '/hoa/iterator/CallbackFilter.php',
'Hoa\\Iterator\\CallbackGenerator' => $vendorDir . '/hoa/iterator/CallbackGenerator.php',
'Hoa\\Iterator\\Counter' => $vendorDir . '/hoa/iterator/Counter.php',
'Hoa\\Iterator\\Demultiplexer' => $vendorDir . '/hoa/iterator/Demultiplexer.php',
'Hoa\\Iterator\\Directory' => $vendorDir . '/hoa/iterator/Directory.php',
'Hoa\\Iterator\\Exception' => $vendorDir . '/hoa/iterator/Exception.php',
'Hoa\\Iterator\\FileSystem' => $vendorDir . '/hoa/iterator/FileSystem.php',
'Hoa\\Iterator\\Filter' => $vendorDir . '/hoa/iterator/Filter.php',
'Hoa\\Iterator\\Glob' => $vendorDir . '/hoa/iterator/Glob.php',
'Hoa\\Iterator\\Infinite' => $vendorDir . '/hoa/iterator/Infinite.php',
'Hoa\\Iterator\\Iterator' => $vendorDir . '/hoa/iterator/Iterator.php',
'Hoa\\Iterator\\IteratorIterator' => $vendorDir . '/hoa/iterator/IteratorIterator.php',
'Hoa\\Iterator\\Limit' => $vendorDir . '/hoa/iterator/Limit.php',
'Hoa\\Iterator\\Lookahead' => $vendorDir . '/hoa/iterator/Lookahead.php',
'Hoa\\Iterator\\Lookbehind' => $vendorDir . '/hoa/iterator/Lookbehind.php',
'Hoa\\Iterator\\Map' => $vendorDir . '/hoa/iterator/Map.php',
'Hoa\\Iterator\\Mock' => $vendorDir . '/hoa/iterator/Mock.php',
'Hoa\\Iterator\\Multiple' => $vendorDir . '/hoa/iterator/Multiple.php',
'Hoa\\Iterator\\NoRewind' => $vendorDir . '/hoa/iterator/NoRewind.php',
'Hoa\\Iterator\\Outer' => $vendorDir . '/hoa/iterator/Outer.php',
'Hoa\\Iterator\\Recursive\\CallbackFilter' => $vendorDir . '/hoa/iterator/Recursive/CallbackFilter.php',
'Hoa\\Iterator\\Recursive\\Directory' => $vendorDir . '/hoa/iterator/Recursive/Directory.php',
'Hoa\\Iterator\\Recursive\\Filter' => $vendorDir . '/hoa/iterator/Recursive/Filter.php',
'Hoa\\Iterator\\Recursive\\Iterator' => $vendorDir . '/hoa/iterator/Recursive/Iterator.php',
'Hoa\\Iterator\\Recursive\\Map' => $vendorDir . '/hoa/iterator/Recursive/Map.php',
'Hoa\\Iterator\\Recursive\\Mock' => $vendorDir . '/hoa/iterator/Recursive/Mock.php',
'Hoa\\Iterator\\Recursive\\Recursive' => $vendorDir . '/hoa/iterator/Recursive/Recursive.php',
'Hoa\\Iterator\\Recursive\\RegularExpression' => $vendorDir . '/hoa/iterator/Recursive/RegularExpression.php',
'Hoa\\Iterator\\RegularExpression' => $vendorDir . '/hoa/iterator/RegularExpression.php',
'Hoa\\Iterator\\Repeater' => $vendorDir . '/hoa/iterator/Repeater.php',
'Hoa\\Iterator\\Seekable' => $vendorDir . '/hoa/iterator/Seekable.php',
'Hoa\\Iterator\\SplFileInfo' => $vendorDir . '/hoa/iterator/SplFileInfo.php',
'Hoa\\Iterator\\Test\\Unit\\Append' => $vendorDir . '/hoa/iterator/Test/Unit/Append.php',
'Hoa\\Iterator\\Test\\Unit\\Buffer' => $vendorDir . '/hoa/iterator/Test/Unit/Buffer.php',
'Hoa\\Iterator\\Test\\Unit\\CallbackFilter' => $vendorDir . '/hoa/iterator/Test/Unit/CallbackFilter.php',
'Hoa\\Iterator\\Test\\Unit\\CallbackGenerator' => $vendorDir . '/hoa/iterator/Test/Unit/CallbackGenerator.php',
'Hoa\\Iterator\\Test\\Unit\\Counter' => $vendorDir . '/hoa/iterator/Test/Unit/Counter.php',
'Hoa\\Iterator\\Test\\Unit\\Demultiplexer' => $vendorDir . '/hoa/iterator/Test/Unit/Demultiplexer.php',
'Hoa\\Iterator\\Test\\Unit\\Directory' => $vendorDir . '/hoa/iterator/Test/Unit/Directory.php',
'Hoa\\Iterator\\Test\\Unit\\FileSystem' => $vendorDir . '/hoa/iterator/Test/Unit/FileSystem.php',
'Hoa\\Iterator\\Test\\Unit\\Filter' => $vendorDir . '/hoa/iterator/Test/Unit/Filter.php',
'Hoa\\Iterator\\Test\\Unit\\Infinite' => $vendorDir . '/hoa/iterator/Test/Unit/Infinite.php',
'Hoa\\Iterator\\Test\\Unit\\IteratorIterator' => $vendorDir . '/hoa/iterator/Test/Unit/IteratorIterator.php',
'Hoa\\Iterator\\Test\\Unit\\Limit' => $vendorDir . '/hoa/iterator/Test/Unit/Limit.php',
'Hoa\\Iterator\\Test\\Unit\\Lookahead' => $vendorDir . '/hoa/iterator/Test/Unit/Lookahead.php',
'Hoa\\Iterator\\Test\\Unit\\Lookbehind' => $vendorDir . '/hoa/iterator/Test/Unit/Lookbehind.php',
'Hoa\\Iterator\\Test\\Unit\\Map' => $vendorDir . '/hoa/iterator/Test/Unit/Map.php',
'Hoa\\Iterator\\Test\\Unit\\Mock' => $vendorDir . '/hoa/iterator/Test/Unit/Mock.php',
'Hoa\\Iterator\\Test\\Unit\\Multiple' => $vendorDir . '/hoa/iterator/Test/Unit/Multiple.php',
'Hoa\\Iterator\\Test\\Unit\\MyFilter' => $vendorDir . '/hoa/iterator/Test/Unit/Filter.php',
'Hoa\\Iterator\\Test\\Unit\\NoRewind' => $vendorDir . '/hoa/iterator/Test/Unit/NoRewind.php',
'Hoa\\Iterator\\Test\\Unit\\RegularExpression' => $vendorDir . '/hoa/iterator/Test/Unit/RegularExpression.php',
'Hoa\\Iterator\\Test\\Unit\\Repeater' => $vendorDir . '/hoa/iterator/Test/Unit/Repeater.php',
'Hoa\\Iterator\\Test\\Unit\\SplFileInfo' => $vendorDir . '/hoa/iterator/Test/Unit/SplFileInfo.php',
'Hoa\\Protocol\\Bin\\Resolve' => $vendorDir . '/hoa/protocol/Bin/Resolve.php',
'Hoa\\Protocol\\Exception' => $vendorDir . '/hoa/protocol/Exception.php',
'Hoa\\Protocol\\Node\\Library' => $vendorDir . '/hoa/protocol/Node/Library.php',
'Hoa\\Protocol\\Node\\Node' => $vendorDir . '/hoa/protocol/Node/Node.php',
'Hoa\\Protocol\\Protocol' => $vendorDir . '/hoa/protocol/Protocol.php',
'Hoa\\Protocol\\Test\\Unit\\Exception' => $vendorDir . '/hoa/protocol/Test/Unit/Exception.php',
'Hoa\\Protocol\\Test\\Unit\\Node\\Library' => $vendorDir . '/hoa/protocol/Test/Unit/Node/Library.php',
'Hoa\\Protocol\\Test\\Unit\\Node\\Node' => $vendorDir . '/hoa/protocol/Test/Unit/Node/Node.php',
'Hoa\\Protocol\\Test\\Unit\\Protocol' => $vendorDir . '/hoa/protocol/Test/Unit/Protocol.php',
'Hoa\\Protocol\\Test\\Unit\\Wrapper' => $vendorDir . '/hoa/protocol/Test/Unit/Wrapper.php',
'Hoa\\Protocol\\Wrapper' => $vendorDir . '/hoa/protocol/Wrapper.php',
'Hoa\\Stream\\Bucket' => $vendorDir . '/hoa/stream/Bucket.php',
'Hoa\\Stream\\Composite' => $vendorDir . '/hoa/stream/Composite.php',
'Hoa\\Stream\\Context' => $vendorDir . '/hoa/stream/Context.php',
'Hoa\\Stream\\Exception' => $vendorDir . '/hoa/stream/Exception.php',
'Hoa\\Stream\\Filter\\Basic' => $vendorDir . '/hoa/stream/Filter/Basic.php',
'Hoa\\Stream\\Filter\\Exception' => $vendorDir . '/hoa/stream/Filter/Exception.php',
'Hoa\\Stream\\Filter\\Filter' => $vendorDir . '/hoa/stream/Filter/Filter.php',
'Hoa\\Stream\\Filter\\LateComputed' => $vendorDir . '/hoa/stream/Filter/LateComputed.php',
'Hoa\\Stream\\IStream\\Bufferable' => $vendorDir . '/hoa/stream/IStream/Bufferable.php',
'Hoa\\Stream\\IStream\\In' => $vendorDir . '/hoa/stream/IStream/In.php',
'Hoa\\Stream\\IStream\\Lockable' => $vendorDir . '/hoa/stream/IStream/Lockable.php',
'Hoa\\Stream\\IStream\\Out' => $vendorDir . '/hoa/stream/IStream/Out.php',
'Hoa\\Stream\\IStream\\Pathable' => $vendorDir . '/hoa/stream/IStream/Pathable.php',
'Hoa\\Stream\\IStream\\Pointable' => $vendorDir . '/hoa/stream/IStream/Pointable.php',
'Hoa\\Stream\\IStream\\Statable' => $vendorDir . '/hoa/stream/IStream/Statable.php',
'Hoa\\Stream\\IStream\\Stream' => $vendorDir . '/hoa/stream/IStream/Stream.php',
'Hoa\\Stream\\IStream\\Structural' => $vendorDir . '/hoa/stream/IStream/Structural.php',
'Hoa\\Stream\\IStream\\Touchable' => $vendorDir . '/hoa/stream/IStream/Touchable.php',
'Hoa\\Stream\\Stream' => $vendorDir . '/hoa/stream/Stream.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\CustomFilter' => $vendorDir . '/hoa/stream/Test/Integration/Filter/LateComputed.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\Filter' => $vendorDir . '/hoa/stream/Test/Integration/Filter/Filter.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\LateComputed' => $vendorDir . '/hoa/stream/Test/Integration/Filter/LateComputed.php',
'Hoa\\Stream\\Test\\Integration\\SUT' => $vendorDir . '/hoa/stream/Test/Integration/Stream.php',
'Hoa\\Stream\\Test\\Integration\\Stream' => $vendorDir . '/hoa/stream/Test/Integration/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Bucket' => $vendorDir . '/hoa/stream/Test/Unit/Bucket.php',
'Hoa\\Stream\\Test\\Unit\\Composite' => $vendorDir . '/hoa/stream/Test/Unit/Composite.php',
'Hoa\\Stream\\Test\\Unit\\Context' => $vendorDir . '/hoa/stream/Test/Unit/Context.php',
'Hoa\\Stream\\Test\\Unit\\Exception' => $vendorDir . '/hoa/stream/Test/Unit/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Basic' => $vendorDir . '/hoa/stream/Test/Unit/Filter/Basic.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Exception' => $vendorDir . '/hoa/stream/Test/Unit/Filter/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Filter' => $vendorDir . '/hoa/stream/Test/Unit/Filter/Filter.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Bufferable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Bufferable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\In' => $vendorDir . '/hoa/stream/Test/Unit/IStream/In.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Lockable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Lockable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Out' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Out.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Pathable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Pathable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Pointable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Pointable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Statable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Statable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Stream' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Stream.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Structural' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Structural.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Touchable' => $vendorDir . '/hoa/stream/Test/Unit/IStream/Touchable.php',
'Hoa\\Stream\\Test\\Unit\\SUT' => $vendorDir . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\SUTWithPublicClose' => $vendorDir . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Stream' => $vendorDir . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\Exception' => $vendorDir . '/hoa/stream/Test/Unit/Wrapper/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\File' => $vendorDir . '/hoa/stream/Test/Unit/Wrapper/IWrapper/File.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\IWrapper' => $vendorDir . '/hoa/stream/Test/Unit/Wrapper/IWrapper/IWrapper.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\Stream' => $vendorDir . '/hoa/stream/Test/Unit/Wrapper/IWrapper/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\Wrapper' => $vendorDir . '/hoa/stream/Test/Unit/Wrapper/Wrapper.php',
'Hoa\\Stream\\Wrapper\\Exception' => $vendorDir . '/hoa/stream/Wrapper/Exception.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\File' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/File.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\IWrapper' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/IWrapper.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\Stream' => $vendorDir . '/hoa/stream/Wrapper/IWrapper/Stream.php',
'Hoa\\Stream\\Wrapper\\Wrapper' => $vendorDir . '/hoa/stream/Wrapper/Wrapper.php',
'Hoa\\Stream\\_Protocol' => $vendorDir . '/hoa/stream/Stream.php',
'Hoa\\Ustring\\Bin\\Fromcode' => $vendorDir . '/hoa/ustring/Bin/Fromcode.php',
'Hoa\\Ustring\\Bin\\Tocode' => $vendorDir . '/hoa/ustring/Bin/Tocode.php',
'Hoa\\Ustring\\Exception' => $vendorDir . '/hoa/ustring/Exception.php',
'Hoa\\Ustring\\Search' => $vendorDir . '/hoa/ustring/Search.php',
'Hoa\\Ustring\\Test\\Unit\\Issue' => $vendorDir . '/hoa/ustring/Test/Unit/Issue.php',
'Hoa\\Ustring\\Test\\Unit\\Search' => $vendorDir . '/hoa/ustring/Test/Unit/Search.php',
'Hoa\\Ustring\\Test\\Unit\\Ustring' => $vendorDir . '/hoa/ustring/Test/Unit/Ustring.php',
'Hoa\\Ustring\\Ustring' => $vendorDir . '/hoa/ustring/Ustring.php',
'Illuminate\\Container\\BoundMethod' => $vendorDir . '/illuminate/container/BoundMethod.php',
'Illuminate\\Container\\Container' => $vendorDir . '/illuminate/container/Container.php',
'Illuminate\\Container\\ContextualBindingBuilder' => $vendorDir . '/illuminate/container/ContextualBindingBuilder.php',
'Illuminate\\Container\\EntryNotFoundException' => $vendorDir . '/illuminate/container/EntryNotFoundException.php',
'Illuminate\\Container\\RewindableGenerator' => $vendorDir . '/illuminate/container/RewindableGenerator.php',
'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => $vendorDir . '/illuminate/contracts/Auth/Access/Authorizable.php',
'Illuminate\\Contracts\\Auth\\Access\\Gate' => $vendorDir . '/illuminate/contracts/Auth/Access/Gate.php',
'Illuminate\\Contracts\\Auth\\Authenticatable' => $vendorDir . '/illuminate/contracts/Auth/Authenticatable.php',
'Illuminate\\Contracts\\Auth\\CanResetPassword' => $vendorDir . '/illuminate/contracts/Auth/CanResetPassword.php',
'Illuminate\\Contracts\\Auth\\Factory' => $vendorDir . '/illuminate/contracts/Auth/Factory.php',
'Illuminate\\Contracts\\Auth\\Guard' => $vendorDir . '/illuminate/contracts/Auth/Guard.php',
'Illuminate\\Contracts\\Auth\\MustVerifyEmail' => $vendorDir . '/illuminate/contracts/Auth/MustVerifyEmail.php',
'Illuminate\\Contracts\\Auth\\PasswordBroker' => $vendorDir . '/illuminate/contracts/Auth/PasswordBroker.php',
'Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => $vendorDir . '/illuminate/contracts/Auth/PasswordBrokerFactory.php',
'Illuminate\\Contracts\\Auth\\StatefulGuard' => $vendorDir . '/illuminate/contracts/Auth/StatefulGuard.php',
'Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => $vendorDir . '/illuminate/contracts/Auth/SupportsBasicAuth.php',
'Illuminate\\Contracts\\Auth\\UserProvider' => $vendorDir . '/illuminate/contracts/Auth/UserProvider.php',
'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => $vendorDir . '/illuminate/contracts/Broadcasting/Broadcaster.php',
'Illuminate\\Contracts\\Broadcasting\\Factory' => $vendorDir . '/illuminate/contracts/Broadcasting/Factory.php',
'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => $vendorDir . '/illuminate/contracts/Broadcasting/ShouldBroadcast.php',
'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => $vendorDir . '/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php',
'Illuminate\\Contracts\\Bus\\Dispatcher' => $vendorDir . '/illuminate/contracts/Bus/Dispatcher.php',
'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => $vendorDir . '/illuminate/contracts/Bus/QueueingDispatcher.php',
'Illuminate\\Contracts\\Cache\\Factory' => $vendorDir . '/illuminate/contracts/Cache/Factory.php',
'Illuminate\\Contracts\\Cache\\Lock' => $vendorDir . '/illuminate/contracts/Cache/Lock.php',
'Illuminate\\Contracts\\Cache\\LockProvider' => $vendorDir . '/illuminate/contracts/Cache/LockProvider.php',
'Illuminate\\Contracts\\Cache\\LockTimeoutException' => $vendorDir . '/illuminate/contracts/Cache/LockTimeoutException.php',
'Illuminate\\Contracts\\Cache\\Repository' => $vendorDir . '/illuminate/contracts/Cache/Repository.php',
'Illuminate\\Contracts\\Cache\\Store' => $vendorDir . '/illuminate/contracts/Cache/Store.php',
'Illuminate\\Contracts\\Config\\Repository' => $vendorDir . '/illuminate/contracts/Config/Repository.php',
'Illuminate\\Contracts\\Console\\Application' => $vendorDir . '/illuminate/contracts/Console/Application.php',
'Illuminate\\Contracts\\Console\\Kernel' => $vendorDir . '/illuminate/contracts/Console/Kernel.php',
'Illuminate\\Contracts\\Container\\BindingResolutionException' => $vendorDir . '/illuminate/contracts/Container/BindingResolutionException.php',
'Illuminate\\Contracts\\Container\\Container' => $vendorDir . '/illuminate/contracts/Container/Container.php',
'Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => $vendorDir . '/illuminate/contracts/Container/ContextualBindingBuilder.php',
'Illuminate\\Contracts\\Cookie\\Factory' => $vendorDir . '/illuminate/contracts/Cookie/Factory.php',
'Illuminate\\Contracts\\Cookie\\QueueingFactory' => $vendorDir . '/illuminate/contracts/Cookie/QueueingFactory.php',
'Illuminate\\Contracts\\Database\\Events\\MigrationEvent' => $vendorDir . '/illuminate/contracts/Database/Events/MigrationEvent.php',
'Illuminate\\Contracts\\Database\\ModelIdentifier' => $vendorDir . '/illuminate/contracts/Database/ModelIdentifier.php',
'Illuminate\\Contracts\\Debug\\ExceptionHandler' => $vendorDir . '/illuminate/contracts/Debug/ExceptionHandler.php',
'Illuminate\\Contracts\\Encryption\\DecryptException' => $vendorDir . '/illuminate/contracts/Encryption/DecryptException.php',
'Illuminate\\Contracts\\Encryption\\EncryptException' => $vendorDir . '/illuminate/contracts/Encryption/EncryptException.php',
'Illuminate\\Contracts\\Encryption\\Encrypter' => $vendorDir . '/illuminate/contracts/Encryption/Encrypter.php',
'Illuminate\\Contracts\\Events\\Dispatcher' => $vendorDir . '/illuminate/contracts/Events/Dispatcher.php',
'Illuminate\\Contracts\\Filesystem\\Cloud' => $vendorDir . '/illuminate/contracts/Filesystem/Cloud.php',
'Illuminate\\Contracts\\Filesystem\\Factory' => $vendorDir . '/illuminate/contracts/Filesystem/Factory.php',
'Illuminate\\Contracts\\Filesystem\\FileExistsException' => $vendorDir . '/illuminate/contracts/Filesystem/FileExistsException.php',
'Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => $vendorDir . '/illuminate/contracts/Filesystem/FileNotFoundException.php',
'Illuminate\\Contracts\\Filesystem\\Filesystem' => $vendorDir . '/illuminate/contracts/Filesystem/Filesystem.php',
'Illuminate\\Contracts\\Foundation\\Application' => $vendorDir . '/illuminate/contracts/Foundation/Application.php',
'Illuminate\\Contracts\\Hashing\\Hasher' => $vendorDir . '/illuminate/contracts/Hashing/Hasher.php',
'Illuminate\\Contracts\\Http\\Kernel' => $vendorDir . '/illuminate/contracts/Http/Kernel.php',
'Illuminate\\Contracts\\Mail\\MailQueue' => $vendorDir . '/illuminate/contracts/Mail/MailQueue.php',
'Illuminate\\Contracts\\Mail\\Mailable' => $vendorDir . '/illuminate/contracts/Mail/Mailable.php',
'Illuminate\\Contracts\\Mail\\Mailer' => $vendorDir . '/illuminate/contracts/Mail/Mailer.php',
'Illuminate\\Contracts\\Notifications\\Dispatcher' => $vendorDir . '/illuminate/contracts/Notifications/Dispatcher.php',
'Illuminate\\Contracts\\Notifications\\Factory' => $vendorDir . '/illuminate/contracts/Notifications/Factory.php',
'Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => $vendorDir . '/illuminate/contracts/Pagination/LengthAwarePaginator.php',
'Illuminate\\Contracts\\Pagination\\Paginator' => $vendorDir . '/illuminate/contracts/Pagination/Paginator.php',
'Illuminate\\Contracts\\Pipeline\\Hub' => $vendorDir . '/illuminate/contracts/Pipeline/Hub.php',
'Illuminate\\Contracts\\Pipeline\\Pipeline' => $vendorDir . '/illuminate/contracts/Pipeline/Pipeline.php',
'Illuminate\\Contracts\\Queue\\EntityNotFoundException' => $vendorDir . '/illuminate/contracts/Queue/EntityNotFoundException.php',
'Illuminate\\Contracts\\Queue\\EntityResolver' => $vendorDir . '/illuminate/contracts/Queue/EntityResolver.php',
'Illuminate\\Contracts\\Queue\\Factory' => $vendorDir . '/illuminate/contracts/Queue/Factory.php',
'Illuminate\\Contracts\\Queue\\Job' => $vendorDir . '/illuminate/contracts/Queue/Job.php',
'Illuminate\\Contracts\\Queue\\Monitor' => $vendorDir . '/illuminate/contracts/Queue/Monitor.php',
'Illuminate\\Contracts\\Queue\\Queue' => $vendorDir . '/illuminate/contracts/Queue/Queue.php',
'Illuminate\\Contracts\\Queue\\QueueableCollection' => $vendorDir . '/illuminate/contracts/Queue/QueueableCollection.php',
'Illuminate\\Contracts\\Queue\\QueueableEntity' => $vendorDir . '/illuminate/contracts/Queue/QueueableEntity.php',
'Illuminate\\Contracts\\Queue\\ShouldQueue' => $vendorDir . '/illuminate/contracts/Queue/ShouldQueue.php',
'Illuminate\\Contracts\\Redis\\Connection' => $vendorDir . '/illuminate/contracts/Redis/Connection.php',
'Illuminate\\Contracts\\Redis\\Connector' => $vendorDir . '/illuminate/contracts/Redis/Connector.php',
'Illuminate\\Contracts\\Redis\\Factory' => $vendorDir . '/illuminate/contracts/Redis/Factory.php',
'Illuminate\\Contracts\\Redis\\LimiterTimeoutException' => $vendorDir . '/illuminate/contracts/Redis/LimiterTimeoutException.php',
'Illuminate\\Contracts\\Routing\\BindingRegistrar' => $vendorDir . '/illuminate/contracts/Routing/BindingRegistrar.php',
'Illuminate\\Contracts\\Routing\\Registrar' => $vendorDir . '/illuminate/contracts/Routing/Registrar.php',
'Illuminate\\Contracts\\Routing\\ResponseFactory' => $vendorDir . '/illuminate/contracts/Routing/ResponseFactory.php',
'Illuminate\\Contracts\\Routing\\UrlGenerator' => $vendorDir . '/illuminate/contracts/Routing/UrlGenerator.php',
'Illuminate\\Contracts\\Routing\\UrlRoutable' => $vendorDir . '/illuminate/contracts/Routing/UrlRoutable.php',
'Illuminate\\Contracts\\Session\\Session' => $vendorDir . '/illuminate/contracts/Session/Session.php',
'Illuminate\\Contracts\\Support\\Arrayable' => $vendorDir . '/illuminate/contracts/Support/Arrayable.php',
'Illuminate\\Contracts\\Support\\DeferrableProvider' => $vendorDir . '/illuminate/contracts/Support/DeferrableProvider.php',
'Illuminate\\Contracts\\Support\\Htmlable' => $vendorDir . '/illuminate/contracts/Support/Htmlable.php',
'Illuminate\\Contracts\\Support\\Jsonable' => $vendorDir . '/illuminate/contracts/Support/Jsonable.php',
'Illuminate\\Contracts\\Support\\MessageBag' => $vendorDir . '/illuminate/contracts/Support/MessageBag.php',
'Illuminate\\Contracts\\Support\\MessageProvider' => $vendorDir . '/illuminate/contracts/Support/MessageProvider.php',
'Illuminate\\Contracts\\Support\\Renderable' => $vendorDir . '/illuminate/contracts/Support/Renderable.php',
'Illuminate\\Contracts\\Support\\Responsable' => $vendorDir . '/illuminate/contracts/Support/Responsable.php',
'Illuminate\\Contracts\\Translation\\HasLocalePreference' => $vendorDir . '/illuminate/contracts/Translation/HasLocalePreference.php',
'Illuminate\\Contracts\\Translation\\Loader' => $vendorDir . '/illuminate/contracts/Translation/Loader.php',
'Illuminate\\Contracts\\Translation\\Translator' => $vendorDir . '/illuminate/contracts/Translation/Translator.php',
'Illuminate\\Contracts\\Validation\\Factory' => $vendorDir . '/illuminate/contracts/Validation/Factory.php',
'Illuminate\\Contracts\\Validation\\ImplicitRule' => $vendorDir . '/illuminate/contracts/Validation/ImplicitRule.php',
'Illuminate\\Contracts\\Validation\\Rule' => $vendorDir . '/illuminate/contracts/Validation/Rule.php',
'Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => $vendorDir . '/illuminate/contracts/Validation/ValidatesWhenResolved.php',
'Illuminate\\Contracts\\Validation\\Validator' => $vendorDir . '/illuminate/contracts/Validation/Validator.php',
'Illuminate\\Contracts\\View\\Engine' => $vendorDir . '/illuminate/contracts/View/Engine.php',
'Illuminate\\Contracts\\View\\Factory' => $vendorDir . '/illuminate/contracts/View/Factory.php',
'Illuminate\\Contracts\\View\\View' => $vendorDir . '/illuminate/contracts/View/View.php',
'Illuminate\\Database\\Capsule\\Manager' => $vendorDir . '/illuminate/database/Capsule/Manager.php',
'Illuminate\\Database\\Concerns\\BuildsQueries' => $vendorDir . '/illuminate/database/Concerns/BuildsQueries.php',
'Illuminate\\Database\\Concerns\\ManagesTransactions' => $vendorDir . '/illuminate/database/Concerns/ManagesTransactions.php',
'Illuminate\\Database\\ConfigurationUrlParser' => $vendorDir . '/illuminate/database/ConfigurationUrlParser.php',
'Illuminate\\Database\\Connection' => $vendorDir . '/illuminate/database/Connection.php',
'Illuminate\\Database\\ConnectionInterface' => $vendorDir . '/illuminate/database/ConnectionInterface.php',
'Illuminate\\Database\\ConnectionResolver' => $vendorDir . '/illuminate/database/ConnectionResolver.php',
'Illuminate\\Database\\ConnectionResolverInterface' => $vendorDir . '/illuminate/database/ConnectionResolverInterface.php',
'Illuminate\\Database\\Connectors\\ConnectionFactory' => $vendorDir . '/illuminate/database/Connectors/ConnectionFactory.php',
'Illuminate\\Database\\Connectors\\Connector' => $vendorDir . '/illuminate/database/Connectors/Connector.php',
'Illuminate\\Database\\Connectors\\ConnectorInterface' => $vendorDir . '/illuminate/database/Connectors/ConnectorInterface.php',
'Illuminate\\Database\\Connectors\\MySqlConnector' => $vendorDir . '/illuminate/database/Connectors/MySqlConnector.php',
'Illuminate\\Database\\Connectors\\PostgresConnector' => $vendorDir . '/illuminate/database/Connectors/PostgresConnector.php',
'Illuminate\\Database\\Connectors\\SQLiteConnector' => $vendorDir . '/illuminate/database/Connectors/SQLiteConnector.php',
'Illuminate\\Database\\Connectors\\SqlServerConnector' => $vendorDir . '/illuminate/database/Connectors/SqlServerConnector.php',
'Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand' => $vendorDir . '/illuminate/database/Console/Factories/FactoryMakeCommand.php',
'Illuminate\\Database\\Console\\Migrations\\BaseCommand' => $vendorDir . '/illuminate/database/Console/Migrations/BaseCommand.php',
'Illuminate\\Database\\Console\\Migrations\\FreshCommand' => $vendorDir . '/illuminate/database/Console/Migrations/FreshCommand.php',
'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => $vendorDir . '/illuminate/database/Console/Migrations/InstallCommand.php',
'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => $vendorDir . '/illuminate/database/Console/Migrations/MigrateCommand.php',
'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => $vendorDir . '/illuminate/database/Console/Migrations/MigrateMakeCommand.php',
'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => $vendorDir . '/illuminate/database/Console/Migrations/RefreshCommand.php',
'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => $vendorDir . '/illuminate/database/Console/Migrations/ResetCommand.php',
'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => $vendorDir . '/illuminate/database/Console/Migrations/RollbackCommand.php',
'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => $vendorDir . '/illuminate/database/Console/Migrations/StatusCommand.php',
'Illuminate\\Database\\Console\\Migrations\\TableGuesser' => $vendorDir . '/illuminate/database/Console/Migrations/TableGuesser.php',
'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => $vendorDir . '/illuminate/database/Console/Seeds/SeedCommand.php',
'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => $vendorDir . '/illuminate/database/Console/Seeds/SeederMakeCommand.php',
'Illuminate\\Database\\DatabaseManager' => $vendorDir . '/illuminate/database/DatabaseManager.php',
'Illuminate\\Database\\DatabaseServiceProvider' => $vendorDir . '/illuminate/database/DatabaseServiceProvider.php',
'Illuminate\\Database\\DetectsDeadlocks' => $vendorDir . '/illuminate/database/DetectsDeadlocks.php',
'Illuminate\\Database\\DetectsLostConnections' => $vendorDir . '/illuminate/database/DetectsLostConnections.php',
'Illuminate\\Database\\Eloquent\\Builder' => $vendorDir . '/illuminate/database/Eloquent/Builder.php',
'Illuminate\\Database\\Eloquent\\Collection' => $vendorDir . '/illuminate/database/Eloquent/Collection.php',
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => $vendorDir . '/illuminate/database/Eloquent/Concerns/GuardsAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HasAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HasEvents.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HasGlobalScopes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HasRelationships.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HasTimestamps.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => $vendorDir . '/illuminate/database/Eloquent/Concerns/HidesAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $vendorDir . '/illuminate/database/Eloquent/Concerns/QueriesRelationships.php',
'Illuminate\\Database\\Eloquent\\Factory' => $vendorDir . '/illuminate/database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\FactoryBuilder' => $vendorDir . '/illuminate/database/Eloquent/FactoryBuilder.php',
'Illuminate\\Database\\Eloquent\\HigherOrderBuilderProxy' => $vendorDir . '/illuminate/database/Eloquent/HigherOrderBuilderProxy.php',
'Illuminate\\Database\\Eloquent\\JsonEncodingException' => $vendorDir . '/illuminate/database/Eloquent/JsonEncodingException.php',
'Illuminate\\Database\\Eloquent\\MassAssignmentException' => $vendorDir . '/illuminate/database/Eloquent/MassAssignmentException.php',
'Illuminate\\Database\\Eloquent\\Model' => $vendorDir . '/illuminate/database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => $vendorDir . '/illuminate/database/Eloquent/ModelNotFoundException.php',
'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => $vendorDir . '/illuminate/database/Eloquent/QueueEntityResolver.php',
'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => $vendorDir . '/illuminate/database/Eloquent/RelationNotFoundException.php',
'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo' => $vendorDir . '/illuminate/database/Eloquent/Relations/BelongsTo.php',
'Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/BelongsToMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\AsPivot' => $vendorDir . '/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithPivotTable' => $vendorDir . '/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\SupportsDefaultModels' => $vendorDir . '/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/HasMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasManyThrough' => $vendorDir . '/illuminate/database/Eloquent/Relations/HasManyThrough.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOne' => $vendorDir . '/illuminate/database/Eloquent/Relations/HasOne.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/HasOneOrMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOneThrough' => $vendorDir . '/illuminate/database/Eloquent/Relations/HasOneThrough.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphOne' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphOne.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphOneOrMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphPivot' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphPivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphTo.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => $vendorDir . '/illuminate/database/Eloquent/Relations/MorphToMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/illuminate/database/Eloquent/Relations/Pivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/illuminate/database/Eloquent/Relations/Relation.php',
'Illuminate\\Database\\Eloquent\\Scope' => $vendorDir . '/illuminate/database/Eloquent/Scope.php',
'Illuminate\\Database\\Eloquent\\SoftDeletes' => $vendorDir . '/illuminate/database/Eloquent/SoftDeletes.php',
'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => $vendorDir . '/illuminate/database/Eloquent/SoftDeletingScope.php',
'Illuminate\\Database\\Events\\ConnectionEvent' => $vendorDir . '/illuminate/database/Events/ConnectionEvent.php',
'Illuminate\\Database\\Events\\MigrationEnded' => $vendorDir . '/illuminate/database/Events/MigrationEnded.php',
'Illuminate\\Database\\Events\\MigrationEvent' => $vendorDir . '/illuminate/database/Events/MigrationEvent.php',
'Illuminate\\Database\\Events\\MigrationStarted' => $vendorDir . '/illuminate/database/Events/MigrationStarted.php',
'Illuminate\\Database\\Events\\MigrationsEnded' => $vendorDir . '/illuminate/database/Events/MigrationsEnded.php',
'Illuminate\\Database\\Events\\MigrationsStarted' => $vendorDir . '/illuminate/database/Events/MigrationsStarted.php',
'Illuminate\\Database\\Events\\QueryExecuted' => $vendorDir . '/illuminate/database/Events/QueryExecuted.php',
'Illuminate\\Database\\Events\\StatementPrepared' => $vendorDir . '/illuminate/database/Events/StatementPrepared.php',
'Illuminate\\Database\\Events\\TransactionBeginning' => $vendorDir . '/illuminate/database/Events/TransactionBeginning.php',
'Illuminate\\Database\\Events\\TransactionCommitted' => $vendorDir . '/illuminate/database/Events/TransactionCommitted.php',
'Illuminate\\Database\\Events\\TransactionRolledBack' => $vendorDir . '/illuminate/database/Events/TransactionRolledBack.php',
'Illuminate\\Database\\Grammar' => $vendorDir . '/illuminate/database/Grammar.php',
'Illuminate\\Database\\MigrationServiceProvider' => $vendorDir . '/illuminate/database/MigrationServiceProvider.php',
'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => $vendorDir . '/illuminate/database/Migrations/DatabaseMigrationRepository.php',
'Illuminate\\Database\\Migrations\\Migration' => $vendorDir . '/illuminate/database/Migrations/Migration.php',
'Illuminate\\Database\\Migrations\\MigrationCreator' => $vendorDir . '/illuminate/database/Migrations/MigrationCreator.php',
'Illuminate\\Database\\Migrations\\MigrationRepositoryInterface' => $vendorDir . '/illuminate/database/Migrations/MigrationRepositoryInterface.php',
'Illuminate\\Database\\Migrations\\Migrator' => $vendorDir . '/illuminate/database/Migrations/Migrator.php',
'Illuminate\\Database\\MySqlConnection' => $vendorDir . '/illuminate/database/MySqlConnection.php',
'Illuminate\\Database\\PostgresConnection' => $vendorDir . '/illuminate/database/PostgresConnection.php',
'Illuminate\\Database\\QueryException' => $vendorDir . '/illuminate/database/QueryException.php',
'Illuminate\\Database\\Query\\Builder' => $vendorDir . '/illuminate/database/Query/Builder.php',
'Illuminate\\Database\\Query\\Expression' => $vendorDir . '/illuminate/database/Query/Expression.php',
'Illuminate\\Database\\Query\\Grammars\\Grammar' => $vendorDir . '/illuminate/database/Query/Grammars/Grammar.php',
'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => $vendorDir . '/illuminate/database/Query/Grammars/MySqlGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\PostgresGrammar' => $vendorDir . '/illuminate/database/Query/Grammars/PostgresGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar' => $vendorDir . '/illuminate/database/Query/Grammars/SQLiteGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\SqlServerGrammar' => $vendorDir . '/illuminate/database/Query/Grammars/SqlServerGrammar.php',
'Illuminate\\Database\\Query\\JoinClause' => $vendorDir . '/illuminate/database/Query/JoinClause.php',
'Illuminate\\Database\\Query\\JsonExpression' => $vendorDir . '/illuminate/database/Query/JsonExpression.php',
'Illuminate\\Database\\Query\\Processors\\MySqlProcessor' => $vendorDir . '/illuminate/database/Query/Processors/MySqlProcessor.php',
'Illuminate\\Database\\Query\\Processors\\PostgresProcessor' => $vendorDir . '/illuminate/database/Query/Processors/PostgresProcessor.php',
'Illuminate\\Database\\Query\\Processors\\Processor' => $vendorDir . '/illuminate/database/Query/Processors/Processor.php',
'Illuminate\\Database\\Query\\Processors\\SQLiteProcessor' => $vendorDir . '/illuminate/database/Query/Processors/SQLiteProcessor.php',
'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => $vendorDir . '/illuminate/database/Query/Processors/SqlServerProcessor.php',
'Illuminate\\Database\\SQLiteConnection' => $vendorDir . '/illuminate/database/SQLiteConnection.php',
'Illuminate\\Database\\Schema\\Blueprint' => $vendorDir . '/illuminate/database/Schema/Blueprint.php',
'Illuminate\\Database\\Schema\\Builder' => $vendorDir . '/illuminate/database/Schema/Builder.php',
'Illuminate\\Database\\Schema\\ColumnDefinition' => $vendorDir . '/illuminate/database/Schema/ColumnDefinition.php',
'Illuminate\\Database\\Schema\\ForeignKeyDefinition' => $vendorDir . '/illuminate/database/Schema/ForeignKeyDefinition.php',
'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => $vendorDir . '/illuminate/database/Schema/Grammars/ChangeColumn.php',
'Illuminate\\Database\\Schema\\Grammars\\Grammar' => $vendorDir . '/illuminate/database/Schema/Grammars/Grammar.php',
'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => $vendorDir . '/illuminate/database/Schema/Grammars/MySqlGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar' => $vendorDir . '/illuminate/database/Schema/Grammars/PostgresGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\RenameColumn' => $vendorDir . '/illuminate/database/Schema/Grammars/RenameColumn.php',
'Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar' => $vendorDir . '/illuminate/database/Schema/Grammars/SQLiteGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar' => $vendorDir . '/illuminate/database/Schema/Grammars/SqlServerGrammar.php',
'Illuminate\\Database\\Schema\\MySqlBuilder' => $vendorDir . '/illuminate/database/Schema/MySqlBuilder.php',
'Illuminate\\Database\\Schema\\PostgresBuilder' => $vendorDir . '/illuminate/database/Schema/PostgresBuilder.php',
'Illuminate\\Database\\Schema\\SQLiteBuilder' => $vendorDir . '/illuminate/database/Schema/SQLiteBuilder.php',
'Illuminate\\Database\\Schema\\SqlServerBuilder' => $vendorDir . '/illuminate/database/Schema/SqlServerBuilder.php',
'Illuminate\\Database\\Seeder' => $vendorDir . '/illuminate/database/Seeder.php',
'Illuminate\\Database\\SqlServerConnection' => $vendorDir . '/illuminate/database/SqlServerConnection.php',
'Illuminate\\Events\\CallQueuedListener' => $vendorDir . '/illuminate/events/CallQueuedListener.php',
'Illuminate\\Events\\Dispatcher' => $vendorDir . '/illuminate/events/Dispatcher.php',
'Illuminate\\Events\\EventServiceProvider' => $vendorDir . '/illuminate/events/EventServiceProvider.php',
'Illuminate\\Support\\AggregateServiceProvider' => $vendorDir . '/illuminate/support/AggregateServiceProvider.php',
'Illuminate\\Support\\Arr' => $vendorDir . '/illuminate/support/Arr.php',
'Illuminate\\Support\\Carbon' => $vendorDir . '/illuminate/support/Carbon.php',
'Illuminate\\Support\\Collection' => $vendorDir . '/illuminate/support/Collection.php',
'Illuminate\\Support\\Composer' => $vendorDir . '/illuminate/support/Composer.php',
'Illuminate\\Support\\ConfigurationUrlParser' => $vendorDir . '/illuminate/support/ConfigurationUrlParser.php',
'Illuminate\\Support\\DateFactory' => $vendorDir . '/illuminate/support/DateFactory.php',
'Illuminate\\Support\\Facades\\App' => $vendorDir . '/illuminate/support/Facades/App.php',
'Illuminate\\Support\\Facades\\Artisan' => $vendorDir . '/illuminate/support/Facades/Artisan.php',
'Illuminate\\Support\\Facades\\Auth' => $vendorDir . '/illuminate/support/Facades/Auth.php',
'Illuminate\\Support\\Facades\\Blade' => $vendorDir . '/illuminate/support/Facades/Blade.php',
'Illuminate\\Support\\Facades\\Broadcast' => $vendorDir . '/illuminate/support/Facades/Broadcast.php',
'Illuminate\\Support\\Facades\\Bus' => $vendorDir . '/illuminate/support/Facades/Bus.php',
'Illuminate\\Support\\Facades\\Cache' => $vendorDir . '/illuminate/support/Facades/Cache.php',
'Illuminate\\Support\\Facades\\Config' => $vendorDir . '/illuminate/support/Facades/Config.php',
'Illuminate\\Support\\Facades\\Cookie' => $vendorDir . '/illuminate/support/Facades/Cookie.php',
'Illuminate\\Support\\Facades\\Crypt' => $vendorDir . '/illuminate/support/Facades/Crypt.php',
'Illuminate\\Support\\Facades\\DB' => $vendorDir . '/illuminate/support/Facades/DB.php',
'Illuminate\\Support\\Facades\\Date' => $vendorDir . '/illuminate/support/Facades/Date.php',
'Illuminate\\Support\\Facades\\Event' => $vendorDir . '/illuminate/support/Facades/Event.php',
'Illuminate\\Support\\Facades\\Facade' => $vendorDir . '/illuminate/support/Facades/Facade.php',
'Illuminate\\Support\\Facades\\File' => $vendorDir . '/illuminate/support/Facades/File.php',
'Illuminate\\Support\\Facades\\Gate' => $vendorDir . '/illuminate/support/Facades/Gate.php',
'Illuminate\\Support\\Facades\\Hash' => $vendorDir . '/illuminate/support/Facades/Hash.php',
'Illuminate\\Support\\Facades\\Input' => $vendorDir . '/illuminate/support/Facades/Input.php',
'Illuminate\\Support\\Facades\\Lang' => $vendorDir . '/illuminate/support/Facades/Lang.php',
'Illuminate\\Support\\Facades\\Log' => $vendorDir . '/illuminate/support/Facades/Log.php',
'Illuminate\\Support\\Facades\\Mail' => $vendorDir . '/illuminate/support/Facades/Mail.php',
'Illuminate\\Support\\Facades\\Notification' => $vendorDir . '/illuminate/support/Facades/Notification.php',
'Illuminate\\Support\\Facades\\Password' => $vendorDir . '/illuminate/support/Facades/Password.php',
'Illuminate\\Support\\Facades\\Queue' => $vendorDir . '/illuminate/support/Facades/Queue.php',
'Illuminate\\Support\\Facades\\Redirect' => $vendorDir . '/illuminate/support/Facades/Redirect.php',
'Illuminate\\Support\\Facades\\Redis' => $vendorDir . '/illuminate/support/Facades/Redis.php',
'Illuminate\\Support\\Facades\\Request' => $vendorDir . '/illuminate/support/Facades/Request.php',
'Illuminate\\Support\\Facades\\Response' => $vendorDir . '/illuminate/support/Facades/Response.php',
'Illuminate\\Support\\Facades\\Route' => $vendorDir . '/illuminate/support/Facades/Route.php',
'Illuminate\\Support\\Facades\\Schema' => $vendorDir . '/illuminate/support/Facades/Schema.php',
'Illuminate\\Support\\Facades\\Session' => $vendorDir . '/illuminate/support/Facades/Session.php',
'Illuminate\\Support\\Facades\\Storage' => $vendorDir . '/illuminate/support/Facades/Storage.php',
'Illuminate\\Support\\Facades\\URL' => $vendorDir . '/illuminate/support/Facades/URL.php',
'Illuminate\\Support\\Facades\\Validator' => $vendorDir . '/illuminate/support/Facades/Validator.php',
'Illuminate\\Support\\Facades\\View' => $vendorDir . '/illuminate/support/Facades/View.php',
'Illuminate\\Support\\Fluent' => $vendorDir . '/illuminate/support/Fluent.php',
'Illuminate\\Support\\HigherOrderCollectionProxy' => $vendorDir . '/illuminate/support/HigherOrderCollectionProxy.php',
'Illuminate\\Support\\HigherOrderTapProxy' => $vendorDir . '/illuminate/support/HigherOrderTapProxy.php',
'Illuminate\\Support\\HtmlString' => $vendorDir . '/illuminate/support/HtmlString.php',
'Illuminate\\Support\\InteractsWithTime' => $vendorDir . '/illuminate/support/InteractsWithTime.php',
'Illuminate\\Support\\Manager' => $vendorDir . '/illuminate/support/Manager.php',
'Illuminate\\Support\\MessageBag' => $vendorDir . '/illuminate/support/MessageBag.php',
'Illuminate\\Support\\NamespacedItemResolver' => $vendorDir . '/illuminate/support/NamespacedItemResolver.php',
'Illuminate\\Support\\Optional' => $vendorDir . '/illuminate/support/Optional.php',
'Illuminate\\Support\\Pluralizer' => $vendorDir . '/illuminate/support/Pluralizer.php',
'Illuminate\\Support\\ProcessUtils' => $vendorDir . '/illuminate/support/ProcessUtils.php',
'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/illuminate/support/ServiceProvider.php',
'Illuminate\\Support\\Str' => $vendorDir . '/illuminate/support/Str.php',
'Illuminate\\Support\\Testing\\Fakes\\BusFake' => $vendorDir . '/illuminate/support/Testing/Fakes/BusFake.php',
'Illuminate\\Support\\Testing\\Fakes\\EventFake' => $vendorDir . '/illuminate/support/Testing/Fakes/EventFake.php',
'Illuminate\\Support\\Testing\\Fakes\\MailFake' => $vendorDir . '/illuminate/support/Testing/Fakes/MailFake.php',
'Illuminate\\Support\\Testing\\Fakes\\NotificationFake' => $vendorDir . '/illuminate/support/Testing/Fakes/NotificationFake.php',
'Illuminate\\Support\\Testing\\Fakes\\PendingMailFake' => $vendorDir . '/illuminate/support/Testing/Fakes/PendingMailFake.php',
'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => $vendorDir . '/illuminate/support/Testing/Fakes/QueueFake.php',
'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => $vendorDir . '/illuminate/support/Traits/CapsuleManagerTrait.php',
'Illuminate\\Support\\Traits\\ForwardsCalls' => $vendorDir . '/illuminate/support/Traits/ForwardsCalls.php',
'Illuminate\\Support\\Traits\\Localizable' => $vendorDir . '/illuminate/support/Traits/Localizable.php',
'Illuminate\\Support\\Traits\\Macroable' => $vendorDir . '/illuminate/support/Traits/Macroable.php',
'Illuminate\\Support\\Traits\\Tappable' => $vendorDir . '/illuminate/support/Traits/Tappable.php',
'Illuminate\\Support\\ViewErrorBag' => $vendorDir . '/illuminate/support/ViewErrorBag.php',
'Intervention\\Image\\AbstractColor' => $vendorDir . '/intervention/image/src/Intervention/Image/AbstractColor.php',
'Intervention\\Image\\AbstractDecoder' => $vendorDir . '/intervention/image/src/Intervention/Image/AbstractDecoder.php',
'Intervention\\Image\\AbstractDriver' => $vendorDir . '/intervention/image/src/Intervention/Image/AbstractDriver.php',
@@ -603,7 +1120,7 @@ return array(
'Intervention\\Image\\ImageManagerStatic' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageManagerStatic.php',
'Intervention\\Image\\ImageServiceProvider' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProvider.php',
'Intervention\\Image\\ImageServiceProviderLaravel4' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php',
'Intervention\\Image\\ImageServiceProviderLaravel5' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php',
'Intervention\\Image\\ImageServiceProviderLaravelRecent' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravelRecent.php',
'Intervention\\Image\\ImageServiceProviderLeague' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php',
'Intervention\\Image\\ImageServiceProviderLumen' => $vendorDir . '/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php',
'Intervention\\Image\\Imagick\\Color' => $vendorDir . '/intervention/image/src/Intervention/Image/Imagick/Color.php',
@@ -955,6 +1472,9 @@ return array(
'Predis\\Transaction\\AbortedMultiExecException' => $vendorDir . '/predis/predis/src/Transaction/AbortedMultiExecException.php',
'Predis\\Transaction\\MultiExec' => $vendorDir . '/predis/predis/src/Transaction/MultiExec.php',
'Predis\\Transaction\\MultiExecState' => $vendorDir . '/predis/predis/src/Transaction/MultiExecState.php',
'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php',
'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php',
'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php',
@@ -962,6 +1482,9 @@ return array(
'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php',
'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php',
'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php',
'Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php',
'Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php',
'Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php',
'Stomp\\Broker\\ActiveMq\\ActiveMq' => $vendorDir . '/stomp-php/stomp-php/src/Broker/ActiveMq/ActiveMq.php',
'Stomp\\Broker\\ActiveMq\\Mode\\ActiveMqMode' => $vendorDir . '/stomp-php/stomp-php/src/Broker/ActiveMq/Mode/ActiveMqMode.php',
'Stomp\\Broker\\ActiveMq\\Mode\\DurableSubscription' => $vendorDir . '/stomp-php/stomp-php/src/Broker/ActiveMq/Mode/DurableSubscription.php',
@@ -1007,6 +1530,81 @@ return array(
'Stomp\\Transport\\Message' => $vendorDir . '/stomp-php/stomp-php/src/Transport/Message.php',
'Stomp\\Transport\\Parser' => $vendorDir . '/stomp-php/stomp-php/src/Transport/Parser.php',
'Stomp\\Util\\IdGenerator' => $vendorDir . '/stomp-php/stomp-php/src/Util/IdGenerator.php',
'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' => $vendorDir . '/symfony/translation/Catalogue/AbstractOperation.php',
'Symfony\\Component\\Translation\\Catalogue\\MergeOperation' => $vendorDir . '/symfony/translation/Catalogue/MergeOperation.php',
'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' => $vendorDir . '/symfony/translation/Catalogue/OperationInterface.php',
'Symfony\\Component\\Translation\\Catalogue\\TargetOperation' => $vendorDir . '/symfony/translation/Catalogue/TargetOperation.php',
'Symfony\\Component\\Translation\\Command\\XliffLintCommand' => $vendorDir . '/symfony/translation/Command/XliffLintCommand.php',
'Symfony\\Component\\Translation\\DataCollectorTranslator' => $vendorDir . '/symfony/translation/DataCollectorTranslator.php',
'Symfony\\Component\\Translation\\DataCollector\\TranslationDataCollector' => $vendorDir . '/symfony/translation/DataCollector/TranslationDataCollector.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslationDumperPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslationDumperPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslationExtractorPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslationExtractorPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslatorPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPathsPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslatorPathsPass.php',
'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => $vendorDir . '/symfony/translation/Dumper/CsvFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => $vendorDir . '/symfony/translation/Dumper/DumperInterface.php',
'Symfony\\Component\\Translation\\Dumper\\FileDumper' => $vendorDir . '/symfony/translation/Dumper/FileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper' => $vendorDir . '/symfony/translation/Dumper/IcuResFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\IniFileDumper' => $vendorDir . '/symfony/translation/Dumper/IniFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\JsonFileDumper' => $vendorDir . '/symfony/translation/Dumper/JsonFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\MoFileDumper' => $vendorDir . '/symfony/translation/Dumper/MoFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper' => $vendorDir . '/symfony/translation/Dumper/PhpFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\PoFileDumper' => $vendorDir . '/symfony/translation/Dumper/PoFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\QtFileDumper' => $vendorDir . '/symfony/translation/Dumper/QtFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper' => $vendorDir . '/symfony/translation/Dumper/XliffFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper' => $vendorDir . '/symfony/translation/Dumper/YamlFileDumper.php',
'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/translation/Exception/ExceptionInterface.php',
'Symfony\\Component\\Translation\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/translation/Exception/InvalidArgumentException.php',
'Symfony\\Component\\Translation\\Exception\\InvalidResourceException' => $vendorDir . '/symfony/translation/Exception/InvalidResourceException.php',
'Symfony\\Component\\Translation\\Exception\\LogicException' => $vendorDir . '/symfony/translation/Exception/LogicException.php',
'Symfony\\Component\\Translation\\Exception\\NotFoundResourceException' => $vendorDir . '/symfony/translation/Exception/NotFoundResourceException.php',
'Symfony\\Component\\Translation\\Exception\\RuntimeException' => $vendorDir . '/symfony/translation/Exception/RuntimeException.php',
'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' => $vendorDir . '/symfony/translation/Extractor/AbstractFileExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\ChainExtractor' => $vendorDir . '/symfony/translation/Extractor/ChainExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' => $vendorDir . '/symfony/translation/Extractor/ExtractorInterface.php',
'Symfony\\Component\\Translation\\Extractor\\PhpExtractor' => $vendorDir . '/symfony/translation/Extractor/PhpExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\PhpStringTokenParser' => $vendorDir . '/symfony/translation/Extractor/PhpStringTokenParser.php',
'Symfony\\Component\\Translation\\Formatter\\ChoiceMessageFormatterInterface' => $vendorDir . '/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php',
'Symfony\\Component\\Translation\\Formatter\\IntlFormatter' => $vendorDir . '/symfony/translation/Formatter/IntlFormatter.php',
'Symfony\\Component\\Translation\\Formatter\\IntlFormatterInterface' => $vendorDir . '/symfony/translation/Formatter/IntlFormatterInterface.php',
'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => $vendorDir . '/symfony/translation/Formatter/MessageFormatter.php',
'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' => $vendorDir . '/symfony/translation/Formatter/MessageFormatterInterface.php',
'Symfony\\Component\\Translation\\IdentityTranslator' => $vendorDir . '/symfony/translation/IdentityTranslator.php',
'Symfony\\Component\\Translation\\Interval' => $vendorDir . '/symfony/translation/Interval.php',
'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => $vendorDir . '/symfony/translation/Loader/ArrayLoader.php',
'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => $vendorDir . '/symfony/translation/Loader/CsvFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\FileLoader' => $vendorDir . '/symfony/translation/Loader/FileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => $vendorDir . '/symfony/translation/Loader/IcuDatFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader' => $vendorDir . '/symfony/translation/Loader/IcuResFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IniFileLoader' => $vendorDir . '/symfony/translation/Loader/IniFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\JsonFileLoader' => $vendorDir . '/symfony/translation/Loader/JsonFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\LoaderInterface' => $vendorDir . '/symfony/translation/Loader/LoaderInterface.php',
'Symfony\\Component\\Translation\\Loader\\MoFileLoader' => $vendorDir . '/symfony/translation/Loader/MoFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/translation/Loader/PhpFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\PoFileLoader' => $vendorDir . '/symfony/translation/Loader/PoFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\QtFileLoader' => $vendorDir . '/symfony/translation/Loader/QtFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\XliffFileLoader' => $vendorDir . '/symfony/translation/Loader/XliffFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/translation/Loader/YamlFileLoader.php',
'Symfony\\Component\\Translation\\LoggingTranslator' => $vendorDir . '/symfony/translation/LoggingTranslator.php',
'Symfony\\Component\\Translation\\MessageCatalogue' => $vendorDir . '/symfony/translation/MessageCatalogue.php',
'Symfony\\Component\\Translation\\MessageCatalogueInterface' => $vendorDir . '/symfony/translation/MessageCatalogueInterface.php',
'Symfony\\Component\\Translation\\MessageSelector' => $vendorDir . '/symfony/translation/MessageSelector.php',
'Symfony\\Component\\Translation\\MetadataAwareInterface' => $vendorDir . '/symfony/translation/MetadataAwareInterface.php',
'Symfony\\Component\\Translation\\PluralizationRules' => $vendorDir . '/symfony/translation/PluralizationRules.php',
'Symfony\\Component\\Translation\\Reader\\TranslationReader' => $vendorDir . '/symfony/translation/Reader/TranslationReader.php',
'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => $vendorDir . '/symfony/translation/Reader/TranslationReaderInterface.php',
'Symfony\\Component\\Translation\\Translator' => $vendorDir . '/symfony/translation/Translator.php',
'Symfony\\Component\\Translation\\TranslatorBagInterface' => $vendorDir . '/symfony/translation/TranslatorBagInterface.php',
'Symfony\\Component\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation/TranslatorInterface.php',
'Symfony\\Component\\Translation\\Util\\ArrayConverter' => $vendorDir . '/symfony/translation/Util/ArrayConverter.php',
'Symfony\\Component\\Translation\\Util\\XliffUtils' => $vendorDir . '/symfony/translation/Util/XliffUtils.php',
'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Writer/TranslationWriter.php',
'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' => $vendorDir . '/symfony/translation/Writer/TranslationWriterInterface.php',
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php',
'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/translation-contracts/Test/TranslatorTest.php',
'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php',
'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
'XMPPHP\\BOSH' => $vendorDir . '/diogocomposer/xmpphp/XMPPHP/BOSH.php',
'XMPPHP\\Exception' => $vendorDir . '/diogocomposer/xmpphp/XMPPHP/Exception.php',
'XMPPHP\\Log' => $vendorDir . '/diogocomposer/xmpphp/XMPPHP/Log.php',
+3
Ver Arquivo
@@ -7,6 +7,9 @@ $baseDir = dirname($vendorDir);
return array(
'e88992873b7765f9b5710cab95ba5dd7' => $vendorDir . '/hoa/consistency/Prelude.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'3e76f7f02b41af8cea96018933f6b7e3' => $vendorDir . '/hoa/protocol/Wrapper.php',
'72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php',
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
+18
Ver Arquivo
@@ -8,17 +8,35 @@ $baseDir = dirname($vendorDir);
return array(
'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
'XMPPHP\\' => array($vendorDir . '/diogocomposer/xmpphp/XMPPHP'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
'Stomp\\' => array($vendorDir . '/stomp-php/stomp-php/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Predis\\' => array($vendorDir . '/predis/predis/src'),
'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'),
'Michelf\\' => array($vendorDir . '/michelf/php-markdown/Michelf'),
'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'),
'Intervention\\Image\\' => array($vendorDir . '/intervention/image/src/Intervention/Image'),
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'),
'Illuminate\\Events\\' => array($vendorDir . '/illuminate/events'),
'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'),
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'),
'Hoa\\Ustring\\' => array($vendorDir . '/hoa/ustring'),
'Hoa\\Stream\\' => array($vendorDir . '/hoa/stream'),
'Hoa\\Protocol\\' => array($vendorDir . '/hoa/protocol'),
'Hoa\\Iterator\\' => array($vendorDir . '/hoa/iterator'),
'Hoa\\File\\' => array($vendorDir . '/hoa/file'),
'Hoa\\Exception\\' => array($vendorDir . '/hoa/exception'),
'Hoa\\Event\\' => array($vendorDir . '/hoa/event'),
'Hoa\\Console\\' => array($vendorDir . '/hoa/console'),
'Hoa\\Consistency\\' => array($vendorDir . '/hoa/consistency'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'Embed\\' => array($vendorDir . '/embed/embed/src'),
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
);
+695 -1
Ver Arquivo
@@ -8,6 +8,9 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
{
public static $files = array (
'e88992873b7765f9b5710cab95ba5dd7' => __DIR__ . '/..' . '/hoa/consistency/Prelude.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'3e76f7f02b41af8cea96018933f6b7e3' => __DIR__ . '/..' . '/hoa/protocol/Wrapper.php',
'72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php',
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
@@ -27,11 +30,16 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
),
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Contracts\\Translation\\' => 30,
'Symfony\\Component\\Translation\\' => 30,
'Stomp\\' => 6,
),
'P' =>
array (
'Psr\\SimpleCache\\' => 16,
'Psr\\Http\\Message\\' => 17,
'Psr\\Container\\' => 14,
'Predis\\' => 7,
'ParagonIE\\ConstantTime\\' => 23,
),
@@ -43,11 +51,22 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'I' =>
array (
'Intervention\\Image\\' => 19,
'Illuminate\\Support\\' => 19,
'Illuminate\\Events\\' => 18,
'Illuminate\\Database\\' => 20,
'Illuminate\\Contracts\\' => 21,
'Illuminate\\Container\\' => 21,
),
'H' =>
array (
'Hoa\\Ustring\\' => 12,
'Hoa\\Stream\\' => 11,
'Hoa\\Protocol\\' => 13,
'Hoa\\Iterator\\' => 13,
'Hoa\\File\\' => 9,
'Hoa\\Exception\\' => 14,
'Hoa\\Event\\' => 10,
'Hoa\\Console\\' => 12,
'Hoa\\Consistency\\' => 16,
),
'G' =>
@@ -58,9 +77,14 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
array (
'Embed\\' => 6,
),
'D' =>
array (
'Doctrine\\Common\\Inflector\\' => 26,
),
'C' =>
array (
'Composer\\CaBundle\\' => 18,
'Carbon\\' => 7,
),
);
@@ -73,14 +97,34 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
array (
0 => __DIR__ . '/..' . '/diogocomposer/xmpphp/XMPPHP',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Contracts\\Translation\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/translation-contracts',
),
'Symfony\\Component\\Translation\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/translation',
),
'Stomp\\' =>
array (
0 => __DIR__ . '/..' . '/stomp-php/stomp-php/src',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
),
'Psr\\Http\\Message\\' =>
array (
0 => __DIR__ . '/..' . '/psr/http-message/src',
),
'Psr\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
'Predis\\' =>
array (
0 => __DIR__ . '/..' . '/predis/predis/src',
@@ -101,6 +145,46 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
array (
0 => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image',
),
'Illuminate\\Support\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/support',
),
'Illuminate\\Events\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/events',
),
'Illuminate\\Database\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/database',
),
'Illuminate\\Contracts\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/contracts',
),
'Illuminate\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/container',
),
'Hoa\\Ustring\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/ustring',
),
'Hoa\\Stream\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/stream',
),
'Hoa\\Protocol\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/protocol',
),
'Hoa\\Iterator\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/iterator',
),
'Hoa\\File\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/file',
),
'Hoa\\Exception\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/exception',
@@ -109,6 +193,10 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
array (
0 => __DIR__ . '/..' . '/hoa/event',
),
'Hoa\\Console\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/console',
),
'Hoa\\Consistency\\' =>
array (
0 => __DIR__ . '/..' . '/hoa/consistency',
@@ -121,10 +209,18 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
array (
0 => __DIR__ . '/..' . '/embed/embed/src',
),
'Doctrine\\Common\\Inflector\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector',
),
'Composer\\CaBundle\\' =>
array (
0 => __DIR__ . '/..' . '/composer/ca-bundle/src',
),
'Carbon\\' =>
array (
0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon',
),
);
public static $prefixesPsr0 = array (
@@ -284,8 +380,43 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'CAS_Request_MultiRequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php',
'CAS_Request_RequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/RequestInterface.php',
'CAS_TypeMismatchException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/TypeMismatchException.php',
'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonImmutable.php',
'Carbon\\CarbonInterface' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterface.php',
'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\CarbonPeriod' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonPeriod.php',
'Carbon\\CarbonTimeZone' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonTimeZone.php',
'Carbon\\Cli\\Invoker' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Cli/Invoker.php',
'Carbon\\Exceptions\\BadUnitException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadUnitException.php',
'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
'Carbon\\Exceptions\\NotAPeriodException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php',
'Carbon\\Factory' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Factory.php',
'Carbon\\FactoryImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/FactoryImmutable.php',
'Carbon\\Language' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Language.php',
'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php',
'Carbon\\Traits\\Boundaries' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Boundaries.php',
'Carbon\\Traits\\Cast' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Cast.php',
'Carbon\\Traits\\Comparison' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Comparison.php',
'Carbon\\Traits\\Converter' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Converter.php',
'Carbon\\Traits\\Creator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Creator.php',
'Carbon\\Traits\\Date' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Date.php',
'Carbon\\Traits\\Difference' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Difference.php',
'Carbon\\Traits\\Localization' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Localization.php',
'Carbon\\Traits\\Macro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Macro.php',
'Carbon\\Traits\\Mixin' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Mixin.php',
'Carbon\\Traits\\Modifiers' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Modifiers.php',
'Carbon\\Traits\\Mutability' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Mutability.php',
'Carbon\\Traits\\Options' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Options.php',
'Carbon\\Traits\\Rounding' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Rounding.php',
'Carbon\\Traits\\Serialization' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Serialization.php',
'Carbon\\Traits\\Test' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Test.php',
'Carbon\\Traits\\Timestamp' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Timestamp.php',
'Carbon\\Traits\\Units' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Units.php',
'Carbon\\Traits\\Week' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Week.php',
'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php',
'Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php',
'Console_Getopt' => __DIR__ . '/..' . '/pear/console_getopt/Console/Getopt.php',
'Doctrine\\Common\\Inflector\\Inflector' => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php',
'Embed\\Adapters\\Adapter' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Adapter.php',
'Embed\\Adapters\\Archive' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Archive.php',
'Embed\\Adapters\\Cadenaser' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Cadenaser.php',
@@ -310,6 +441,7 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Embed\\Adapters\\Sassmeister' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Sassmeister.php',
'Embed\\Adapters\\Slides' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Slides.php',
'Embed\\Adapters\\Snipplr' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Snipplr.php',
'Embed\\Adapters\\Vimeo' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Vimeo.php',
'Embed\\Adapters\\Webpage' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Webpage.php',
'Embed\\Adapters\\Wikipedia' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Wikipedia.php',
'Embed\\Adapters\\Youtube' => __DIR__ . '/..' . '/embed/embed/src/Adapters/Youtube.php',
@@ -368,6 +500,7 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Embed\\Providers\\OEmbed\\Twitch' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/Twitch.php',
'Embed\\Providers\\OEmbed\\Twitter' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/Twitter.php',
'Embed\\Providers\\OEmbed\\Ustream' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/Ustream.php',
'Embed\\Providers\\OEmbed\\Vimeo' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/Vimeo.php',
'Embed\\Providers\\OEmbed\\WordPress' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/WordPress.php',
'Embed\\Providers\\OEmbed\\Youtube' => __DIR__ . '/..' . '/embed/embed/src/Providers/OEmbed/Youtube.php',
'Embed\\Providers\\OpenGraph' => __DIR__ . '/..' . '/embed/embed/src/Providers/OpenGraph.php',
@@ -640,6 +773,42 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Hoa\\Consistency\\Test\\Unit\\Exception' => __DIR__ . '/..' . '/hoa/consistency/Test/Unit/Exception.php',
'Hoa\\Consistency\\Test\\Unit\\Xcallable' => __DIR__ . '/..' . '/hoa/consistency/Test/Unit/Xcallable.php',
'Hoa\\Consistency\\Xcallable' => __DIR__ . '/..' . '/hoa/consistency/Xcallable.php',
'Hoa\\Console\\Bin\\Termcap' => __DIR__ . '/..' . '/hoa/console/Bin/Termcap.php',
'Hoa\\Console\\Chrome\\Editor' => __DIR__ . '/..' . '/hoa/console/Chrome/Editor.php',
'Hoa\\Console\\Chrome\\Exception' => __DIR__ . '/..' . '/hoa/console/Chrome/Exception.php',
'Hoa\\Console\\Chrome\\Pager' => __DIR__ . '/..' . '/hoa/console/Chrome/Pager.php',
'Hoa\\Console\\Chrome\\Text' => __DIR__ . '/..' . '/hoa/console/Chrome/Text.php',
'Hoa\\Console\\Console' => __DIR__ . '/..' . '/hoa/console/Console.php',
'Hoa\\Console\\Cursor' => __DIR__ . '/..' . '/hoa/console/Cursor.php',
'Hoa\\Console\\Dispatcher\\Kit' => __DIR__ . '/..' . '/hoa/console/Dispatcher/Kit.php',
'Hoa\\Console\\Exception' => __DIR__ . '/..' . '/hoa/console/Exception.php',
'Hoa\\Console\\GetOption' => __DIR__ . '/..' . '/hoa/console/GetOption.php',
'Hoa\\Console\\Input' => __DIR__ . '/..' . '/hoa/console/Input.php',
'Hoa\\Console\\Mouse' => __DIR__ . '/..' . '/hoa/console/Mouse.php',
'Hoa\\Console\\Output' => __DIR__ . '/..' . '/hoa/console/Output.php',
'Hoa\\Console\\Parser' => __DIR__ . '/..' . '/hoa/console/Parser.php',
'Hoa\\Console\\Processus' => __DIR__ . '/..' . '/hoa/console/Processus.php',
'Hoa\\Console\\Readline\\Autocompleter\\Aggregate' => __DIR__ . '/..' . '/hoa/console/Readline/Autocompleter/Aggregate.php',
'Hoa\\Console\\Readline\\Autocompleter\\Autocompleter' => __DIR__ . '/..' . '/hoa/console/Readline/Autocompleter/Autocompleter.php',
'Hoa\\Console\\Readline\\Autocompleter\\Path' => __DIR__ . '/..' . '/hoa/console/Readline/Autocompleter/Path.php',
'Hoa\\Console\\Readline\\Autocompleter\\Word' => __DIR__ . '/..' . '/hoa/console/Readline/Autocompleter/Word.php',
'Hoa\\Console\\Readline\\Password' => __DIR__ . '/..' . '/hoa/console/Readline/Password.php',
'Hoa\\Console\\Readline\\Readline' => __DIR__ . '/..' . '/hoa/console/Readline/Readline.php',
'Hoa\\Console\\Test\\Unit\\Console' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Console.php',
'Hoa\\Console\\Test\\Unit\\Cursor' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Cursor.php',
'Hoa\\Console\\Test\\Unit\\GetOption' => __DIR__ . '/..' . '/hoa/console/Test/Unit/GetOption.php',
'Hoa\\Console\\Test\\Unit\\Input' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Input.php',
'Hoa\\Console\\Test\\Unit\\Mouse' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Mouse.php',
'Hoa\\Console\\Test\\Unit\\Output' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Output.php',
'Hoa\\Console\\Test\\Unit\\Parser' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Parser.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Aggregate' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Readline/Autocompleter/Aggregate.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Path' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Readline/Autocompleter/Path.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Autocompleter\\Word' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Readline/Autocompleter/Word.php',
'Hoa\\Console\\Test\\Unit\\Readline\\Password' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Readline/Password.php',
'Hoa\\Console\\Test\\Unit\\Tput' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Tput.php',
'Hoa\\Console\\Test\\Unit\\Window' => __DIR__ . '/..' . '/hoa/console/Test/Unit/Window.php',
'Hoa\\Console\\Tput' => __DIR__ . '/..' . '/hoa/console/Tput.php',
'Hoa\\Console\\Window' => __DIR__ . '/..' . '/hoa/console/Window.php',
'Hoa\\Event\\Bucket' => __DIR__ . '/..' . '/hoa/event/Bucket.php',
'Hoa\\Event\\Event' => __DIR__ . '/..' . '/hoa/event/Event.php',
'Hoa\\Event\\Exception' => __DIR__ . '/..' . '/hoa/event/Exception.php',
@@ -663,6 +832,450 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Hoa\\Exception\\Test\\Unit\\Exception' => __DIR__ . '/..' . '/hoa/exception/Test/Unit/Exception.php',
'Hoa\\Exception\\Test\\Unit\\Group' => __DIR__ . '/..' . '/hoa/exception/Test/Unit/Group.php',
'Hoa\\Exception\\Test\\Unit\\Idle' => __DIR__ . '/..' . '/hoa/exception/Test/Unit/Idle.php',
'Hoa\\File\\Directory' => __DIR__ . '/..' . '/hoa/file/Directory.php',
'Hoa\\File\\Exception\\Exception' => __DIR__ . '/..' . '/hoa/file/Exception/Exception.php',
'Hoa\\File\\Exception\\FileDoesNotExist' => __DIR__ . '/..' . '/hoa/file/Exception/FileDoesNotExist.php',
'Hoa\\File\\File' => __DIR__ . '/..' . '/hoa/file/File.php',
'Hoa\\File\\Finder' => __DIR__ . '/..' . '/hoa/file/Finder.php',
'Hoa\\File\\Generic' => __DIR__ . '/..' . '/hoa/file/Generic.php',
'Hoa\\File\\Link\\Link' => __DIR__ . '/..' . '/hoa/file/Link/Link.php',
'Hoa\\File\\Link\\Read' => __DIR__ . '/..' . '/hoa/file/Link/Read.php',
'Hoa\\File\\Link\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/Link/ReadWrite.php',
'Hoa\\File\\Link\\Write' => __DIR__ . '/..' . '/hoa/file/Link/Write.php',
'Hoa\\File\\Read' => __DIR__ . '/..' . '/hoa/file/Read.php',
'Hoa\\File\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/ReadWrite.php',
'Hoa\\File\\SplFileInfo' => __DIR__ . '/..' . '/hoa/file/SplFileInfo.php',
'Hoa\\File\\Temporary\\Read' => __DIR__ . '/..' . '/hoa/file/Temporary/Read.php',
'Hoa\\File\\Temporary\\ReadWrite' => __DIR__ . '/..' . '/hoa/file/Temporary/ReadWrite.php',
'Hoa\\File\\Temporary\\Temporary' => __DIR__ . '/..' . '/hoa/file/Temporary/Temporary.php',
'Hoa\\File\\Temporary\\Write' => __DIR__ . '/..' . '/hoa/file/Temporary/Write.php',
'Hoa\\File\\Watcher' => __DIR__ . '/..' . '/hoa/file/Watcher.php',
'Hoa\\File\\Write' => __DIR__ . '/..' . '/hoa/file/Write.php',
'Hoa\\Iterator\\Aggregate' => __DIR__ . '/..' . '/hoa/iterator/Aggregate.php',
'Hoa\\Iterator\\Append' => __DIR__ . '/..' . '/hoa/iterator/Append.php',
'Hoa\\Iterator\\Buffer' => __DIR__ . '/..' . '/hoa/iterator/Buffer.php',
'Hoa\\Iterator\\CallbackFilter' => __DIR__ . '/..' . '/hoa/iterator/CallbackFilter.php',
'Hoa\\Iterator\\CallbackGenerator' => __DIR__ . '/..' . '/hoa/iterator/CallbackGenerator.php',
'Hoa\\Iterator\\Counter' => __DIR__ . '/..' . '/hoa/iterator/Counter.php',
'Hoa\\Iterator\\Demultiplexer' => __DIR__ . '/..' . '/hoa/iterator/Demultiplexer.php',
'Hoa\\Iterator\\Directory' => __DIR__ . '/..' . '/hoa/iterator/Directory.php',
'Hoa\\Iterator\\Exception' => __DIR__ . '/..' . '/hoa/iterator/Exception.php',
'Hoa\\Iterator\\FileSystem' => __DIR__ . '/..' . '/hoa/iterator/FileSystem.php',
'Hoa\\Iterator\\Filter' => __DIR__ . '/..' . '/hoa/iterator/Filter.php',
'Hoa\\Iterator\\Glob' => __DIR__ . '/..' . '/hoa/iterator/Glob.php',
'Hoa\\Iterator\\Infinite' => __DIR__ . '/..' . '/hoa/iterator/Infinite.php',
'Hoa\\Iterator\\Iterator' => __DIR__ . '/..' . '/hoa/iterator/Iterator.php',
'Hoa\\Iterator\\IteratorIterator' => __DIR__ . '/..' . '/hoa/iterator/IteratorIterator.php',
'Hoa\\Iterator\\Limit' => __DIR__ . '/..' . '/hoa/iterator/Limit.php',
'Hoa\\Iterator\\Lookahead' => __DIR__ . '/..' . '/hoa/iterator/Lookahead.php',
'Hoa\\Iterator\\Lookbehind' => __DIR__ . '/..' . '/hoa/iterator/Lookbehind.php',
'Hoa\\Iterator\\Map' => __DIR__ . '/..' . '/hoa/iterator/Map.php',
'Hoa\\Iterator\\Mock' => __DIR__ . '/..' . '/hoa/iterator/Mock.php',
'Hoa\\Iterator\\Multiple' => __DIR__ . '/..' . '/hoa/iterator/Multiple.php',
'Hoa\\Iterator\\NoRewind' => __DIR__ . '/..' . '/hoa/iterator/NoRewind.php',
'Hoa\\Iterator\\Outer' => __DIR__ . '/..' . '/hoa/iterator/Outer.php',
'Hoa\\Iterator\\Recursive\\CallbackFilter' => __DIR__ . '/..' . '/hoa/iterator/Recursive/CallbackFilter.php',
'Hoa\\Iterator\\Recursive\\Directory' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Directory.php',
'Hoa\\Iterator\\Recursive\\Filter' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Filter.php',
'Hoa\\Iterator\\Recursive\\Iterator' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Iterator.php',
'Hoa\\Iterator\\Recursive\\Map' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Map.php',
'Hoa\\Iterator\\Recursive\\Mock' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Mock.php',
'Hoa\\Iterator\\Recursive\\Recursive' => __DIR__ . '/..' . '/hoa/iterator/Recursive/Recursive.php',
'Hoa\\Iterator\\Recursive\\RegularExpression' => __DIR__ . '/..' . '/hoa/iterator/Recursive/RegularExpression.php',
'Hoa\\Iterator\\RegularExpression' => __DIR__ . '/..' . '/hoa/iterator/RegularExpression.php',
'Hoa\\Iterator\\Repeater' => __DIR__ . '/..' . '/hoa/iterator/Repeater.php',
'Hoa\\Iterator\\Seekable' => __DIR__ . '/..' . '/hoa/iterator/Seekable.php',
'Hoa\\Iterator\\SplFileInfo' => __DIR__ . '/..' . '/hoa/iterator/SplFileInfo.php',
'Hoa\\Iterator\\Test\\Unit\\Append' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Append.php',
'Hoa\\Iterator\\Test\\Unit\\Buffer' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Buffer.php',
'Hoa\\Iterator\\Test\\Unit\\CallbackFilter' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/CallbackFilter.php',
'Hoa\\Iterator\\Test\\Unit\\CallbackGenerator' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/CallbackGenerator.php',
'Hoa\\Iterator\\Test\\Unit\\Counter' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Counter.php',
'Hoa\\Iterator\\Test\\Unit\\Demultiplexer' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Demultiplexer.php',
'Hoa\\Iterator\\Test\\Unit\\Directory' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Directory.php',
'Hoa\\Iterator\\Test\\Unit\\FileSystem' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/FileSystem.php',
'Hoa\\Iterator\\Test\\Unit\\Filter' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Filter.php',
'Hoa\\Iterator\\Test\\Unit\\Infinite' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Infinite.php',
'Hoa\\Iterator\\Test\\Unit\\IteratorIterator' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/IteratorIterator.php',
'Hoa\\Iterator\\Test\\Unit\\Limit' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Limit.php',
'Hoa\\Iterator\\Test\\Unit\\Lookahead' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Lookahead.php',
'Hoa\\Iterator\\Test\\Unit\\Lookbehind' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Lookbehind.php',
'Hoa\\Iterator\\Test\\Unit\\Map' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Map.php',
'Hoa\\Iterator\\Test\\Unit\\Mock' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Mock.php',
'Hoa\\Iterator\\Test\\Unit\\Multiple' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Multiple.php',
'Hoa\\Iterator\\Test\\Unit\\MyFilter' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Filter.php',
'Hoa\\Iterator\\Test\\Unit\\NoRewind' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/NoRewind.php',
'Hoa\\Iterator\\Test\\Unit\\RegularExpression' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/RegularExpression.php',
'Hoa\\Iterator\\Test\\Unit\\Repeater' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/Repeater.php',
'Hoa\\Iterator\\Test\\Unit\\SplFileInfo' => __DIR__ . '/..' . '/hoa/iterator/Test/Unit/SplFileInfo.php',
'Hoa\\Protocol\\Bin\\Resolve' => __DIR__ . '/..' . '/hoa/protocol/Bin/Resolve.php',
'Hoa\\Protocol\\Exception' => __DIR__ . '/..' . '/hoa/protocol/Exception.php',
'Hoa\\Protocol\\Node\\Library' => __DIR__ . '/..' . '/hoa/protocol/Node/Library.php',
'Hoa\\Protocol\\Node\\Node' => __DIR__ . '/..' . '/hoa/protocol/Node/Node.php',
'Hoa\\Protocol\\Protocol' => __DIR__ . '/..' . '/hoa/protocol/Protocol.php',
'Hoa\\Protocol\\Test\\Unit\\Exception' => __DIR__ . '/..' . '/hoa/protocol/Test/Unit/Exception.php',
'Hoa\\Protocol\\Test\\Unit\\Node\\Library' => __DIR__ . '/..' . '/hoa/protocol/Test/Unit/Node/Library.php',
'Hoa\\Protocol\\Test\\Unit\\Node\\Node' => __DIR__ . '/..' . '/hoa/protocol/Test/Unit/Node/Node.php',
'Hoa\\Protocol\\Test\\Unit\\Protocol' => __DIR__ . '/..' . '/hoa/protocol/Test/Unit/Protocol.php',
'Hoa\\Protocol\\Test\\Unit\\Wrapper' => __DIR__ . '/..' . '/hoa/protocol/Test/Unit/Wrapper.php',
'Hoa\\Protocol\\Wrapper' => __DIR__ . '/..' . '/hoa/protocol/Wrapper.php',
'Hoa\\Stream\\Bucket' => __DIR__ . '/..' . '/hoa/stream/Bucket.php',
'Hoa\\Stream\\Composite' => __DIR__ . '/..' . '/hoa/stream/Composite.php',
'Hoa\\Stream\\Context' => __DIR__ . '/..' . '/hoa/stream/Context.php',
'Hoa\\Stream\\Exception' => __DIR__ . '/..' . '/hoa/stream/Exception.php',
'Hoa\\Stream\\Filter\\Basic' => __DIR__ . '/..' . '/hoa/stream/Filter/Basic.php',
'Hoa\\Stream\\Filter\\Exception' => __DIR__ . '/..' . '/hoa/stream/Filter/Exception.php',
'Hoa\\Stream\\Filter\\Filter' => __DIR__ . '/..' . '/hoa/stream/Filter/Filter.php',
'Hoa\\Stream\\Filter\\LateComputed' => __DIR__ . '/..' . '/hoa/stream/Filter/LateComputed.php',
'Hoa\\Stream\\IStream\\Bufferable' => __DIR__ . '/..' . '/hoa/stream/IStream/Bufferable.php',
'Hoa\\Stream\\IStream\\In' => __DIR__ . '/..' . '/hoa/stream/IStream/In.php',
'Hoa\\Stream\\IStream\\Lockable' => __DIR__ . '/..' . '/hoa/stream/IStream/Lockable.php',
'Hoa\\Stream\\IStream\\Out' => __DIR__ . '/..' . '/hoa/stream/IStream/Out.php',
'Hoa\\Stream\\IStream\\Pathable' => __DIR__ . '/..' . '/hoa/stream/IStream/Pathable.php',
'Hoa\\Stream\\IStream\\Pointable' => __DIR__ . '/..' . '/hoa/stream/IStream/Pointable.php',
'Hoa\\Stream\\IStream\\Statable' => __DIR__ . '/..' . '/hoa/stream/IStream/Statable.php',
'Hoa\\Stream\\IStream\\Stream' => __DIR__ . '/..' . '/hoa/stream/IStream/Stream.php',
'Hoa\\Stream\\IStream\\Structural' => __DIR__ . '/..' . '/hoa/stream/IStream/Structural.php',
'Hoa\\Stream\\IStream\\Touchable' => __DIR__ . '/..' . '/hoa/stream/IStream/Touchable.php',
'Hoa\\Stream\\Stream' => __DIR__ . '/..' . '/hoa/stream/Stream.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\CustomFilter' => __DIR__ . '/..' . '/hoa/stream/Test/Integration/Filter/LateComputed.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\Filter' => __DIR__ . '/..' . '/hoa/stream/Test/Integration/Filter/Filter.php',
'Hoa\\Stream\\Test\\Integration\\Filter\\LateComputed' => __DIR__ . '/..' . '/hoa/stream/Test/Integration/Filter/LateComputed.php',
'Hoa\\Stream\\Test\\Integration\\SUT' => __DIR__ . '/..' . '/hoa/stream/Test/Integration/Stream.php',
'Hoa\\Stream\\Test\\Integration\\Stream' => __DIR__ . '/..' . '/hoa/stream/Test/Integration/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Bucket' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Bucket.php',
'Hoa\\Stream\\Test\\Unit\\Composite' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Composite.php',
'Hoa\\Stream\\Test\\Unit\\Context' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Context.php',
'Hoa\\Stream\\Test\\Unit\\Exception' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Basic' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Filter/Basic.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Exception' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Filter/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Filter\\Filter' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Filter/Filter.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Bufferable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Bufferable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\In' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/In.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Lockable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Lockable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Out' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Out.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Pathable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Pathable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Pointable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Pointable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Statable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Statable.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Stream' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Stream.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Structural' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Structural.php',
'Hoa\\Stream\\Test\\Unit\\IStream\\Touchable' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/IStream/Touchable.php',
'Hoa\\Stream\\Test\\Unit\\SUT' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\SUTWithPublicClose' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Stream' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\Exception' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Wrapper/Exception.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\File' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Wrapper/IWrapper/File.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\IWrapper' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Wrapper/IWrapper/IWrapper.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\IWrapper\\Stream' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Wrapper/IWrapper/Stream.php',
'Hoa\\Stream\\Test\\Unit\\Wrapper\\Wrapper' => __DIR__ . '/..' . '/hoa/stream/Test/Unit/Wrapper/Wrapper.php',
'Hoa\\Stream\\Wrapper\\Exception' => __DIR__ . '/..' . '/hoa/stream/Wrapper/Exception.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\File' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/File.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\IWrapper' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/IWrapper.php',
'Hoa\\Stream\\Wrapper\\IWrapper\\Stream' => __DIR__ . '/..' . '/hoa/stream/Wrapper/IWrapper/Stream.php',
'Hoa\\Stream\\Wrapper\\Wrapper' => __DIR__ . '/..' . '/hoa/stream/Wrapper/Wrapper.php',
'Hoa\\Stream\\_Protocol' => __DIR__ . '/..' . '/hoa/stream/Stream.php',
'Hoa\\Ustring\\Bin\\Fromcode' => __DIR__ . '/..' . '/hoa/ustring/Bin/Fromcode.php',
'Hoa\\Ustring\\Bin\\Tocode' => __DIR__ . '/..' . '/hoa/ustring/Bin/Tocode.php',
'Hoa\\Ustring\\Exception' => __DIR__ . '/..' . '/hoa/ustring/Exception.php',
'Hoa\\Ustring\\Search' => __DIR__ . '/..' . '/hoa/ustring/Search.php',
'Hoa\\Ustring\\Test\\Unit\\Issue' => __DIR__ . '/..' . '/hoa/ustring/Test/Unit/Issue.php',
'Hoa\\Ustring\\Test\\Unit\\Search' => __DIR__ . '/..' . '/hoa/ustring/Test/Unit/Search.php',
'Hoa\\Ustring\\Test\\Unit\\Ustring' => __DIR__ . '/..' . '/hoa/ustring/Test/Unit/Ustring.php',
'Hoa\\Ustring\\Ustring' => __DIR__ . '/..' . '/hoa/ustring/Ustring.php',
'Illuminate\\Container\\BoundMethod' => __DIR__ . '/..' . '/illuminate/container/BoundMethod.php',
'Illuminate\\Container\\Container' => __DIR__ . '/..' . '/illuminate/container/Container.php',
'Illuminate\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/illuminate/container/ContextualBindingBuilder.php',
'Illuminate\\Container\\EntryNotFoundException' => __DIR__ . '/..' . '/illuminate/container/EntryNotFoundException.php',
'Illuminate\\Container\\RewindableGenerator' => __DIR__ . '/..' . '/illuminate/container/RewindableGenerator.php',
'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Access/Authorizable.php',
'Illuminate\\Contracts\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Access/Gate.php',
'Illuminate\\Contracts\\Auth\\Authenticatable' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Authenticatable.php',
'Illuminate\\Contracts\\Auth\\CanResetPassword' => __DIR__ . '/..' . '/illuminate/contracts/Auth/CanResetPassword.php',
'Illuminate\\Contracts\\Auth\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Factory.php',
'Illuminate\\Contracts\\Auth\\Guard' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Guard.php',
'Illuminate\\Contracts\\Auth\\MustVerifyEmail' => __DIR__ . '/..' . '/illuminate/contracts/Auth/MustVerifyEmail.php',
'Illuminate\\Contracts\\Auth\\PasswordBroker' => __DIR__ . '/..' . '/illuminate/contracts/Auth/PasswordBroker.php',
'Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => __DIR__ . '/..' . '/illuminate/contracts/Auth/PasswordBrokerFactory.php',
'Illuminate\\Contracts\\Auth\\StatefulGuard' => __DIR__ . '/..' . '/illuminate/contracts/Auth/StatefulGuard.php',
'Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => __DIR__ . '/..' . '/illuminate/contracts/Auth/SupportsBasicAuth.php',
'Illuminate\\Contracts\\Auth\\UserProvider' => __DIR__ . '/..' . '/illuminate/contracts/Auth/UserProvider.php',
'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/Broadcaster.php',
'Illuminate\\Contracts\\Broadcasting\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/Factory.php',
'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/ShouldBroadcast.php',
'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php',
'Illuminate\\Contracts\\Bus\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Bus/Dispatcher.php',
'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Bus/QueueingDispatcher.php',
'Illuminate\\Contracts\\Cache\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Factory.php',
'Illuminate\\Contracts\\Cache\\Lock' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Lock.php',
'Illuminate\\Contracts\\Cache\\LockProvider' => __DIR__ . '/..' . '/illuminate/contracts/Cache/LockProvider.php',
'Illuminate\\Contracts\\Cache\\LockTimeoutException' => __DIR__ . '/..' . '/illuminate/contracts/Cache/LockTimeoutException.php',
'Illuminate\\Contracts\\Cache\\Repository' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Repository.php',
'Illuminate\\Contracts\\Cache\\Store' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Store.php',
'Illuminate\\Contracts\\Config\\Repository' => __DIR__ . '/..' . '/illuminate/contracts/Config/Repository.php',
'Illuminate\\Contracts\\Console\\Application' => __DIR__ . '/..' . '/illuminate/contracts/Console/Application.php',
'Illuminate\\Contracts\\Console\\Kernel' => __DIR__ . '/..' . '/illuminate/contracts/Console/Kernel.php',
'Illuminate\\Contracts\\Container\\BindingResolutionException' => __DIR__ . '/..' . '/illuminate/contracts/Container/BindingResolutionException.php',
'Illuminate\\Contracts\\Container\\Container' => __DIR__ . '/..' . '/illuminate/contracts/Container/Container.php',
'Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/illuminate/contracts/Container/ContextualBindingBuilder.php',
'Illuminate\\Contracts\\Cookie\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Cookie/Factory.php',
'Illuminate\\Contracts\\Cookie\\QueueingFactory' => __DIR__ . '/..' . '/illuminate/contracts/Cookie/QueueingFactory.php',
'Illuminate\\Contracts\\Database\\Events\\MigrationEvent' => __DIR__ . '/..' . '/illuminate/contracts/Database/Events/MigrationEvent.php',
'Illuminate\\Contracts\\Database\\ModelIdentifier' => __DIR__ . '/..' . '/illuminate/contracts/Database/ModelIdentifier.php',
'Illuminate\\Contracts\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/illuminate/contracts/Debug/ExceptionHandler.php',
'Illuminate\\Contracts\\Encryption\\DecryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/DecryptException.php',
'Illuminate\\Contracts\\Encryption\\EncryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/EncryptException.php',
'Illuminate\\Contracts\\Encryption\\Encrypter' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/Encrypter.php',
'Illuminate\\Contracts\\Events\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Events/Dispatcher.php',
'Illuminate\\Contracts\\Filesystem\\Cloud' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Cloud.php',
'Illuminate\\Contracts\\Filesystem\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Factory.php',
'Illuminate\\Contracts\\Filesystem\\FileExistsException' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/FileExistsException.php',
'Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/FileNotFoundException.php',
'Illuminate\\Contracts\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Filesystem.php',
'Illuminate\\Contracts\\Foundation\\Application' => __DIR__ . '/..' . '/illuminate/contracts/Foundation/Application.php',
'Illuminate\\Contracts\\Hashing\\Hasher' => __DIR__ . '/..' . '/illuminate/contracts/Hashing/Hasher.php',
'Illuminate\\Contracts\\Http\\Kernel' => __DIR__ . '/..' . '/illuminate/contracts/Http/Kernel.php',
'Illuminate\\Contracts\\Mail\\MailQueue' => __DIR__ . '/..' . '/illuminate/contracts/Mail/MailQueue.php',
'Illuminate\\Contracts\\Mail\\Mailable' => __DIR__ . '/..' . '/illuminate/contracts/Mail/Mailable.php',
'Illuminate\\Contracts\\Mail\\Mailer' => __DIR__ . '/..' . '/illuminate/contracts/Mail/Mailer.php',
'Illuminate\\Contracts\\Notifications\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Notifications/Dispatcher.php',
'Illuminate\\Contracts\\Notifications\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Notifications/Factory.php',
'Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => __DIR__ . '/..' . '/illuminate/contracts/Pagination/LengthAwarePaginator.php',
'Illuminate\\Contracts\\Pagination\\Paginator' => __DIR__ . '/..' . '/illuminate/contracts/Pagination/Paginator.php',
'Illuminate\\Contracts\\Pipeline\\Hub' => __DIR__ . '/..' . '/illuminate/contracts/Pipeline/Hub.php',
'Illuminate\\Contracts\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/illuminate/contracts/Pipeline/Pipeline.php',
'Illuminate\\Contracts\\Queue\\EntityNotFoundException' => __DIR__ . '/..' . '/illuminate/contracts/Queue/EntityNotFoundException.php',
'Illuminate\\Contracts\\Queue\\EntityResolver' => __DIR__ . '/..' . '/illuminate/contracts/Queue/EntityResolver.php',
'Illuminate\\Contracts\\Queue\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Factory.php',
'Illuminate\\Contracts\\Queue\\Job' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Job.php',
'Illuminate\\Contracts\\Queue\\Monitor' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Monitor.php',
'Illuminate\\Contracts\\Queue\\Queue' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Queue.php',
'Illuminate\\Contracts\\Queue\\QueueableCollection' => __DIR__ . '/..' . '/illuminate/contracts/Queue/QueueableCollection.php',
'Illuminate\\Contracts\\Queue\\QueueableEntity' => __DIR__ . '/..' . '/illuminate/contracts/Queue/QueueableEntity.php',
'Illuminate\\Contracts\\Queue\\ShouldQueue' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ShouldQueue.php',
'Illuminate\\Contracts\\Redis\\Connection' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Connection.php',
'Illuminate\\Contracts\\Redis\\Connector' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Connector.php',
'Illuminate\\Contracts\\Redis\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Factory.php',
'Illuminate\\Contracts\\Redis\\LimiterTimeoutException' => __DIR__ . '/..' . '/illuminate/contracts/Redis/LimiterTimeoutException.php',
'Illuminate\\Contracts\\Routing\\BindingRegistrar' => __DIR__ . '/..' . '/illuminate/contracts/Routing/BindingRegistrar.php',
'Illuminate\\Contracts\\Routing\\Registrar' => __DIR__ . '/..' . '/illuminate/contracts/Routing/Registrar.php',
'Illuminate\\Contracts\\Routing\\ResponseFactory' => __DIR__ . '/..' . '/illuminate/contracts/Routing/ResponseFactory.php',
'Illuminate\\Contracts\\Routing\\UrlGenerator' => __DIR__ . '/..' . '/illuminate/contracts/Routing/UrlGenerator.php',
'Illuminate\\Contracts\\Routing\\UrlRoutable' => __DIR__ . '/..' . '/illuminate/contracts/Routing/UrlRoutable.php',
'Illuminate\\Contracts\\Session\\Session' => __DIR__ . '/..' . '/illuminate/contracts/Session/Session.php',
'Illuminate\\Contracts\\Support\\Arrayable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Arrayable.php',
'Illuminate\\Contracts\\Support\\DeferrableProvider' => __DIR__ . '/..' . '/illuminate/contracts/Support/DeferrableProvider.php',
'Illuminate\\Contracts\\Support\\Htmlable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Htmlable.php',
'Illuminate\\Contracts\\Support\\Jsonable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Jsonable.php',
'Illuminate\\Contracts\\Support\\MessageBag' => __DIR__ . '/..' . '/illuminate/contracts/Support/MessageBag.php',
'Illuminate\\Contracts\\Support\\MessageProvider' => __DIR__ . '/..' . '/illuminate/contracts/Support/MessageProvider.php',
'Illuminate\\Contracts\\Support\\Renderable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Renderable.php',
'Illuminate\\Contracts\\Support\\Responsable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Responsable.php',
'Illuminate\\Contracts\\Translation\\HasLocalePreference' => __DIR__ . '/..' . '/illuminate/contracts/Translation/HasLocalePreference.php',
'Illuminate\\Contracts\\Translation\\Loader' => __DIR__ . '/..' . '/illuminate/contracts/Translation/Loader.php',
'Illuminate\\Contracts\\Translation\\Translator' => __DIR__ . '/..' . '/illuminate/contracts/Translation/Translator.php',
'Illuminate\\Contracts\\Validation\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Factory.php',
'Illuminate\\Contracts\\Validation\\ImplicitRule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/ImplicitRule.php',
'Illuminate\\Contracts\\Validation\\Rule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Rule.php',
'Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => __DIR__ . '/..' . '/illuminate/contracts/Validation/ValidatesWhenResolved.php',
'Illuminate\\Contracts\\Validation\\Validator' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Validator.php',
'Illuminate\\Contracts\\View\\Engine' => __DIR__ . '/..' . '/illuminate/contracts/View/Engine.php',
'Illuminate\\Contracts\\View\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/View/Factory.php',
'Illuminate\\Contracts\\View\\View' => __DIR__ . '/..' . '/illuminate/contracts/View/View.php',
'Illuminate\\Database\\Capsule\\Manager' => __DIR__ . '/..' . '/illuminate/database/Capsule/Manager.php',
'Illuminate\\Database\\Concerns\\BuildsQueries' => __DIR__ . '/..' . '/illuminate/database/Concerns/BuildsQueries.php',
'Illuminate\\Database\\Concerns\\ManagesTransactions' => __DIR__ . '/..' . '/illuminate/database/Concerns/ManagesTransactions.php',
'Illuminate\\Database\\ConfigurationUrlParser' => __DIR__ . '/..' . '/illuminate/database/ConfigurationUrlParser.php',
'Illuminate\\Database\\Connection' => __DIR__ . '/..' . '/illuminate/database/Connection.php',
'Illuminate\\Database\\ConnectionInterface' => __DIR__ . '/..' . '/illuminate/database/ConnectionInterface.php',
'Illuminate\\Database\\ConnectionResolver' => __DIR__ . '/..' . '/illuminate/database/ConnectionResolver.php',
'Illuminate\\Database\\ConnectionResolverInterface' => __DIR__ . '/..' . '/illuminate/database/ConnectionResolverInterface.php',
'Illuminate\\Database\\Connectors\\ConnectionFactory' => __DIR__ . '/..' . '/illuminate/database/Connectors/ConnectionFactory.php',
'Illuminate\\Database\\Connectors\\Connector' => __DIR__ . '/..' . '/illuminate/database/Connectors/Connector.php',
'Illuminate\\Database\\Connectors\\ConnectorInterface' => __DIR__ . '/..' . '/illuminate/database/Connectors/ConnectorInterface.php',
'Illuminate\\Database\\Connectors\\MySqlConnector' => __DIR__ . '/..' . '/illuminate/database/Connectors/MySqlConnector.php',
'Illuminate\\Database\\Connectors\\PostgresConnector' => __DIR__ . '/..' . '/illuminate/database/Connectors/PostgresConnector.php',
'Illuminate\\Database\\Connectors\\SQLiteConnector' => __DIR__ . '/..' . '/illuminate/database/Connectors/SQLiteConnector.php',
'Illuminate\\Database\\Connectors\\SqlServerConnector' => __DIR__ . '/..' . '/illuminate/database/Connectors/SqlServerConnector.php',
'Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Factories/FactoryMakeCommand.php',
'Illuminate\\Database\\Console\\Migrations\\BaseCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/BaseCommand.php',
'Illuminate\\Database\\Console\\Migrations\\FreshCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/FreshCommand.php',
'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/InstallCommand.php',
'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/MigrateCommand.php',
'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/MigrateMakeCommand.php',
'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/RefreshCommand.php',
'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/ResetCommand.php',
'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/RollbackCommand.php',
'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/StatusCommand.php',
'Illuminate\\Database\\Console\\Migrations\\TableGuesser' => __DIR__ . '/..' . '/illuminate/database/Console/Migrations/TableGuesser.php',
'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Seeds/SeedCommand.php',
'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => __DIR__ . '/..' . '/illuminate/database/Console/Seeds/SeederMakeCommand.php',
'Illuminate\\Database\\DatabaseManager' => __DIR__ . '/..' . '/illuminate/database/DatabaseManager.php',
'Illuminate\\Database\\DatabaseServiceProvider' => __DIR__ . '/..' . '/illuminate/database/DatabaseServiceProvider.php',
'Illuminate\\Database\\DetectsDeadlocks' => __DIR__ . '/..' . '/illuminate/database/DetectsDeadlocks.php',
'Illuminate\\Database\\DetectsLostConnections' => __DIR__ . '/..' . '/illuminate/database/DetectsLostConnections.php',
'Illuminate\\Database\\Eloquent\\Builder' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Builder.php',
'Illuminate\\Database\\Eloquent\\Collection' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Collection.php',
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/GuardsAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HasAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HasEvents.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HasGlobalScopes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HasRelationships.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HasTimestamps.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/HidesAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Concerns/QueriesRelationships.php',
'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\FactoryBuilder' => __DIR__ . '/..' . '/illuminate/database/Eloquent/FactoryBuilder.php',
'Illuminate\\Database\\Eloquent\\HigherOrderBuilderProxy' => __DIR__ . '/..' . '/illuminate/database/Eloquent/HigherOrderBuilderProxy.php',
'Illuminate\\Database\\Eloquent\\JsonEncodingException' => __DIR__ . '/..' . '/illuminate/database/Eloquent/JsonEncodingException.php',
'Illuminate\\Database\\Eloquent\\MassAssignmentException' => __DIR__ . '/..' . '/illuminate/database/Eloquent/MassAssignmentException.php',
'Illuminate\\Database\\Eloquent\\Model' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => __DIR__ . '/..' . '/illuminate/database/Eloquent/ModelNotFoundException.php',
'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => __DIR__ . '/..' . '/illuminate/database/Eloquent/QueueEntityResolver.php',
'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => __DIR__ . '/..' . '/illuminate/database/Eloquent/RelationNotFoundException.php',
'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/BelongsTo.php',
'Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/BelongsToMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\AsPivot' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithPivotTable' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php',
'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\SupportsDefaultModels' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/HasMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasManyThrough' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/HasManyThrough.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOne' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/HasOne.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/HasOneOrMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\HasOneThrough' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/HasOneThrough.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphOne' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphOne.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphOneOrMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphPivot' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphPivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphTo.php',
'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/MorphToMany.php',
'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/Pivot.php',
'Illuminate\\Database\\Eloquent\\Relations\\Relation' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Relations/Relation.php',
'Illuminate\\Database\\Eloquent\\Scope' => __DIR__ . '/..' . '/illuminate/database/Eloquent/Scope.php',
'Illuminate\\Database\\Eloquent\\SoftDeletes' => __DIR__ . '/..' . '/illuminate/database/Eloquent/SoftDeletes.php',
'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => __DIR__ . '/..' . '/illuminate/database/Eloquent/SoftDeletingScope.php',
'Illuminate\\Database\\Events\\ConnectionEvent' => __DIR__ . '/..' . '/illuminate/database/Events/ConnectionEvent.php',
'Illuminate\\Database\\Events\\MigrationEnded' => __DIR__ . '/..' . '/illuminate/database/Events/MigrationEnded.php',
'Illuminate\\Database\\Events\\MigrationEvent' => __DIR__ . '/..' . '/illuminate/database/Events/MigrationEvent.php',
'Illuminate\\Database\\Events\\MigrationStarted' => __DIR__ . '/..' . '/illuminate/database/Events/MigrationStarted.php',
'Illuminate\\Database\\Events\\MigrationsEnded' => __DIR__ . '/..' . '/illuminate/database/Events/MigrationsEnded.php',
'Illuminate\\Database\\Events\\MigrationsStarted' => __DIR__ . '/..' . '/illuminate/database/Events/MigrationsStarted.php',
'Illuminate\\Database\\Events\\QueryExecuted' => __DIR__ . '/..' . '/illuminate/database/Events/QueryExecuted.php',
'Illuminate\\Database\\Events\\StatementPrepared' => __DIR__ . '/..' . '/illuminate/database/Events/StatementPrepared.php',
'Illuminate\\Database\\Events\\TransactionBeginning' => __DIR__ . '/..' . '/illuminate/database/Events/TransactionBeginning.php',
'Illuminate\\Database\\Events\\TransactionCommitted' => __DIR__ . '/..' . '/illuminate/database/Events/TransactionCommitted.php',
'Illuminate\\Database\\Events\\TransactionRolledBack' => __DIR__ . '/..' . '/illuminate/database/Events/TransactionRolledBack.php',
'Illuminate\\Database\\Grammar' => __DIR__ . '/..' . '/illuminate/database/Grammar.php',
'Illuminate\\Database\\MigrationServiceProvider' => __DIR__ . '/..' . '/illuminate/database/MigrationServiceProvider.php',
'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => __DIR__ . '/..' . '/illuminate/database/Migrations/DatabaseMigrationRepository.php',
'Illuminate\\Database\\Migrations\\Migration' => __DIR__ . '/..' . '/illuminate/database/Migrations/Migration.php',
'Illuminate\\Database\\Migrations\\MigrationCreator' => __DIR__ . '/..' . '/illuminate/database/Migrations/MigrationCreator.php',
'Illuminate\\Database\\Migrations\\MigrationRepositoryInterface' => __DIR__ . '/..' . '/illuminate/database/Migrations/MigrationRepositoryInterface.php',
'Illuminate\\Database\\Migrations\\Migrator' => __DIR__ . '/..' . '/illuminate/database/Migrations/Migrator.php',
'Illuminate\\Database\\MySqlConnection' => __DIR__ . '/..' . '/illuminate/database/MySqlConnection.php',
'Illuminate\\Database\\PostgresConnection' => __DIR__ . '/..' . '/illuminate/database/PostgresConnection.php',
'Illuminate\\Database\\QueryException' => __DIR__ . '/..' . '/illuminate/database/QueryException.php',
'Illuminate\\Database\\Query\\Builder' => __DIR__ . '/..' . '/illuminate/database/Query/Builder.php',
'Illuminate\\Database\\Query\\Expression' => __DIR__ . '/..' . '/illuminate/database/Query/Expression.php',
'Illuminate\\Database\\Query\\Grammars\\Grammar' => __DIR__ . '/..' . '/illuminate/database/Query/Grammars/Grammar.php',
'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/illuminate/database/Query/Grammars/MySqlGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\PostgresGrammar' => __DIR__ . '/..' . '/illuminate/database/Query/Grammars/PostgresGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar' => __DIR__ . '/..' . '/illuminate/database/Query/Grammars/SQLiteGrammar.php',
'Illuminate\\Database\\Query\\Grammars\\SqlServerGrammar' => __DIR__ . '/..' . '/illuminate/database/Query/Grammars/SqlServerGrammar.php',
'Illuminate\\Database\\Query\\JoinClause' => __DIR__ . '/..' . '/illuminate/database/Query/JoinClause.php',
'Illuminate\\Database\\Query\\JsonExpression' => __DIR__ . '/..' . '/illuminate/database/Query/JsonExpression.php',
'Illuminate\\Database\\Query\\Processors\\MySqlProcessor' => __DIR__ . '/..' . '/illuminate/database/Query/Processors/MySqlProcessor.php',
'Illuminate\\Database\\Query\\Processors\\PostgresProcessor' => __DIR__ . '/..' . '/illuminate/database/Query/Processors/PostgresProcessor.php',
'Illuminate\\Database\\Query\\Processors\\Processor' => __DIR__ . '/..' . '/illuminate/database/Query/Processors/Processor.php',
'Illuminate\\Database\\Query\\Processors\\SQLiteProcessor' => __DIR__ . '/..' . '/illuminate/database/Query/Processors/SQLiteProcessor.php',
'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => __DIR__ . '/..' . '/illuminate/database/Query/Processors/SqlServerProcessor.php',
'Illuminate\\Database\\SQLiteConnection' => __DIR__ . '/..' . '/illuminate/database/SQLiteConnection.php',
'Illuminate\\Database\\Schema\\Blueprint' => __DIR__ . '/..' . '/illuminate/database/Schema/Blueprint.php',
'Illuminate\\Database\\Schema\\Builder' => __DIR__ . '/..' . '/illuminate/database/Schema/Builder.php',
'Illuminate\\Database\\Schema\\ColumnDefinition' => __DIR__ . '/..' . '/illuminate/database/Schema/ColumnDefinition.php',
'Illuminate\\Database\\Schema\\ForeignKeyDefinition' => __DIR__ . '/..' . '/illuminate/database/Schema/ForeignKeyDefinition.php',
'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/ChangeColumn.php',
'Illuminate\\Database\\Schema\\Grammars\\Grammar' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/Grammar.php',
'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/MySqlGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/PostgresGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\RenameColumn' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/RenameColumn.php',
'Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/SQLiteGrammar.php',
'Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar' => __DIR__ . '/..' . '/illuminate/database/Schema/Grammars/SqlServerGrammar.php',
'Illuminate\\Database\\Schema\\MySqlBuilder' => __DIR__ . '/..' . '/illuminate/database/Schema/MySqlBuilder.php',
'Illuminate\\Database\\Schema\\PostgresBuilder' => __DIR__ . '/..' . '/illuminate/database/Schema/PostgresBuilder.php',
'Illuminate\\Database\\Schema\\SQLiteBuilder' => __DIR__ . '/..' . '/illuminate/database/Schema/SQLiteBuilder.php',
'Illuminate\\Database\\Schema\\SqlServerBuilder' => __DIR__ . '/..' . '/illuminate/database/Schema/SqlServerBuilder.php',
'Illuminate\\Database\\Seeder' => __DIR__ . '/..' . '/illuminate/database/Seeder.php',
'Illuminate\\Database\\SqlServerConnection' => __DIR__ . '/..' . '/illuminate/database/SqlServerConnection.php',
'Illuminate\\Events\\CallQueuedListener' => __DIR__ . '/..' . '/illuminate/events/CallQueuedListener.php',
'Illuminate\\Events\\Dispatcher' => __DIR__ . '/..' . '/illuminate/events/Dispatcher.php',
'Illuminate\\Events\\EventServiceProvider' => __DIR__ . '/..' . '/illuminate/events/EventServiceProvider.php',
'Illuminate\\Support\\AggregateServiceProvider' => __DIR__ . '/..' . '/illuminate/support/AggregateServiceProvider.php',
'Illuminate\\Support\\Arr' => __DIR__ . '/..' . '/illuminate/support/Arr.php',
'Illuminate\\Support\\Carbon' => __DIR__ . '/..' . '/illuminate/support/Carbon.php',
'Illuminate\\Support\\Collection' => __DIR__ . '/..' . '/illuminate/support/Collection.php',
'Illuminate\\Support\\Composer' => __DIR__ . '/..' . '/illuminate/support/Composer.php',
'Illuminate\\Support\\ConfigurationUrlParser' => __DIR__ . '/..' . '/illuminate/support/ConfigurationUrlParser.php',
'Illuminate\\Support\\DateFactory' => __DIR__ . '/..' . '/illuminate/support/DateFactory.php',
'Illuminate\\Support\\Facades\\App' => __DIR__ . '/..' . '/illuminate/support/Facades/App.php',
'Illuminate\\Support\\Facades\\Artisan' => __DIR__ . '/..' . '/illuminate/support/Facades/Artisan.php',
'Illuminate\\Support\\Facades\\Auth' => __DIR__ . '/..' . '/illuminate/support/Facades/Auth.php',
'Illuminate\\Support\\Facades\\Blade' => __DIR__ . '/..' . '/illuminate/support/Facades/Blade.php',
'Illuminate\\Support\\Facades\\Broadcast' => __DIR__ . '/..' . '/illuminate/support/Facades/Broadcast.php',
'Illuminate\\Support\\Facades\\Bus' => __DIR__ . '/..' . '/illuminate/support/Facades/Bus.php',
'Illuminate\\Support\\Facades\\Cache' => __DIR__ . '/..' . '/illuminate/support/Facades/Cache.php',
'Illuminate\\Support\\Facades\\Config' => __DIR__ . '/..' . '/illuminate/support/Facades/Config.php',
'Illuminate\\Support\\Facades\\Cookie' => __DIR__ . '/..' . '/illuminate/support/Facades/Cookie.php',
'Illuminate\\Support\\Facades\\Crypt' => __DIR__ . '/..' . '/illuminate/support/Facades/Crypt.php',
'Illuminate\\Support\\Facades\\DB' => __DIR__ . '/..' . '/illuminate/support/Facades/DB.php',
'Illuminate\\Support\\Facades\\Date' => __DIR__ . '/..' . '/illuminate/support/Facades/Date.php',
'Illuminate\\Support\\Facades\\Event' => __DIR__ . '/..' . '/illuminate/support/Facades/Event.php',
'Illuminate\\Support\\Facades\\Facade' => __DIR__ . '/..' . '/illuminate/support/Facades/Facade.php',
'Illuminate\\Support\\Facades\\File' => __DIR__ . '/..' . '/illuminate/support/Facades/File.php',
'Illuminate\\Support\\Facades\\Gate' => __DIR__ . '/..' . '/illuminate/support/Facades/Gate.php',
'Illuminate\\Support\\Facades\\Hash' => __DIR__ . '/..' . '/illuminate/support/Facades/Hash.php',
'Illuminate\\Support\\Facades\\Input' => __DIR__ . '/..' . '/illuminate/support/Facades/Input.php',
'Illuminate\\Support\\Facades\\Lang' => __DIR__ . '/..' . '/illuminate/support/Facades/Lang.php',
'Illuminate\\Support\\Facades\\Log' => __DIR__ . '/..' . '/illuminate/support/Facades/Log.php',
'Illuminate\\Support\\Facades\\Mail' => __DIR__ . '/..' . '/illuminate/support/Facades/Mail.php',
'Illuminate\\Support\\Facades\\Notification' => __DIR__ . '/..' . '/illuminate/support/Facades/Notification.php',
'Illuminate\\Support\\Facades\\Password' => __DIR__ . '/..' . '/illuminate/support/Facades/Password.php',
'Illuminate\\Support\\Facades\\Queue' => __DIR__ . '/..' . '/illuminate/support/Facades/Queue.php',
'Illuminate\\Support\\Facades\\Redirect' => __DIR__ . '/..' . '/illuminate/support/Facades/Redirect.php',
'Illuminate\\Support\\Facades\\Redis' => __DIR__ . '/..' . '/illuminate/support/Facades/Redis.php',
'Illuminate\\Support\\Facades\\Request' => __DIR__ . '/..' . '/illuminate/support/Facades/Request.php',
'Illuminate\\Support\\Facades\\Response' => __DIR__ . '/..' . '/illuminate/support/Facades/Response.php',
'Illuminate\\Support\\Facades\\Route' => __DIR__ . '/..' . '/illuminate/support/Facades/Route.php',
'Illuminate\\Support\\Facades\\Schema' => __DIR__ . '/..' . '/illuminate/support/Facades/Schema.php',
'Illuminate\\Support\\Facades\\Session' => __DIR__ . '/..' . '/illuminate/support/Facades/Session.php',
'Illuminate\\Support\\Facades\\Storage' => __DIR__ . '/..' . '/illuminate/support/Facades/Storage.php',
'Illuminate\\Support\\Facades\\URL' => __DIR__ . '/..' . '/illuminate/support/Facades/URL.php',
'Illuminate\\Support\\Facades\\Validator' => __DIR__ . '/..' . '/illuminate/support/Facades/Validator.php',
'Illuminate\\Support\\Facades\\View' => __DIR__ . '/..' . '/illuminate/support/Facades/View.php',
'Illuminate\\Support\\Fluent' => __DIR__ . '/..' . '/illuminate/support/Fluent.php',
'Illuminate\\Support\\HigherOrderCollectionProxy' => __DIR__ . '/..' . '/illuminate/support/HigherOrderCollectionProxy.php',
'Illuminate\\Support\\HigherOrderTapProxy' => __DIR__ . '/..' . '/illuminate/support/HigherOrderTapProxy.php',
'Illuminate\\Support\\HtmlString' => __DIR__ . '/..' . '/illuminate/support/HtmlString.php',
'Illuminate\\Support\\InteractsWithTime' => __DIR__ . '/..' . '/illuminate/support/InteractsWithTime.php',
'Illuminate\\Support\\Manager' => __DIR__ . '/..' . '/illuminate/support/Manager.php',
'Illuminate\\Support\\MessageBag' => __DIR__ . '/..' . '/illuminate/support/MessageBag.php',
'Illuminate\\Support\\NamespacedItemResolver' => __DIR__ . '/..' . '/illuminate/support/NamespacedItemResolver.php',
'Illuminate\\Support\\Optional' => __DIR__ . '/..' . '/illuminate/support/Optional.php',
'Illuminate\\Support\\Pluralizer' => __DIR__ . '/..' . '/illuminate/support/Pluralizer.php',
'Illuminate\\Support\\ProcessUtils' => __DIR__ . '/..' . '/illuminate/support/ProcessUtils.php',
'Illuminate\\Support\\ServiceProvider' => __DIR__ . '/..' . '/illuminate/support/ServiceProvider.php',
'Illuminate\\Support\\Str' => __DIR__ . '/..' . '/illuminate/support/Str.php',
'Illuminate\\Support\\Testing\\Fakes\\BusFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/BusFake.php',
'Illuminate\\Support\\Testing\\Fakes\\EventFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/EventFake.php',
'Illuminate\\Support\\Testing\\Fakes\\MailFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/MailFake.php',
'Illuminate\\Support\\Testing\\Fakes\\NotificationFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/NotificationFake.php',
'Illuminate\\Support\\Testing\\Fakes\\PendingMailFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/PendingMailFake.php',
'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => __DIR__ . '/..' . '/illuminate/support/Testing/Fakes/QueueFake.php',
'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => __DIR__ . '/..' . '/illuminate/support/Traits/CapsuleManagerTrait.php',
'Illuminate\\Support\\Traits\\ForwardsCalls' => __DIR__ . '/..' . '/illuminate/support/Traits/ForwardsCalls.php',
'Illuminate\\Support\\Traits\\Localizable' => __DIR__ . '/..' . '/illuminate/support/Traits/Localizable.php',
'Illuminate\\Support\\Traits\\Macroable' => __DIR__ . '/..' . '/illuminate/support/Traits/Macroable.php',
'Illuminate\\Support\\Traits\\Tappable' => __DIR__ . '/..' . '/illuminate/support/Traits/Tappable.php',
'Illuminate\\Support\\ViewErrorBag' => __DIR__ . '/..' . '/illuminate/support/ViewErrorBag.php',
'Intervention\\Image\\AbstractColor' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/AbstractColor.php',
'Intervention\\Image\\AbstractDecoder' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/AbstractDecoder.php',
'Intervention\\Image\\AbstractDriver' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/AbstractDriver.php',
@@ -742,7 +1355,7 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Intervention\\Image\\ImageManagerStatic' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageManagerStatic.php',
'Intervention\\Image\\ImageServiceProvider' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProvider.php',
'Intervention\\Image\\ImageServiceProviderLaravel4' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php',
'Intervention\\Image\\ImageServiceProviderLaravel5' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php',
'Intervention\\Image\\ImageServiceProviderLaravelRecent' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProviderLaravelRecent.php',
'Intervention\\Image\\ImageServiceProviderLeague' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php',
'Intervention\\Image\\ImageServiceProviderLumen' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php',
'Intervention\\Image\\Imagick\\Color' => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image/Imagick/Color.php',
@@ -1094,6 +1707,9 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Predis\\Transaction\\AbortedMultiExecException' => __DIR__ . '/..' . '/predis/predis/src/Transaction/AbortedMultiExecException.php',
'Predis\\Transaction\\MultiExec' => __DIR__ . '/..' . '/predis/predis/src/Transaction/MultiExec.php',
'Predis\\Transaction\\MultiExecState' => __DIR__ . '/..' . '/predis/predis/src/Transaction/MultiExecState.php',
'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php',
'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php',
'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php',
@@ -1101,6 +1717,9 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php',
'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php',
'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php',
'Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php',
'Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php',
'Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php',
'Stomp\\Broker\\ActiveMq\\ActiveMq' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Broker/ActiveMq/ActiveMq.php',
'Stomp\\Broker\\ActiveMq\\Mode\\ActiveMqMode' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Broker/ActiveMq/Mode/ActiveMqMode.php',
'Stomp\\Broker\\ActiveMq\\Mode\\DurableSubscription' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Broker/ActiveMq/Mode/DurableSubscription.php',
@@ -1146,6 +1765,81 @@ class ComposerStaticInit444c3f31864f68a3f466e2c19837e185
'Stomp\\Transport\\Message' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Transport/Message.php',
'Stomp\\Transport\\Parser' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Transport/Parser.php',
'Stomp\\Util\\IdGenerator' => __DIR__ . '/..' . '/stomp-php/stomp-php/src/Util/IdGenerator.php',
'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/AbstractOperation.php',
'Symfony\\Component\\Translation\\Catalogue\\MergeOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/MergeOperation.php',
'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' => __DIR__ . '/..' . '/symfony/translation/Catalogue/OperationInterface.php',
'Symfony\\Component\\Translation\\Catalogue\\TargetOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/TargetOperation.php',
'Symfony\\Component\\Translation\\Command\\XliffLintCommand' => __DIR__ . '/..' . '/symfony/translation/Command/XliffLintCommand.php',
'Symfony\\Component\\Translation\\DataCollectorTranslator' => __DIR__ . '/..' . '/symfony/translation/DataCollectorTranslator.php',
'Symfony\\Component\\Translation\\DataCollector\\TranslationDataCollector' => __DIR__ . '/..' . '/symfony/translation/DataCollector/TranslationDataCollector.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslationDumperPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslationDumperPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslationExtractorPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslationExtractorPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslatorPass.php',
'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPathsPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslatorPathsPass.php',
'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/CsvFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/translation/Dumper/DumperInterface.php',
'Symfony\\Component\\Translation\\Dumper\\FileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/FileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/IcuResFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\IniFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/IniFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\JsonFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/JsonFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\MoFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/MoFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/PhpFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\PoFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/PoFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\QtFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/QtFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/XliffFileDumper.php',
'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/YamlFileDumper.php',
'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/translation/Exception/ExceptionInterface.php',
'Symfony\\Component\\Translation\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/translation/Exception/InvalidArgumentException.php',
'Symfony\\Component\\Translation\\Exception\\InvalidResourceException' => __DIR__ . '/..' . '/symfony/translation/Exception/InvalidResourceException.php',
'Symfony\\Component\\Translation\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/translation/Exception/LogicException.php',
'Symfony\\Component\\Translation\\Exception\\NotFoundResourceException' => __DIR__ . '/..' . '/symfony/translation/Exception/NotFoundResourceException.php',
'Symfony\\Component\\Translation\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/translation/Exception/RuntimeException.php',
'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/AbstractFileExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\ChainExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/ChainExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' => __DIR__ . '/..' . '/symfony/translation/Extractor/ExtractorInterface.php',
'Symfony\\Component\\Translation\\Extractor\\PhpExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/PhpExtractor.php',
'Symfony\\Component\\Translation\\Extractor\\PhpStringTokenParser' => __DIR__ . '/..' . '/symfony/translation/Extractor/PhpStringTokenParser.php',
'Symfony\\Component\\Translation\\Formatter\\ChoiceMessageFormatterInterface' => __DIR__ . '/..' . '/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php',
'Symfony\\Component\\Translation\\Formatter\\IntlFormatter' => __DIR__ . '/..' . '/symfony/translation/Formatter/IntlFormatter.php',
'Symfony\\Component\\Translation\\Formatter\\IntlFormatterInterface' => __DIR__ . '/..' . '/symfony/translation/Formatter/IntlFormatterInterface.php',
'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => __DIR__ . '/..' . '/symfony/translation/Formatter/MessageFormatter.php',
'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' => __DIR__ . '/..' . '/symfony/translation/Formatter/MessageFormatterInterface.php',
'Symfony\\Component\\Translation\\IdentityTranslator' => __DIR__ . '/..' . '/symfony/translation/IdentityTranslator.php',
'Symfony\\Component\\Translation\\Interval' => __DIR__ . '/..' . '/symfony/translation/Interval.php',
'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/ArrayLoader.php',
'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/CsvFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/FileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IcuDatFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IcuResFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IniFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\JsonFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/JsonFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/translation/Loader/LoaderInterface.php',
'Symfony\\Component\\Translation\\Loader\\MoFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/MoFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/PhpFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\PoFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/PoFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\QtFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/QtFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\XliffFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/XliffFileLoader.php',
'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/YamlFileLoader.php',
'Symfony\\Component\\Translation\\LoggingTranslator' => __DIR__ . '/..' . '/symfony/translation/LoggingTranslator.php',
'Symfony\\Component\\Translation\\MessageCatalogue' => __DIR__ . '/..' . '/symfony/translation/MessageCatalogue.php',
'Symfony\\Component\\Translation\\MessageCatalogueInterface' => __DIR__ . '/..' . '/symfony/translation/MessageCatalogueInterface.php',
'Symfony\\Component\\Translation\\MessageSelector' => __DIR__ . '/..' . '/symfony/translation/MessageSelector.php',
'Symfony\\Component\\Translation\\MetadataAwareInterface' => __DIR__ . '/..' . '/symfony/translation/MetadataAwareInterface.php',
'Symfony\\Component\\Translation\\PluralizationRules' => __DIR__ . '/..' . '/symfony/translation/PluralizationRules.php',
'Symfony\\Component\\Translation\\Reader\\TranslationReader' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReader.php',
'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReaderInterface.php',
'Symfony\\Component\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/translation/Translator.php',
'Symfony\\Component\\Translation\\TranslatorBagInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorBagInterface.php',
'Symfony\\Component\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorInterface.php',
'Symfony\\Component\\Translation\\Util\\ArrayConverter' => __DIR__ . '/..' . '/symfony/translation/Util/ArrayConverter.php',
'Symfony\\Component\\Translation\\Util\\XliffUtils' => __DIR__ . '/..' . '/symfony/translation/Util/XliffUtils.php',
'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => __DIR__ . '/..' . '/symfony/translation/Writer/TranslationWriter.php',
'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' => __DIR__ . '/..' . '/symfony/translation/Writer/TranslationWriterInterface.php',
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php',
'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/translation-contracts/Test/TranslatorTest.php',
'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php',
'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
'XMPPHP\\BOSH' => __DIR__ . '/..' . '/diogocomposer/xmpphp/XMPPHP/BOSH.php',
'XMPPHP\\Exception' => __DIR__ . '/..' . '/diogocomposer/xmpphp/XMPPHP/Exception.php',
'XMPPHP\\Log' => __DIR__ . '/..' . '/diogocomposer/xmpphp/XMPPHP/Log.php',
+7 -7
Ver Arquivo
@@ -27,22 +27,22 @@ Requirements
Basic usage
-----------
# `Composer\CaBundle\CaBundle`
### `Composer\CaBundle\CaBundle`
- `CaBundle::getSystemCaRootBundlePath()`: Returns the system CA bundle path, or a path to the bundled one as fallback
- `CaBundle::getBundledCaBundlePath()`: Returns the path to the bundled CA file
- `CaBundle::validateCaFile($filename)`: Validates a CA file using opensl_x509_parse only if it is safe to use
- `CaBundle::validateCaFile($filename)`: Validates a CA file using openssl_x509_parse only if it is safe to use
- `CaBundle::isOpensslParseSafe()`: Test if it is safe to use the PHP function openssl_x509_parse()
- `CaBundle::reset()`: Resets the static caches
## To use with curl
#### To use with curl
```php
$curl = curl_init("https://example.org/");
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
if (is_dir($caPathOrFile)) {
curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
} else {
curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
@@ -51,7 +51,7 @@ if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathO
$result = curl_exec($curl);
```
## To use with php streams
#### To use with php streams
```php
$opts = array(
@@ -61,7 +61,7 @@ $opts = array(
);
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
if (is_dir($caPathOrFile)) {
$opts['ssl']['capath'] = $caPathOrFile;
} else {
$opts['ssl']['cafile'] = $caPathOrFile;
@@ -71,7 +71,7 @@ $context = stream_context_create($opts);
$result = file_get_contents('https://example.com', false, $context);
```
## To use with Guzzle
#### To use with Guzzle
```php
$client = new \GuzzleHttp\Client([
+2 -2
Ver Arquivo
@@ -24,10 +24,10 @@
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0"
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0 || ^4.0"
},
+108 -33
Ver Arquivo
@@ -1,7 +1,7 @@
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Wed Jan 23 04:12:09 2019 GMT
## Certificate data from Mozilla as of: Wed Aug 28 03:12:10 2019 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
## Just configure this file as the SSLCACertificateFile.
##
## Conversion done with mk-ca-bundle.pl version 1.27.
## SHA256: 18372117493b5b7ec006c31d966143fc95a9464a2b5f8d5188e23c5557b2292d
## SHA256: fffa309937c3be940649293f749b8207fabc6eb224e50e4bb3f2c5e44e0d6a6b
##
@@ -2613,37 +2613,6 @@ kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
-----END CERTIFICATE-----
Certinomis - Root CA
====================
-----BEGIN CERTIFICATE-----
MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg
LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx
EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD
ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos
P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo
d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap
z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00
8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x
RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE
6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t
FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV
PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH
i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj
YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I
6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV
WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw
Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX
lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ
y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9
Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng
DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi
I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM
cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr
hkIGuUE=
-----END CERTIFICATE-----
OISTE WISeKey Global Root GB CA
===============================
-----BEGIN CERTIFICATE-----
@@ -3399,3 +3368,109 @@ tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS
aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde
E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
-----END CERTIFICATE-----
emSign Root CA - G1
===================
-----BEGIN CERTIFICATE-----
MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET
MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl
ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx
ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk
aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN
LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1
cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW
DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ
6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH
hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG
MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2
vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q
NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q
+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih
U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx
iN66zB+Afko=
-----END CERTIFICATE-----
emSign ECC Root CA - G3
=======================
-----BEGIN CERTIFICATE-----
MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG
A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg
MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4
MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11
ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc
58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr
MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC
AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D
CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7
jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj
-----END CERTIFICATE-----
emSign Root CA - C1
===================
-----BEGIN CERTIFICATE-----
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx
EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp
Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD
ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up
ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/
Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX
OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V
I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms
lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+
XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD
ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp
/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1
NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9
wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ
BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
-----END CERTIFICATE-----
emSign ECC Root CA - C3
=======================
-----BEGIN CERTIFICATE-----
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG
A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF
Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE
BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD
ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd
6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9
SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA
B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA
MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU
ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
-----END CERTIFICATE-----
Hongkong Post Root CA 3
=======================
-----BEGIN CERTIFICATE-----
MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG
A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK
Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2
MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv
bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX
SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz
iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf
jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim
5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe
sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj
0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/
JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u
y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h
+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG
xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID
AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e
i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN
AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw
W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld
y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov
+BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc
eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw
9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7
nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY
hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB
60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq
dBb9HxEGmpv0
-----END CERTIFICATE-----
+26 -24
Ver Arquivo
@@ -66,32 +66,21 @@ class CaBundle
if (self::$caPath !== null) {
return self::$caPath;
}
$caBundlePaths = array();
// If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$envCertFile = getenv('SSL_CERT_FILE');
if ($envCertFile && is_readable($envCertFile) && static::validateCaFile($envCertFile, $logger)) {
return self::$caPath = $envCertFile;
}
$caBundlePaths[] = getenv('SSL_CERT_FILE');
// If SSL_CERT_DIR env variable points to a valid certificate/bundle, use that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$envCertDir = getenv('SSL_CERT_DIR');
if ($envCertDir && is_dir($envCertDir) && is_readable($envCertDir)) {
return self::$caPath = $envCertDir;
}
$caBundlePaths[] = getenv('SSL_CERT_DIR');
$configured = ini_get('openssl.cafile');
if ($configured && strlen($configured) > 0 && is_readable($configured) && static::validateCaFile($configured, $logger)) {
return self::$caPath = $configured;
}
$caBundlePaths[] = ini_get('openssl.cafile');
$caBundlePaths[] = ini_get('openssl.capath');
$configured = ini_get('openssl.capath');
if ($configured && is_dir($configured) && is_readable($configured)) {
return self::$caPath = $configured;
}
$caBundlePaths = array(
$otherLocations = array(
'/etc/pki/tls/certs/ca-bundle.crt', // Fedora, RHEL, CentOS (ca-certificates package)
'/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package)
'/etc/ssl/ca-bundle.pem', // SUSE, openSUSE (ca-certificates package)
@@ -105,15 +94,18 @@ class CaBundle
'/usr/local/etc/openssl/cert.pem', // OS X homebrew, openssl package
);
foreach ($caBundlePaths as $caBundle) {
if (@is_readable($caBundle) && static::validateCaFile($caBundle, $logger)) {
return self::$caPath = $caBundle;
}
foreach($otherLocations as $location) {
$otherLocations[] = dirname($location);
}
$caBundlePaths = array_merge($caBundlePaths, $otherLocations);
foreach ($caBundlePaths as $caBundle) {
$caBundle = dirname($caBundle);
if (@is_dir($caBundle) && glob($caBundle.'/*')) {
if (self::caFileUsable($caBundle, $logger)) {
return self::$caPath = $caBundle;
}
if (self::caDirUsable($caBundle)) {
return self::$caPath = $caBundle;
}
}
@@ -305,4 +297,14 @@ EOT;
self::$caPath = null;
self::$useOpensslParse = null;
}
private static function caFileUsable($certFile, LoggerInterface $logger = null)
{
return $certFile && @is_file($certFile) && @is_readable($certFile) && static::validateCaFile($certFile, $logger);
}
private static function caDirUsable($certDir)
{
return $certDir && @is_dir($certDir) && @is_readable($certDir) && glob($certDir . '/*');
}
}
+1145 -55
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+19
Ver Arquivo
@@ -0,0 +1,19 @@
Copyright (c) 2006-2015 Doctrine Project
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+6
Ver Arquivo
@@ -0,0 +1,6 @@
# Doctrine Inflector
Doctrine Inflector is a small library that can perform string manipulations
with regard to upper-/lowercase and singular/plural forms of words.
[![Build Status](https://travis-ci.org/doctrine/inflector.svg?branch=master)](https://travis-ci.org/doctrine/inflector)
+32
Ver Arquivo
@@ -0,0 +1,32 @@
{
"name": "doctrine/inflector",
"type": "library",
"description": "Common String Manipulations with regard to casing and singular/plural rules.",
"keywords": ["string", "inflection", "singularize", "pluralize"],
"homepage": "http://www.doctrine-project.org",
"license": "MIT",
"authors": [
{"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
{"name": "Roman Borschel", "email": "roman@code-factory.org"},
{"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
{"name": "Jonathan Wage", "email": "jonwage@gmail.com"},
{"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
],
"require": {
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
},
"autoload": {
"psr-4": { "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" }
},
"autoload-dev": {
"psr-4": { "Doctrine\\Tests\\Common\\Inflector\\": "tests/Doctrine/Tests/Common/Inflector" }
},
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
}
}
@@ -0,0 +1,490 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\Common\Inflector;
/**
* Doctrine inflector has static methods for inflecting text.
*
* The methods in these classes are from several different sources collected
* across several different php projects and several different authors. The
* original author names and emails are not known.
*
* Pluralize & Singularize implementation are borrowed from CakePHP with some modifications.
*
* @link www.doctrine-project.org
* @since 1.0
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Jonathan H. Wage <jonwage@gmail.com>
*/
class Inflector
{
/**
* Plural inflector rules.
*
* @var string[][]
*/
private static $plural = array(
'rules' => array(
'/(s)tatus$/i' => '\1\2tatuses',
'/(quiz)$/i' => '\1zes',
'/^(ox)$/i' => '\1\2en',
'/([m|l])ouse$/i' => '\1ice',
'/(matr|vert|ind)(ix|ex)$/i' => '\1ices',
'/(x|ch|ss|sh)$/i' => '\1es',
'/([^aeiouy]|qu)y$/i' => '\1ies',
'/(hive|gulf)$/i' => '\1s',
'/(?:([^f])fe|([lr])f)$/i' => '\1\2ves',
'/sis$/i' => 'ses',
'/([ti])um$/i' => '\1a',
'/(c)riterion$/i' => '\1riteria',
'/(p)erson$/i' => '\1eople',
'/(m)an$/i' => '\1en',
'/(c)hild$/i' => '\1hildren',
'/(f)oot$/i' => '\1eet',
'/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes',
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i',
'/us$/i' => 'uses',
'/(alias)$/i' => '\1es',
'/(analys|ax|cris|test|thes)is$/i' => '\1es',
'/s$/' => 's',
'/^$/' => '',
'/$/' => 's',
),
'uninflected' => array(
'.*[nrlm]ese',
'.*deer',
'.*fish',
'.*measles',
'.*ois',
'.*pox',
'.*sheep',
'people',
'cookie',
'police',
),
'irregular' => array(
'atlas' => 'atlases',
'axe' => 'axes',
'beef' => 'beefs',
'brother' => 'brothers',
'cafe' => 'cafes',
'chateau' => 'chateaux',
'niveau' => 'niveaux',
'child' => 'children',
'cookie' => 'cookies',
'corpus' => 'corpuses',
'cow' => 'cows',
'criterion' => 'criteria',
'curriculum' => 'curricula',
'demo' => 'demos',
'domino' => 'dominoes',
'echo' => 'echoes',
'foot' => 'feet',
'fungus' => 'fungi',
'ganglion' => 'ganglions',
'genie' => 'genies',
'genus' => 'genera',
'goose' => 'geese',
'graffito' => 'graffiti',
'hippopotamus' => 'hippopotami',
'hoof' => 'hoofs',
'human' => 'humans',
'iris' => 'irises',
'larva' => 'larvae',
'leaf' => 'leaves',
'loaf' => 'loaves',
'man' => 'men',
'medium' => 'media',
'memorandum' => 'memoranda',
'money' => 'monies',
'mongoose' => 'mongooses',
'motto' => 'mottoes',
'move' => 'moves',
'mythos' => 'mythoi',
'niche' => 'niches',
'nucleus' => 'nuclei',
'numen' => 'numina',
'occiput' => 'occiputs',
'octopus' => 'octopuses',
'opus' => 'opuses',
'ox' => 'oxen',
'passerby' => 'passersby',
'penis' => 'penises',
'person' => 'people',
'plateau' => 'plateaux',
'runner-up' => 'runners-up',
'sex' => 'sexes',
'soliloquy' => 'soliloquies',
'son-in-law' => 'sons-in-law',
'syllabus' => 'syllabi',
'testis' => 'testes',
'thief' => 'thieves',
'tooth' => 'teeth',
'tornado' => 'tornadoes',
'trilby' => 'trilbys',
'turf' => 'turfs',
'valve' => 'valves',
'volcano' => 'volcanoes',
)
);
/**
* Singular inflector rules.
*
* @var string[][]
*/
private static $singular = array(
'rules' => array(
'/(s)tatuses$/i' => '\1\2tatus',
'/^(.*)(menu)s$/i' => '\1\2',
'/(quiz)zes$/i' => '\\1',
'/(matr)ices$/i' => '\1ix',
'/(vert|ind)ices$/i' => '\1ex',
'/^(ox)en/i' => '\1',
'/(alias)(es)*$/i' => '\1',
'/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o',
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
'/([ftw]ax)es/i' => '\1',
'/(analys|ax|cris|test|thes)es$/i' => '\1is',
'/(shoe|slave)s$/i' => '\1',
'/(o)es$/i' => '\1',
'/ouses$/' => 'ouse',
'/([^a])uses$/' => '\1us',
'/([m|l])ice$/i' => '\1ouse',
'/(x|ch|ss|sh)es$/i' => '\1',
'/(m)ovies$/i' => '\1\2ovie',
'/(s)eries$/i' => '\1\2eries',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/([lr])ves$/i' => '\1f',
'/(tive)s$/i' => '\1',
'/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1',
'/(dive)s$/i' => '\1',
'/(olive)s$/i' => '\1',
'/([^fo])ves$/i' => '\1fe',
'/(^analy)ses$/i' => '\1sis',
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
'/(c)riteria$/i' => '\1riterion',
'/([ti])a$/i' => '\1um',
'/(p)eople$/i' => '\1\2erson',
'/(m)en$/i' => '\1an',
'/(c)hildren$/i' => '\1\2hild',
'/(f)eet$/i' => '\1oot',
'/(n)ews$/i' => '\1\2ews',
'/eaus$/' => 'eau',
'/^(.*us)$/' => '\\1',
'/s$/i' => '',
),
'uninflected' => array(
'.*[nrlm]ese',
'.*deer',
'.*fish',
'.*measles',
'.*ois',
'.*pox',
'.*sheep',
'.*ss',
'data',
'police',
'pants',
'clothes',
),
'irregular' => array(
'abuses' => 'abuse',
'avalanches' => 'avalanche',
'caches' => 'cache',
'criteria' => 'criterion',
'curves' => 'curve',
'emphases' => 'emphasis',
'foes' => 'foe',
'geese' => 'goose',
'graves' => 'grave',
'hoaxes' => 'hoax',
'media' => 'medium',
'neuroses' => 'neurosis',
'waves' => 'wave',
'oases' => 'oasis',
'valves' => 'valve',
)
);
/**
* Words that should not be inflected.
*
* @var array
*/
private static $uninflected = array(
'.*?media', 'Amoyese', 'audio', 'bison', 'Borghese', 'bream', 'breeches',
'britches', 'buffalo', 'cantus', 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'compensation', 'Congoese',
'contretemps', 'coreopsis', 'corps', 'data', 'debris', 'deer', 'diabetes', 'djinn', 'education', 'eland',
'elk', 'emoji', 'equipment', 'evidence', 'Faroese', 'feedback', 'fish', 'flounder', 'Foochowese',
'Furniture', 'furniture', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'gold',
'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', 'jackanapes', 'jedi',
'Kiplingese', 'knowledge', 'Kongoese', 'love', 'Lucchese', 'Luggage', 'mackerel', 'Maltese', 'metadata',
'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', 'nutrition', 'offspring',
'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'plankton', 'pliers', 'pokemon', 'police', 'Portuguese',
'proceedings', 'rabies', 'rain', 'rhinoceros', 'rice', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass',
'series', 'Shavese', 'shears', 'sheep', 'siemens', 'species', 'staff', 'swine', 'traffic',
'trousers', 'trout', 'tuna', 'us', 'Vermontese', 'Wenchowese', 'wheat', 'whiting', 'wildebeest', 'Yengeese'
);
/**
* Method cache array.
*
* @var array
*/
private static $cache = array();
/**
* The initial state of Inflector so reset() works.
*
* @var array
*/
private static $initialState = array();
/**
* Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
*/
public static function tableize(string $word) : string
{
return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word));
}
/**
* Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'.
*/
public static function classify(string $word) : string
{
return str_replace([' ', '_', '-'], '', ucwords($word, ' _-'));
}
/**
* Camelizes a word. This uses the classify() method and turns the first character to lowercase.
*/
public static function camelize(string $word) : string
{
return lcfirst(self::classify($word));
}
/**
* Uppercases words with configurable delimeters between words.
*
* Takes a string and capitalizes all of the words, like PHP's built-in
* ucwords function. This extends that behavior, however, by allowing the
* word delimeters to be configured, rather than only separating on
* whitespace.
*
* Here is an example:
* <code>
* <?php
* $string = 'top-o-the-morning to all_of_you!';
* echo \Doctrine\Common\Inflector\Inflector::ucwords($string);
* // Top-O-The-Morning To All_of_you!
*
* echo \Doctrine\Common\Inflector\Inflector::ucwords($string, '-_ ');
* // Top-O-The-Morning To All_Of_You!
* ?>
* </code>
*
* @param string $string The string to operate on.
* @param string $delimiters A list of word separators.
*
* @return string The string with all delimeter-separated words capitalized.
*/
public static function ucwords(string $string, string $delimiters = " \n\t\r\0\x0B-") : string
{
return ucwords($string, $delimiters);
}
/**
* Clears Inflectors inflected value caches, and resets the inflection
* rules to the initial values.
*/
public static function reset() : void
{
if (empty(self::$initialState)) {
self::$initialState = get_class_vars('Inflector');
return;
}
foreach (self::$initialState as $key => $val) {
if ($key !== 'initialState') {
self::${$key} = $val;
}
}
}
/**
* Adds custom inflection $rules, of either 'plural' or 'singular' $type.
*
* ### Usage:
*
* {{{
* Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables'));
* Inflector::rules('plural', array(
* 'rules' => array('/^(inflect)ors$/i' => '\1ables'),
* 'uninflected' => array('dontinflectme'),
* 'irregular' => array('red' => 'redlings')
* ));
* }}}
*
* @param string $type The type of inflection, either 'plural' or 'singular'
* @param array|iterable $rules An array of rules to be added.
* @param boolean $reset If true, will unset default inflections for all
* new rules that are being defined in $rules.
*
* @return void
*/
public static function rules(string $type, iterable $rules, bool $reset = false) : void
{
foreach ($rules as $rule => $pattern) {
if ( ! is_array($pattern)) {
continue;
}
if ($reset) {
self::${$type}[$rule] = $pattern;
} else {
self::${$type}[$rule] = ($rule === 'uninflected')
? array_merge($pattern, self::${$type}[$rule])
: $pattern + self::${$type}[$rule];
}
unset($rules[$rule], self::${$type}['cache' . ucfirst($rule)]);
if (isset(self::${$type}['merged'][$rule])) {
unset(self::${$type}['merged'][$rule]);
}
if ($type === 'plural') {
self::$cache['pluralize'] = self::$cache['tableize'] = array();
} elseif ($type === 'singular') {
self::$cache['singularize'] = array();
}
}
self::${$type}['rules'] = $rules + self::${$type}['rules'];
}
/**
* Returns a word in plural form.
*
* @param string $word The word in singular form.
*
* @return string The word in plural form.
*/
public static function pluralize(string $word) : string
{
if (isset(self::$cache['pluralize'][$word])) {
return self::$cache['pluralize'][$word];
}
if (!isset(self::$plural['merged']['irregular'])) {
self::$plural['merged']['irregular'] = self::$plural['irregular'];
}
if (!isset(self::$plural['merged']['uninflected'])) {
self::$plural['merged']['uninflected'] = array_merge(self::$plural['uninflected'], self::$uninflected);
}
if (!isset(self::$plural['cacheUninflected']) || !isset(self::$plural['cacheIrregular'])) {
self::$plural['cacheUninflected'] = '(?:' . implode('|', self::$plural['merged']['uninflected']) . ')';
self::$plural['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$plural['merged']['irregular'])) . ')';
}
if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) {
self::$cache['pluralize'][$word] = $regs[1] . $word[0] . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1);
return self::$cache['pluralize'][$word];
}
if (preg_match('/^(' . self::$plural['cacheUninflected'] . ')$/i', $word, $regs)) {
self::$cache['pluralize'][$word] = $word;
return $word;
}
foreach (self::$plural['rules'] as $rule => $replacement) {
if (preg_match($rule, $word)) {
self::$cache['pluralize'][$word] = preg_replace($rule, $replacement, $word);
return self::$cache['pluralize'][$word];
}
}
}
/**
* Returns a word in singular form.
*
* @param string $word The word in plural form.
*
* @return string The word in singular form.
*/
public static function singularize(string $word) : string
{
if (isset(self::$cache['singularize'][$word])) {
return self::$cache['singularize'][$word];
}
if (!isset(self::$singular['merged']['uninflected'])) {
self::$singular['merged']['uninflected'] = array_merge(
self::$singular['uninflected'],
self::$uninflected
);
}
if (!isset(self::$singular['merged']['irregular'])) {
self::$singular['merged']['irregular'] = array_merge(
self::$singular['irregular'],
array_flip(self::$plural['irregular'])
);
}
if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) {
self::$singular['cacheUninflected'] = '(?:' . implode('|', self::$singular['merged']['uninflected']) . ')';
self::$singular['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$singular['merged']['irregular'])) . ')';
}
if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) {
self::$cache['singularize'][$word] = $regs[1] . $word[0] . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1);
return self::$cache['singularize'][$word];
}
if (preg_match('/^(' . self::$singular['cacheUninflected'] . ')$/i', $word, $regs)) {
self::$cache['singularize'][$word] = $word;
return $word;
}
foreach (self::$singular['rules'] as $rule => $replacement) {
if (preg_match($rule, $word)) {
self::$cache['singularize'][$word] = preg_replace($rule, $replacement, $word);
return self::$cache['singularize'][$word];
}
}
self::$cache['singularize'][$word] = $word;
return $word;
}
}
+22
Ver Arquivo
@@ -0,0 +1,22 @@
<?php
namespace Embed\Adapters;
use Embed\Http\Response;
/**
* Adapter to provide information from Vimeo.
* Required when Vimeo returns a 403 status code.
*/
class Vimeo extends Webpage
{
/**
* {@inheritdoc}
*/
public static function check(Response $response)
{
return $response->isValid([200, 403]) && $response->getUrl()->match([
'vimeo.com/*',
]);
}
}
+9
Ver Arquivo
@@ -0,0 +1,9 @@
<?php
namespace Embed\Providers\OEmbed;
class Vimeo extends EndPoint implements EndPointInterface
{
protected static $pattern = ['vimeo.com/*'];
protected static $endPoint = 'https://vimeo.com/api/oembed.json';
}
+6
Ver Arquivo
@@ -9,6 +9,12 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
. Internal change
==========================
4.12.0, released 2019-10-27
! PHP 7.4 is supported, thank you Witold Wasiczko, Mateuz Turcza and
Edi Modrić
- PHPDocs for HTMLModule::addElement() and Bool attr are fixed (thanks
Mateusz)
4.11.0, released 2019-07-14
# SafeScripting now matches case-sensitively against its whitelist (previously it was
case-insensitive.) Thanks Dimitri Gritsajuk <gritsajuk.dimitri@gmail.com>
+1 -1
Ver Arquivo
@@ -1 +1 @@
4.11.0
4.12.0
+2 -7
Ver Arquivo
@@ -1,7 +1,2 @@
HTML Purifier 4.11.x is a maintenance release, collecting a year
and a half of accumulated bug fixes. Most notable fixes are
compatibility with PHP 7.3, and case-sensitive matching for
the SafeScripting whitelist. There are a number small feature
enhancements, including an expanded supported color list,
initial and inherit support for {min-,max-,}{width,height}
and multidimensional array support for purifyArray.
HTML Purifier 4.12.x is a maintenance release which makes
compatibility fixes for PHP 7.4.
@@ -7,7 +7,7 @@
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
* FILE, changes will be overwritten the next time the script is run.
*
* @version 4.11.0
* @version 4.12.0
*
* @warning
* You must *not* include any other HTML Purifier files before this file,
+3 -3
Ver Arquivo
@@ -19,7 +19,7 @@
*/
/*
HTML Purifier 4.11.0 - Standards Compliant HTML Filtering
HTML Purifier 4.12.0 - Standards Compliant HTML Filtering
Copyright (C) 2006-2008 Edward Z. Yang
This library is free software; you can redistribute it and/or
@@ -58,12 +58,12 @@ class HTMLPurifier
* Version of HTML Purifier.
* @type string
*/
public $version = '4.11.0';
public $version = '4.12.0';
/**
* Constant with version of HTML Purifier.
*/
const VERSION = '4.11.0';
const VERSION = '4.12.0';
/**
* Global configuration object.
@@ -7,7 +7,7 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
{
/**
* @type bool
* @type string
*/
protected $name;
@@ -17,7 +17,7 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
public $minimized = true;
/**
* @param bool $name
* @param bool|string $name
*/
public function __construct($name = false)
{
@@ -45,7 +45,7 @@ class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef
protected function _compileRegex()
{
$raw = str_replace(' ', '', $this->dtd_regex);
if ($raw{0} != '(') {
if ($raw[0] != '(') {
$raw = "($raw)";
}
$el = '[#a-zA-Z0-9_.-]+';
+1 -1
Ver Arquivo
@@ -21,7 +21,7 @@ class HTMLPurifier_Config
* HTML Purifier's version
* @type string
*/
public $version = '4.11.0';
public $version = '4.12.0';
/**
* Whether or not to automatically finalize
+1 -1
Ver Arquivo
@@ -159,7 +159,7 @@ class HTMLPurifier_Encoder
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
$in = ord($str{$i});
$in = ord($str[$i]);
$char .= $str[$i]; // append byte to char
if (0 == $mState) {
// When mState is zero we expect either a US-ASCII character
@@ -132,9 +132,9 @@ class HTMLPurifier_HTMLModule
* @param string $element Name of element to add
* @param string|bool $type What content set should element be registered to?
* Set as false to skip this step.
* @param string $contents Allowed children in form of:
* @param string|HTMLPurifier_ChildDef $contents Allowed children in form of:
* "$content_model_type: $content_model"
* @param array $attr_includes What attribute collections to register to
* @param array|string $attr_includes What attribute collections to register to
* element?
* @param array $attr What unique attributes does the element define?
* @see HTMLPurifier_ElementDef:: for in-depth descriptions of these parameters.
@@ -74,7 +74,12 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
}
set_error_handler(array($this, 'muteErrorHandler'));
$doc->loadHTML($html, $options);
// loadHTML() fails on PHP 5.3 when second parameter is given
if ($options) {
$doc->loadHTML($html, $options);
} else {
$doc->loadHTML($html);
}
restore_error_handler();
$body = $doc->getElementsByTagName('html')->item(0)-> // <html>
@@ -75,7 +75,7 @@ class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform
if (isset($attr['size'])) {
// normalize large numbers
if ($attr['size'] !== '') {
if ($attr['size']{0} == '+' || $attr['size']{0} == '-') {
if ($attr['size'][0] == '+' || $attr['size'][0] == '-') {
$size = (int)$attr['size'];
if ($size < -2) {
$attr['size'] = '-2';
+1
Ver Arquivo
@@ -0,0 +1 @@
finalized
+2
Ver Arquivo
@@ -0,0 +1,2 @@
/vendor/
/composer.lock
+57
Ver Arquivo
@@ -0,0 +1,57 @@
language: php
matrix:
include:
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
env:
- ENABLE_XDEBUG=true
- php: 7.1
env:
- ENABLE_DEVTOOLS=true
- php: nightly
- php: hhvm-3.12
sudo: required
dist: trusty
group: edge
- php: hhvm
sudo: required
dist: trusty
group: edge
allow_failures:
- php: nightly
- php: hhvm-3.12
- php: hhvm
fast_finish: true
os:
- linux
notifications:
irc: "chat.freenode.net#hoaproject"
sudo: false
env:
global:
- secure: "AAAAB3NzaC1yc2EAAAADAQABAAAAgQCIakvIVS1WjvgR+RNL7Aqmd6c5sgzW1rx2afvQlnTdhowy6npaOB+YyGnwlQj0N6XsU4LBjsycwCCW9jufyxBMH0FXJsaDiLQ8cI6CYWiHyEr28FDHVJbtyoclwWGOd273L5185DSisVo73RQeCZmuWiCDHEt8MGSQUs8/e5ySbw=="
cache:
directories:
- vendor/
before_script:
- export PATH="$PATH:$HOME/.composer/vendor/bin"
- if [[ ! $ENABLE_XDEBUG ]]; then
phpenv config-rm xdebug.ini || echo "ext-xdebug is not available, cannot remove it.";
fi
script:
- composer install
- vendor/bin/hoa test:run
- if [[ $ENABLE_DEVTOOLS ]]; then
composer global require friendsofphp/php-cs-fixer;
vendor/bin/hoa devtools:cs --diff --dry-run .;
fi
+223
Ver Arquivo
@@ -0,0 +1,223 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Bin;
use Hoa\Console;
/**
* Class Hoa\Console\Bin\Termcap.
*
* Get terminal capabilities.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Termcap extends Console\Dispatcher\Kit
{
/**
* Options description.
*
* @var array
*/
protected $options = [
['terminal', Console\GetOption::NO_ARGUMENT, 't'],
['file', Console\GetOption::NO_ARGUMENT, 'f'],
['has', Console\GetOption::REQUIRED_ARGUMENT, 'H'],
['count', Console\GetOption::REQUIRED_ARGUMENT, 'c'],
['get', Console\GetOption::REQUIRED_ARGUMENT, 'g'],
['booleans', Console\GetOption::NO_ARGUMENT, 'b'],
['numbers', Console\GetOption::NO_ARGUMENT, 'n'],
['strings', Console\GetOption::NO_ARGUMENT, 's'],
['help', Console\GetOption::NO_ARGUMENT, 'h'],
['help', Console\GetOption::NO_ARGUMENT, '?']
];
/**
* The entry method.
*
* @return void
*/
public function main()
{
$tput = Console::getTput();
while (false !== $c = $this->getOption($v)) {
switch ($c) {
case 't':
echo $tput->getTerm();
return;
case 'f':
echo $tput->getTerminfo();
return;
case 'H':
echo $tput->has($v) ? 1 : 0;
return;
case 'c':
echo $tput->count($v);
return;
case 'g':
echo $tput->get($v);
return;
case 'b':
$informations = $tput->getInformations();
static::format($informations['booleans']);
return;
case 'n':
$informations = $tput->getInformations();
static::format($informations['numbers']);
return;
case 's':
$informations = $tput->getInformations();
static::format($informations['strings']);
return;
case '__ambiguous':
$this->resolveOptionAmbiguity($v);
break;
case 'h':
case '?':
default:
return $this->usage();
}
}
return $this->usage();
}
/**
* The command usage.
*
* @return void
*/
public function usage()
{
echo
'Usage : console:termcap', "\n",
'Options :', "\n",
$this->makeUsageOptionsList([
't' => 'Get terminal name.',
'f' => 'Get path to the terminfo file.',
'H' => 'Get value of a boolean capability.',
'c' => 'Get value of a number capability.',
'g' => 'Get value of a string capability.',
'b' => 'Get all boolean capabilites.',
'n' => 'Get all number capabilites.',
's' => 'Get all string capabilites.',
'help' => 'This help.'
]), "\n",
'Examples:', "\n",
' $ hoa console:termcap --count max_colors', "\n",
' $ TERM=vt200 hoa console:termcap --has back_color_erase', "\n";
return;
}
/**
* Format a collection of informations.
*
* @param array $data Data.
* @return void
*/
public static function format(array $data)
{
$max = 0;
foreach ($data as $key => $_) {
if ($max < ($handle = strlen($key))) {
$max = $handle;
}
}
$format = '%-' . ($max + 1) . 's: %s' . "\n";
foreach ($data as $key => $value) {
printf(
$format,
$key,
is_bool($value)
? ($value ? 'true' : 'false')
: (is_string($value)
? str_replace(
[
"\033",
"\n",
ord(0xa),
"\r",
"\b",
"\f",
"\0"
],
[
'\e',
'\n',
'\l',
'\r',
'\b',
'\f',
'\0'
],
$value
)
: $value)
);
}
return;
}
}
__halt_compiler();
Terminal capabilities.
+150
Ver Arquivo
@@ -0,0 +1,150 @@
# 3.17.05.02
* Tput: Deterministic order for `name` and `desc…`. (Ivan Enderlin, 2017-03-08T09:26:31+01:00)
* CI: Set up Travis. (Ivan Enderlin, 2017-03-08T08:58:58+01:00)
# 3.17.01.11
* Quality: Happy new year! (Alexis von Glasow, 2017-01-10T12:48:50+01:00)
# 3.16.11.08
* Documentation: Add the “Learn more” link. (Ivan Enderlin, 2016-10-14T23:40:05+02:00)
* Documentation: New `README.md` file. (Ivan Enderlin, 2016-10-14T23:29:22+02:00)
* Documentation: Fix `docs` and `source` links. (Ivan Enderlin, 2016-10-05T20:28:46+02:00)
* Documentation: Update `support` properties. (Ivan Enderlin, 2016-10-05T20:12:17+02:00)
* Documentation: Use TLS on `central.hoa`. (Ivan Enderlin, 2016-09-09T14:59:03+02:00)
# 3.16.09.06
* Documentation: Fix API documentation. (Alexis von Glasow, 2016-07-11T00:01:57+02:00)
* Quality: Fix example CS in the `README.md`. (Ivan Enderlin, 2016-07-01T16:37:50+02:00)
* Autocompleter: Force to work on a sub-line. (Ivan Enderlin, 2016-05-22T15:46:58+02:00)
* Quality: Fix methods ordering. (Ivan Enderlin, 2016-02-24T07:28:41+01:00)
* Implement `Hoa\Console\Output::getStream` which is now required by `Hoa\Stream\IStream\Out`. (Metalaka, 2015-11-01T20:15:43+01:00)
* Fix phpDoc. (Metalaka, 2015-11-01T20:13:12+01:00)
# 3.16.01.14
* Composer: New stable libraries. (Ivan Enderlin, 2016-01-14T21:45:35+01:00)
# 3.16.01.11
* Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:26+01:00)
* Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T08:59:18+01:00)
* Core: Remove `Hoa\Core`. (Ivan Enderlin, 2016-01-09T08:08:44+01:00)
* Consistency: Update `registerShutdownFunction`. (Ivan Enderlin, 2015-12-09T06:58:00+01:00)
* Consistency: Remove `from` calls. (Ivan Enderlin, 2015-12-09T06:35:35+01:00)
* Consistency: Update `registerShutdownFunction`. (Ivan Enderlin, 2015-12-08T23:41:11+01:00)
* Event: Remove `event` calls. (Ivan Enderlin, 2015-12-08T22:48:06+01:00)
* Consistency: Use `Hoa\Consistency`. (Ivan Enderlin, 2015-12-08T11:01:36+01:00)
* Event: Use `Hoa\Event`. (Ivan Enderlin, 2015-11-23T21:48:33+01:00)
* Exception: Use `Hoa\Exception`. (Ivan Enderlin, 2015-11-20T07:17:38+01:00)
* Test: Add specificity for Windows. (Ivan Enderlin, 2015-11-10T13:29:22+01:00)
* Test: Write test suite for `…completer\Aggregate`. (Ivan Enderlin, 2015-11-10T08:45:10+01:00)
* Test: Write test suite for `…e\Readline\Password`. (Ivan Enderlin, 2015-10-29T23:00:01+01:00)
* Test: Use `beforeTestMethod` instead of `setUp`. (Ivan Enderlin, 2015-10-29T13:41:12+01:00)
* Terminfo: Add the `xterm-256color` database. (Ivan Enderlin, 2015-10-29T13:40:30+01:00)
* Test: Write test suite for `…Autocompleter\Path`. (Ivan Enderlin, 2015-10-29T08:46:04+01:00)
* Test: Write test suite for `…Autocompleter\Word`. (Ivan Enderlin, 2015-10-29T08:10:47+01:00)
* Readline: Use `Console::getInput`. (Ivan Enderlin, 2015-10-29T07:38:13+01:00)
* Test: Write test suite for `Hoa\Console\GetOption`. (Ivan Enderlin, 2015-10-29T07:37:57+01:00)
* GetOption: Reset the `$optionValue` all the time. (Ivan Enderlin, 2015-10-29T07:37:37+01:00)
* CS: Clean namespaces and fix some styles. (Ivan Enderlin, 2015-10-28T07:56:40+01:00)
* Test: Write test suite for `Hoa\Console\Mouse`. (Ivan Enderlin, 2015-10-28T07:54:38+01:00)
* Mouse: Untrack when tracking fails. (Ivan Enderlin, 2015-10-28T07:52:48+01:00)
* Mouse: New constants representing pointer codes. (Ivan Enderlin, 2015-10-28T07:50:50+01:00)
* Test: Write test suite for `Hoa\Console\Window`. (Ivan Enderlin, 2015-10-27T10:12:44+01:00)
* Window: The constructor must be private. (Ivan Enderlin, 2015-10-27T09:32:54+01:00)
* Test: Write test suite for `Hoa\Console\Cursor`. (Ivan Enderlin, 2015-10-26T13:37:53+01:00)
* Test: Write test suite for `Hoa\Console\Tput`. (Ivan Enderlin, 2015-10-26T13:37:33+01:00)
* Test: Write test suite for `Hoa\Console\Parser`. (Ivan Enderlin, 2015-10-26T13:37:13+01:00)
* Test: Write test suite for `Hoa\Console`. (Ivan Enderlin, 2015-10-26T13:36:42+01:00)
* Console: Add the `setTput` static method. (Ivan Enderlin, 2015-10-26T13:34:37+01:00)
* Console: Ensure `STDIN` is defined before using it. (Ivan Enderlin, 2015-10-26T13:34:02+01:00)
* Tput: If no terminfo found, fallback to `xterm`. (Ivan Enderlin, 2015-10-28T14:07:18+01:00)
* Tput: Check that `TERM` is set **and** not empty. (Ivan Enderlin, 2015-10-28T14:06:36+01:00)
* Update API documentation. (Ivan Enderlin, 2015-10-26T08:39:15+01:00)
* Console: Solve `stty -f` vs. `stty -F` issue. (Ivan Enderlin, 2015-10-22T09:29:42+02:00)
* Input: Add the `getStream` method. (Ivan Enderlin, 2015-10-22T08:34:02+02:00)
* Test the `Input` class. (Ivan Enderlin, 2015-10-21T17:04:52+02:00)
* Create the `Input` interface. (Ivan Enderlin, 2015-09-24T07:44:50+02:00)
* `stty` uses `/dev/tty` instead of the std. input. (Ivan Enderlin, 2015-09-24T07:16:48+02:00)
* Advanced interaction can be forced. (Ivan Enderlin, 2015-09-24T07:15:26+02:00)
* Fix, doc. (Metalaka, 2015-10-20T21:58:00+02:00)
* Improve Output behavior. (Metalaka, 2015-10-20T13:24:48+02:00)
* Test the `Output` classes. (Ivan Enderlin, 2015-10-14T16:49:53+02:00)
* Arrays are “var exported” on the output. (Ivan Enderlin, 2015-10-14T07:54:29+02:00)
* `Window` uses `Output` & multiplexer support. (Ivan Enderlin, 2015-10-14T07:41:33+02:00)
* Consider multiplexer while writing on the output. (Ivan Enderlin, 2015-10-14T07:37:29+02:00)
* Use `Hoa\Console::getOutput` when possible. (Ivan Enderlin, 2015-09-30T17:23:28+02:00)
* Introduce the `Output` object. (Ivan Enderlin, 2015-09-30T16:53:13+02:00)
* Format API documentation. (Ivan Enderlin, 2015-09-30T16:53:08+02:00)
* Update API documentation. (Ivan Enderlin, 2015-09-30T16:48:30+02:00)
* Add TMUX(1) support for `Window::copy`. (Ivan Enderlin, 2015-09-30T09:36:38+02:00)
* Add the `Console::isTmuxRunning` method. (Ivan Enderlin, 2015-09-30T09:29:16+02:00)
* Add a `.gitignore` file. (Stéphane HULARD, 2015-08-03T11:23:22+02:00)
# 2.15.07.27
* Bip when an “invalid” character is pressed. (Ivan Enderlin, 2015-07-27T08:30:51+02:00)
* Print character only if printable. (Ivan Enderlin, 2015-07-27T08:23:01+02:00)
* Optimize the `_readline` control flow graph. (Ivan Enderlin, 2015-07-27T08:20:50+02:00)
# 2.15.07.23
* More detailed API documentation. (Ivan Enderlin, 2015-07-16T08:12:43+02:00)
* Update the API documentation. (Ivan Enderlin, 2015-07-16T07:47:55+02:00)
* Fix phpDoc. (Metalaka, 2015-07-15T18:01:57+02:00)
# 2.15.05.29
* Move to `Hoa\Ustring`. (Ivan Enderlin, 2015-05-29T14:50:28+02:00)
* Move to PSR-1 and PSR-2. (Ivan Enderlin, 2015-05-13T10:30:22+02:00)
# 2.15.03.19
* Add timeouts on `Window::getTitle` and `Window::getLabel` for tmux. (Ivan Enderlin, 2015-03-19T09:46:00+01:00)
# 2.15.03.06
* Fix a bug in the ambiguity resolver. (Ivan Enderlin, 2015-03-06T10:48:55+01:00)
# 2.15.02.18
* Add the CHANGELOG.md file. (Ivan Enderlin, 2015-02-18T08:59:24+01:00)
* Use `Hoa\Dispatcher\ClassMethod` dispatcher in the documentation. (Ivan Enderlin, 2015-02-11T10:49:19+01:00)
* Fix a CS. (Ivan Enderlin, 2015-02-10T17:03:09+01:00)
* Fix links in the documentation. (Ivan Enderlin, 2015-01-23T19:23:57+01:00)
* Happy new year! (Ivan Enderlin, 2015-01-05T14:21:41+01:00)
# 2.15.01.04
* Inverse `$x` and `$y` in `Cursor::moveTo`. (Ivan Enderlin, 2015-01-04T15:10:08+01:00)
* Allows to specify the term in `Tput::getTerminfo`. (Ivan Enderlin, 2015-01-04T15:08:59+01:00)
* Remove `from`/`import` and update to PHP5.4. (Ivan Enderlin, 2015-01-04T15:03:40+01:00)
# 2.14.12.10
* Move to PSR-4. (Ivan Enderlin, 2014-12-09T13:41:35+01:00)
# 2.14.11.26
* Format the `composer.json` file. (Ivan Enderlin, 2014-11-25T14:15:31+01:00)
* Require `hoa/test`. (Alexis von Glasow, 2014-11-25T13:49:37+01:00)
# 2.14.11.09
* Add links around `hoa://` in the documentation. (Ivan Enderlin, 2014-09-26T10:37:52+02:00)
# 2.14.09.23
* Format code. #mania (Ivan Enderlin, 2014-09-23T16:17:08+02:00)
* Add `branch-alias`. (Stéphane PY, 2014-09-23T11:55:58+02:00)
# 2.14.09.17
* Drop PHP5.3. (Ivan Enderlin, 2014-09-17T17:23:29+02:00)
* Add the installation section. (Ivan Enderlin, 2014-09-17T17:23:10+02:00)
(first snapshot)
+78
Ver Arquivo
@@ -0,0 +1,78 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Chrome;
use Hoa\Console;
/**
* Class \Hoa\Console\Chrome\Editor.
*
* Start an editor.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Editor
{
/**
* Open an editor.
*
* @param string $file File to open.
* @param string $editor Editor to use ($_SERVER['EDITOR'] by
* default).
* @return string
*/
public static function open($file = '', $editor = null)
{
if (null === $editor) {
if (isset($_SERVER['EDITOR'])) {
$editor = $_SERVER['EDITOR'];
} else {
$editor = 'vi';
}
}
if (!empty($file)) {
$file = escapeshellarg($file);
}
return Console\Processus::execute(
$editor . ' ' . $file . ' > `tty` < `tty`',
false
);
}
}
+51
Ver Arquivo
@@ -0,0 +1,51 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Chrome;
use Hoa\Console;
/**
* Class \Hoa\Console\Chrome\Exception.
*
* Extending the \Hoa\Console\Exception class.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Exception extends Console\Exception
{
}
+132
Ver Arquivo
@@ -0,0 +1,132 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Chrome;
use Hoa\Console;
/**
* Class \Hoa\Console\Chrome\Pager.
*
* Use a pager for the output buffer. Example:
*
* ob_start('Hoa\Console\Chrome\Pager::less');
* echo file_get_contents(__FILE__);
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Pager
{
/**
* Represent LESS(1).
*
* @const string
*/
const LESS = 'less';
/**
* Represent MORE(1).
*
* @const string
*/
const MORE = 'more';
/**
* Use less.
*
* @param string $output Output (from the output buffer).
* @param int $mode Mode (from the output buffer).
* @return string
*/
public static function less($output, $mode)
{
return self::pager($output, $mode, self::LESS);
}
/**
* Use more.
*
* @param string $output Output (from the output buffer).
* @param int $mode Mode (from the output buffer).
* @return string
*/
public static function more($output, $mode)
{
return self::pager($output, $mode, self::MORE);
}
/**
* Use pager set in the environment (i.e. $_ENV['PAGER']).
*
* @param string $output Output (from the output buffer).
* @param int $mode Mode (from the output buffer).
* @param string $type Type. Please, see self::LESS or self::MORE.
* @return string
*/
public static function pager($output, $mode, $type = null)
{
static $process = null;
if ($mode & PHP_OUTPUT_HANDLER_START) {
$pager
= null !== $type
? Console\Processus::locate($type)
: (isset($_ENV['PAGER']) ? $_ENV['PAGER'] : null);
if (null === $pager) {
return $output;
}
$process = new Console\Processus(
$pager,
null,
[['pipe', 'r']]
);
$process->open();
}
$process->writeAll($output);
if ($mode & PHP_OUTPUT_HANDLER_FINAL) {
$process->close();
}
return null;
}
}
+417
Ver Arquivo
@@ -0,0 +1,417 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Chrome;
use Hoa\Console;
/**
* Class \Hoa\Console\Chrome\Text.
*
* This class builts the text layout.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Text
{
/**
* Align the text to left.
*
* @const int
*/
const ALIGN_LEFT = 0;
/**
* Align the text to right.
*
* @const int
*/
const ALIGN_RIGHT = 1;
/**
* Align the text to center.
*
* @const int
*/
const ALIGN_CENTER = 2;
/**
* Colorize a portion of a text.
* It is kind of a shortcut of \Hoa\Console\Color.
*
* @param string $text Text.
* @param string $attributesBefore Style to apply.
* @param string $attributesAfter Reset style.
* @return string
*/
public static function colorize(
$text,
$attributesBefore,
$attributesAfter = 'normal'
) {
ob_start();
Console\Cursor::colorize($attributesBefore);
Console::getOutput()->writeAll($text);
Console\Cursor::colorize($attributesAfter);
$out = ob_get_contents();
ob_end_clean();
return $out;
}
/**
* Built column from an array.
* The array has this structure :
* [
* ['Firstname', 'Lastname', 'Love', 'Made' ],
* ['Ivan', 'Enderlin', 'Hoa' ],
* ['Rasmus', 'Lerdorf' ],
* [null, 'Berners-Lee', null, 'The Web']
* ]
* The cell can have a new-line character (\n).
* The column can have a global alignement, a horizontal and a vertical
* padding (this horizontal padding is actually the right padding), and a
* separator.
* Separator has this form : 'first-column|second-column|third-column|…'.
* For example : '|: ', will set a ': ' between the first and second column,
* and nothing for the other.
*
* @param Array $line The table represented by an array
* (see the documentation).
* @param int $alignement The global alignement of the text
* in cell.
* @param int $horizontalPadding The horizontal padding (right
* padding).
* @param int $verticalPadding The vertical padding.
* @param string $separator String where each character is a
* column separator.
* @return string
*/
public static function columnize(
array $line,
$alignement = self::ALIGN_LEFT,
$horizontalPadding = 2,
$verticalPadding = 0,
$separator = null
) {
if (empty($line)) {
return '';
}
$separator = explode('|', $separator);
$nbColumn = 0;
$nbLine = count($line);
$xtraWidth = 2 * ($verticalPadding + 2); // + separator
// Get the number of column.
foreach ($line as $key => &$column) {
if (!is_array($column)) {
$column = [$column];
}
$handle = count($column);
$handle > $nbColumn and $nbColumn = $handle;
}
$xtraWidth += $horizontalPadding * $nbColumn;
// Get the column width.
$columnWidth = array_fill(0, $nbColumn, 0);
for ($e = 0; $e < $nbColumn; $e++) {
for ($i = 0; $i < $nbLine; $i++) {
if (!isset($line[$i][$e])) {
continue;
}
$handle = self::getMaxLineWidth($line[$i][$e]);
$handle > $columnWidth[$e] and $columnWidth[$e] = $handle;
}
}
// If the sum of each column is greater than the window width, we reduce
// all greaters columns.
$window = Console\Window::getSize();
$envWindow = $window['x'];
while ($envWindow <= ($cWidthSum = $xtraWidth + array_sum($columnWidth))) {
$diff = $cWidthSum - $envWindow;
$max = max($columnWidth) - $xtraWidth;
$newWidth = $max - $diff;
$i = array_search(max($columnWidth), $columnWidth);
$columnWidth[$i] = $newWidth;
foreach ($line as $key => &$c) {
if (isset($c[$i])) {
$c[$i] = self::wordwrap($c[$i], $newWidth);
}
}
}
// Manage the horizontal right padding.
$columnWidth = array_map(
function ($x) use ($horizontalPadding) {
return $x + 2 * $horizontalPadding;
},
$columnWidth
);
// Prepare the new table, i.e. a new line (\n) must be a new line in the
// array (structurally meaning).
$newLine = [];
foreach ($line as $key => $plpl) {
$i = self::getMaxLineNumber($plpl);
while ($i-- >= 0) {
$newLine[] = array_fill(0, $nbColumn, null);
}
}
$yek = 0;
foreach ($line as $key => $col) {
foreach ($col as $kkey => $value) {
if (false === strpos($value, "\n")) {
$newLine[$yek][$kkey] = $value;
continue;
}
foreach (explode("\n", $value) as $foo => $oof) {
$newLine[$yek + $foo][$kkey] = $oof;
}
}
$i = self::getMaxLineNumber($col);
$i > 0 and $yek += $i;
$yek++;
}
// Place the column separator.
foreach ($newLine as $key => $col) {
foreach ($col as $kkey => $value) {
if (isset($separator[$kkey])) {
$newLine[$key][$kkey] =
$separator[$kkey] .
str_replace(
"\n",
"\n" . $separator[$kkey],
$value
);
}
}
}
$line = $newLine;
unset($newLine);
// Complete the table with empty cells.
foreach ($line as $key => &$column) {
$handle = count($column);
if ($nbColumn - $handle > 0) {
$column += array_fill($handle, $nbColumn - $handle, null);
}
}
// Built!
$out = null;
$dash = $alignement === self::ALIGN_LEFT ? '-' : '';
foreach ($line as $key => $handle) {
$format = null;
foreach ($handle as $i => $hand) {
if (preg_match_all('#(\\e\[[0-9]+m)#', $hand, $match)) {
$a = $columnWidth[$i];
foreach ($match as $m) {
$a += strlen($m[1]);
}
$format .= '%' . $dash . ($a + floor(count($match) / 2)) . 's';
} else {
$format .= '%' . $dash . $columnWidth[$i] . 's';
}
}
$format .= str_repeat("\n", $verticalPadding + 1);
array_unshift($handle, $format);
$out .= call_user_func_array('sprintf', $handle);
}
return $out;
}
/**
* Align a text according a “layer”. The layer width is given in arguments.
*
* @param string $text The text.
* @param int $alignement The text alignement.
* @param int $width The layer width.
* @return string
*/
public static function align(
$text,
$alignement = self::ALIGN_LEFT,
$width = null
) {
if (null === $width) {
$window = Console\Window::getSize();
$width = $window['x'];
}
$out = null;
switch ($alignement) {
case self::ALIGN_LEFT:
$out .= sprintf('%-' . $width . 's', self::wordwrap($text, $width));
break;
case self::ALIGN_CENTER:
foreach (explode("\n", self::wordwrap($text, $width)) as $key => $value) {
$out .= str_repeat(' ', ceil(($width - strlen($value)) / 2)) .
$value . "\n";
}
break;
case self::ALIGN_RIGHT:
default:
foreach (explode("\n", self::wordwrap($text, $width)) as $key => $value) {
$out .= sprintf('%' . $width . 's' . "\n", $value);
}
break;
}
return $out;
}
/**
* Get the maximum line width.
*
* @param mixed $lines The line (or group of lines).
* @return int
*/
protected static function getMaxLineWidth($lines)
{
if (!is_array($lines)) {
$lines = [$lines];
}
$width = 0;
foreach ($lines as $foo => $line) {
foreach (explode("\n", $line) as $fooo => $lin) {
$lin = preg_replace('#\\e\[[0-9]+m#', '', $lin);
strlen($lin) > $width and $width = strlen($lin);
}
}
return $width;
}
/**
* Get the maximum line number (count the new-line character).
*
* @param mixed $lines The line (or group of lines).
* @return int
*/
protected static function getMaxLineNumber($lines)
{
if (!is_array($lines)) {
$lines = [$lines];
}
$number = 0;
foreach ($lines as $foo => $line) {
substr_count($line, "\n") > $number and
$number = substr_count($line, "\n");
}
return $number;
}
/**
* My own wordwrap (just force the wordwrap() $cut parameter)..
*
* @param string $text Text to wrap.
* @param int $width Line width.
* @param string $break String to make the break.
* @return string
*/
public static function wordwrap($text, $width = null, $break = "\n")
{
if (null === $width) {
$window = Console\Window::getSize();
$width = $window['x'];
}
return wordwrap($text, $width, $break, true);
}
/**
* Underline with a special string.
*
* @param string $text The text to underline.
* @param string $pattern The string used to underline.
* @return string
*/
public static function underline($text, $pattern = '*')
{
$text = explode("\n", $text);
$card = strlen($pattern);
foreach ($text as $key => &$value) {
$i = -1;
$max = strlen($value);
while ($value{++$i} == ' ' && $i < $max);
$underline =
str_repeat(' ', $i) .
str_repeat($pattern, strlen(trim($value)) / $card) .
str_repeat(' ', strlen($value) - $i - strlen(trim($value)));
$value .= "\n" . $underline;
}
return implode("\n", $text);
}
}
+421
Ver Arquivo
@@ -0,0 +1,421 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Consistency;
/**
* Class \Hoa\Console.
*
* A set of utils and helpers about the console.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Console
{
/**
* Pipe mode: FIFO.
*
* @var int
*/
const IS_FIFO = 0;
/**
* Pipe mode: character.
*
* @var int
*/
const IS_CHARACTER = 1;
/**
* Pipe mode: directory.
*
* @var int
*/
const IS_DIRECTORY = 2;
/**
* Pipe mode: block.
*
* @var int
*/
const IS_BLOCK = 3;
/**
* Pipe mode: regular.
*
* @var int
*/
const IS_REGULAR = 4;
/**
* Pipe mode: link.
*
* @var int
*/
const IS_LINK = 5;
/**
* Pipe mode: socket.
*
* @var int
*/
const IS_SOCKET = 6;
/**
* Pipe mode: whiteout.
*
* @var int
*/
const IS_WHITEOUT = 7;
/**
* Advanced interaction is on.
*
* @var bool
*/
private static $_advanced = null;
/**
* Previous STTY configuration.
*
* @var string
*/
private static $_old = null;
/**
* Mode.
*
* @var array
*/
protected static $_mode = [];
/**
* Input.
*
* @var \Hoa\Console\Input
*/
protected static $_input = null;
/**
* Output.
*
* @var \Hoa\Console\Output
*/
protected static $_output = null;
/**
* Tput.
*
* @var \Hoa\Console\Tput
*/
protected static $_tput = null;
/**
* Prepare the environment for advanced interactions.
*
* @param bool $force Force it if STDIN is not direct.
* @return bool
*/
public static function advancedInteraction($force = false)
{
if (null !== self::$_advanced) {
return self::$_advanced;
}
if (OS_WIN) {
return self::$_advanced = false;
}
if (false === $force &&
true === defined('STDIN') &&
false === self::isDirect(STDIN)) {
return self::$_advanced = false;
}
self::$_old = Processus::execute('stty -g < /dev/tty', false);
Processus::execute('stty -echo -icanon min 1 time 0 < /dev/tty', false);
return self::$_advanced = true;
}
/**
* Restore previous interaction options.
*
* @return void
*/
public static function restoreInteraction()
{
if (null === self::$_old) {
return;
}
Processus::execute('stty ' . self::$_old . ' < /dev/tty', false);
return;
}
/**
* Get mode of a certain pipe.
* Inspired by sys/stat.h.
*
* @param resource $pipe Pipe.
* @return int
*/
public static function getMode($pipe = STDIN)
{
$_pipe = (int) $pipe;
if (isset(self::$_mode[$_pipe])) {
return self::$_mode[$_pipe];
}
$stat = fstat($pipe);
switch ($stat['mode'] & 0170000) {
// named pipe (fifo).
case 0010000:
$mode = self::IS_FIFO;
break;
// character special.
case 0020000:
$mode = self::IS_CHARACTER;
break;
// directory.
case 0040000:
$mode = self::IS_DIRECTORY;
break;
// block special.
case 0060000:
$mode = self::IS_BLOCK;
break;
// regular.
case 0100000:
$mode = self::IS_REGULAR;
break;
// symbolic link.
case 0120000:
$mode = self::IS_LINK;
break;
// socket.
case 0140000:
$mode = self::IS_SOCKET;
break;
// whiteout.
case 0160000:
$mode = self::IS_WHITEOUT;
break;
default:
$mode = -1;
}
return self::$_mode[$_pipe] = $mode;
}
/**
* Check whether a certain pipe is a character device (keyboard, screen
* etc.).
* For example:
* $ php Mode.php
* In this case, self::isDirect(STDOUT) will return true.
*
* @param resource $pipe Pipe.
* @return bool
*/
public static function isDirect($pipe)
{
return self::IS_CHARACTER === self::getMode($pipe);
}
/**
* Check whether a certain pipe is a pipe.
* For example:
* $ php Mode.php | foobar
* In this case, self::isPipe(STDOUT) will return true.
*
* @param resource $pipe Pipe.
* @return bool
*/
public static function isPipe($pipe)
{
return self::IS_FIFO === self::getMode($pipe);
}
/**
* Check whether a certain pipe is a redirection.
* For example:
* $ php Mode.php < foobar
* In this case, self::isRedirection(STDIN) will return true.
*
* @param resource $pipe Pipe.
* @return bool
*/
public static function isRedirection($pipe)
{
$mode = self::getMode($pipe);
return
self::IS_REGULAR === $mode ||
self::IS_DIRECTORY === $mode ||
self::IS_LINK === $mode ||
self::IS_SOCKET === $mode ||
self::IS_BLOCK === $mode;
}
/**
* Set input layer.
*
* @param \Hoa\Console\Input $input Input.
* @return \Hoa\Console\Input
*/
public static function setInput(Input $input)
{
$old = static::$_input;
static::$_input = $input;
return $old;
}
/**
* Get input layer.
*
* @return \Hoa\Console\Input
*/
public static function getInput()
{
if (null === static::$_input) {
static::$_input = new Input();
}
return static::$_input;
}
/**
* Set output layer.
*
* @param \Hoa\Console\Output $output Output.
* @return \Hoa\Console\Output
*/
public static function setOutput(Output $output)
{
$old = static::$_output;
static::$_output = $output;
return $old;
}
/**
* Get output layer.
*
* @return \Hoa\Console\Output
*/
public static function getOutput()
{
if (null === static::$_output) {
static::$_output = new Output();
}
return static::$_output;
}
/**
* Set tput.
*
* @param \Hoa\Console\Tput $tput Tput.
* @return \Hoa\Console\Tput
*/
public static function setTput(Tput $tput)
{
$old = static::$_tput;
static::$_tput = $tput;
return $old;
}
/**
* Get the current tput instance of the current process.
*
* @return \Hoa\Console\Tput
*/
public static function getTput()
{
if (null === static::$_tput) {
static::$_tput = new Tput();
}
return static::$_tput;
}
/**
* Check whether we are running behind TMUX(1).
*
* @return bool
*/
public static function isTmuxRunning()
{
return isset($_SERVER['TMUX']);
}
}
/**
* Restore interaction.
*/
Consistency::registerShutdownFunction(xcallable('Hoa\Console\Console::restoreInteraction'));
/**
* Flex entity.
*/
Consistency::flexEntity('Hoa\Console\Console');
+747
Ver Arquivo
@@ -0,0 +1,747 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
/**
* Class \Hoa\Console\Cursor.
*
* Allow to manipulate the cursor.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Cursor
{
/**
* Move the cursor.
* Steps can be:
* • u, up, ↑ : move to the previous line;
* • U, UP : move to the first line;
* • r, right, → : move to the next column;
* • R, RIGHT : move to the last column;
* • d, down, ↓ : move to the next line;
* • D, DOWN : move to the last line;
* • l, left, ← : move to the previous column;
* • L, LEFT : move to the first column.
* Steps can be concatened by a single space if $repeat is equal to 1.
*
* @param string $steps Steps.
* @param int $repeat How many times do we move?
* @return void
*/
public static function move($steps, $repeat = 1)
{
if (1 > $repeat) {
return;
} elseif (1 === $repeat) {
$handle = explode(' ', $steps);
} else {
$handle = explode(' ', $steps, 1);
}
$tput = Console::getTput();
$output = Console::getOutput();
foreach ($handle as $step) {
switch ($step) {
case 'u':
case 'up':
case '↑':
$output->writeAll(
str_replace(
'%p1%d',
$repeat,
$tput->get('parm_up_cursor')
)
);
break;
case 'U':
case 'UP':
static::moveTo(null, 1);
break;
case 'r':
case 'right':
case '→':
$output->writeAll(
str_replace(
'%p1%d',
$repeat,
$tput->get('parm_right_cursor')
)
);
break;
case 'R':
case 'RIGHT':
static::moveTo(9999);
break;
case 'd':
case 'down':
case '↓':
$output->writeAll(
str_replace(
'%p1%d',
$repeat,
$tput->get('parm_down_cursor')
)
);
break;
case 'D':
case 'DOWN':
static::moveTo(null, 9999);
break;
case 'l':
case 'left':
case '←':
$output->writeAll(
str_replace(
'%p1%d',
$repeat,
$tput->get('parm_left_cursor')
)
);
break;
case 'L':
case 'LEFT':
static::moveTo(1);
break;
}
}
return;
}
/**
* Move to the line X and the column Y.
* If null, use the current coordinate.
*
* @param int $x X coordinate.
* @param int $y Y coordinate.
* @return void
*/
public static function moveTo($x = null, $y = null)
{
if (null === $x || null === $y) {
$position = static::getPosition();
if (null === $x) {
$x = $position['x'];
}
if (null === $y) {
$y = $position['y'];
}
}
Console::getOutput()->writeAll(
str_replace(
['%i%p1%d', '%p2%d'],
[$y, $x],
Console::getTput()->get('cursor_address')
)
);
return;
}
/**
* Get current position (x and y) of the cursor.
*
* @return array
*/
public static function getPosition()
{
$tput = Console::getTput();
$user7 = $tput->get('user7');
if (null === $user7) {
return [
'x' => 0,
'y' => 0
];
}
Console::getOutput()->writeAll($user7);
$input = Console::getInput();
// Read $tput->get('user6').
$input->read(2); // skip \033 and [.
$x = null;
$y = null;
$handle = &$y;
do {
$char = $input->readCharacter();
switch ($char) {
case ';':
$handle = &$x;
break;
case 'R':
break 2;
default:
$handle .= $char;
}
} while (true);
return [
'x' => (int) $x,
'y' => (int) $y
];
}
/**
* Save current position.
*
* @return void
*/
public static function save()
{
Console::getOutput()->writeAll(
Console::getTput()->get('save_cursor')
);
return;
}
/**
* Restore cursor to the last saved position.
*
* @return void
*/
public static function restore()
{
Console::getOutput()->writeAll(
Console::getTput()->get('restore_cursor')
);
return;
}
/**
* Clear the screen.
* Part can be:
* • a, all, ↕ : clear entire screen and static::move(1, 1);
* • u, up, ↑ : clear from cursor to beginning of the screen;
* • r, right, → : clear from cursor to the end of the line;
* • d, down, ↓ : clear from cursor to end of the screen;
* • l, left, ← : clear from cursor to beginning of the screen;
* • line, ↔ : clear all the line and static::move(1).
* Parts can be concatenated by a single space.
*
* @param string $parts Parts to clean.
* @return void
*/
public static function clear($parts = 'all')
{
$tput = Console::getTput();
$output = Console::getOutput();
foreach (explode(' ', $parts) as $part) {
switch ($part) {
case 'a':
case 'all':
case '↕':
$output->writeAll($tput->get('clear_screen'));
static::moveTo(1, 1);
break;
case 'u':
case 'up':
case '↑':
$output->writeAll("\033[1J");
break;
case 'r':
case 'right':
case '→':
$output->writeAll($tput->get('clr_eol'));
break;
case 'd':
case 'down':
case '↓':
$output->writeAll($tput->get('clr_eos'));
break;
case 'l':
case 'left':
case '←':
$output->writeAll($tput->get('clr_bol'));
break;
case 'line':
case '↔':
$output->writeAll("\r" . $tput->get('clr_eol'));
break;
}
}
return;
}
/**
* Hide the cursor.
*
* @return void
*/
public static function hide()
{
Console::getOutput()->writeAll(
Console::getTput()->get('cursor_invisible')
);
return;
}
/**
* Show the cursor.
*
* @return void
*/
public static function show()
{
Console::getOutput()->writeAll(
Console::getTput()->get('cursor_visible')
);
return;
}
/**
* Colorize cursor.
* Attributes can be:
* • n, normal : normal;
* • b, bold : bold;
* • u, underlined : underlined;
* • bl, blink : blink;
* • i, inverse : inverse;
* • !b, !bold : normal weight;
* • !u, !underlined : not underlined;
* • !bl, !blink : steady;
* • !i, !inverse : positive;
* • fg(color), foreground(color) : set foreground to “color”;
* • bg(color), background(color) : set background to “color”.
* “color” can be:
* • default;
* • black;
* • red;
* • green;
* • yellow;
* • blue;
* • magenta;
* • cyan;
* • white;
* • 0-256 (classic palette);
* • #hexa.
* Attributes can be concatenated by a single space.
*
* @param string $attributes Attributes.
* @return void
*/
public static function colorize($attributes)
{
static $_rgbTo256 = null;
if (null === $_rgbTo256) {
$_rgbTo256 = [
'000000', '800000', '008000', '808000', '000080', '800080',
'008080', 'c0c0c0', '808080', 'ff0000', '00ff00', 'ffff00',
'0000ff', 'ff00ff', '00ffff', 'ffffff', '000000', '00005f',
'000087', '0000af', '0000d7', '0000ff', '005f00', '005f5f',
'005f87', '005faf', '005fd7', '005fff', '008700', '00875f',
'008787', '0087af', '0087d7', '0087ff', '00af00', '00af5f',
'00af87', '00afaf', '00afd7', '00afff', '00d700', '00d75f',
'00d787', '00d7af', '00d7d7', '00d7ff', '00ff00', '00ff5f',
'00ff87', '00ffaf', '00ffd7', '00ffff', '5f0000', '5f005f',
'5f0087', '5f00af', '5f00d7', '5f00ff', '5f5f00', '5f5f5f',
'5f5f87', '5f5faf', '5f5fd7', '5f5fff', '5f8700', '5f875f',
'5f8787', '5f87af', '5f87d7', '5f87ff', '5faf00', '5faf5f',
'5faf87', '5fafaf', '5fafd7', '5fafff', '5fd700', '5fd75f',
'5fd787', '5fd7af', '5fd7d7', '5fd7ff', '5fff00', '5fff5f',
'5fff87', '5fffaf', '5fffd7', '5fffff', '870000', '87005f',
'870087', '8700af', '8700d7', '8700ff', '875f00', '875f5f',
'875f87', '875faf', '875fd7', '875fff', '878700', '87875f',
'878787', '8787af', '8787d7', '8787ff', '87af00', '87af5f',
'87af87', '87afaf', '87afd7', '87afff', '87d700', '87d75f',
'87d787', '87d7af', '87d7d7', '87d7ff', '87ff00', '87ff5f',
'87ff87', '87ffaf', '87ffd7', '87ffff', 'af0000', 'af005f',
'af0087', 'af00af', 'af00d7', 'af00ff', 'af5f00', 'af5f5f',
'af5f87', 'af5faf', 'af5fd7', 'af5fff', 'af8700', 'af875f',
'af8787', 'af87af', 'af87d7', 'af87ff', 'afaf00', 'afaf5f',
'afaf87', 'afafaf', 'afafd7', 'afafff', 'afd700', 'afd75f',
'afd787', 'afd7af', 'afd7d7', 'afd7ff', 'afff00', 'afff5f',
'afff87', 'afffaf', 'afffd7', 'afffff', 'd70000', 'd7005f',
'd70087', 'd700af', 'd700d7', 'd700ff', 'd75f00', 'd75f5f',
'd75f87', 'd75faf', 'd75fd7', 'd75fff', 'd78700', 'd7875f',
'd78787', 'd787af', 'd787d7', 'd787ff', 'd7af00', 'd7af5f',
'd7af87', 'd7afaf', 'd7afd7', 'd7afff', 'd7d700', 'd7d75f',
'd7d787', 'd7d7af', 'd7d7d7', 'd7d7ff', 'd7ff00', 'd7ff5f',
'd7ff87', 'd7ffaf', 'd7ffd7', 'd7ffff', 'ff0000', 'ff005f',
'ff0087', 'ff00af', 'ff00d7', 'ff00ff', 'ff5f00', 'ff5f5f',
'ff5f87', 'ff5faf', 'ff5fd7', 'ff5fff', 'ff8700', 'ff875f',
'ff8787', 'ff87af', 'ff87d7', 'ff87ff', 'ffaf00', 'ffaf5f',
'ffaf87', 'ffafaf', 'ffafd7', 'ffafff', 'ffd700', 'ffd75f',
'ffd787', 'ffd7af', 'ffd7d7', 'ffd7ff', 'ffff00', 'ffff5f',
'ffff87', 'ffffaf', 'ffffd7', 'ffffff', '080808', '121212',
'1c1c1c', '262626', '303030', '3a3a3a', '444444', '4e4e4e',
'585858', '606060', '666666', '767676', '808080', '8a8a8a',
'949494', '9e9e9e', 'a8a8a8', 'b2b2b2', 'bcbcbc', 'c6c6c6',
'd0d0d0', 'dadada', 'e4e4e4', 'eeeeee'
];
}
$tput = Console::getTput();
if (1 >= $tput->count('max_colors')) {
return;
}
$handle = [];
foreach (explode(' ', $attributes) as $attribute) {
switch ($attribute) {
case 'n':
case 'normal':
$handle[] = 0;
break;
case 'b':
case 'bold':
$handle[] = 1;
break;
case 'u':
case 'underlined':
$handle[] = 4;
break;
case 'bl':
case 'blink':
$handle[] = 5;
break;
case 'i':
case 'inverse':
$handle[] = 7;
break;
case '!b':
case '!bold':
$handle[] = 22;
break;
case '!u':
case '!underlined':
$handle[] = 24;
break;
case '!bl':
case '!blink':
$handle[] = 25;
break;
case '!i':
case '!inverse':
$handle[] = 27;
break;
default:
if (0 === preg_match('#^([^\(]+)\(([^\)]+)\)$#', $attribute, $m)) {
break;
}
$shift = 0;
switch ($m[1]) {
case 'fg':
case 'foreground':
$shift = 0;
break;
case 'bg':
case 'background':
$shift = 10;
break;
default:
break 2;
}
$_handle = 0;
$_keyword = true;
switch ($m[2]) {
case 'black':
$_handle = 30;
break;
case 'red':
$_handle = 31;
break;
case 'green':
$_handle = 32;
break;
case 'yellow':
$_handle = 33;
break;
case 'blue':
$_handle = 34;
break;
case 'magenta':
$_handle = 35;
break;
case 'cyan':
$_handle = 36;
break;
case 'white':
$_handle = 37;
break;
case 'default':
$_handle = 39;
break;
default:
$_keyword = false;
if (256 <= $tput->count('max_colors') &&
'#' === $m[2][0]) {
$rgb = hexdec(substr($m[2], 1));
$r = ($rgb >> 16) & 255;
$g = ($rgb >> 8) & 255;
$b = $rgb & 255;
$distance = null;
foreach ($_rgbTo256 as $i => $_rgb) {
$_rgb = hexdec($_rgb);
$_r = ($_rgb >> 16) & 255;
$_g = ($_rgb >> 8) & 255;
$_b = $_rgb & 255;
$d = sqrt(
pow($_r - $r, 2)
+ pow($_g - $g, 2)
+ pow($_b - $b, 2)
);
if (null === $distance ||
$d <= $distance) {
$distance = $d;
$_handle = $i;
}
}
} else {
$_handle = intval($m[2]);
}
}
if (true === $_keyword) {
$handle[] = $_handle + $shift;
} else {
$handle[] = (38 + $shift) . ';5;' . $_handle;
}
}
}
Console::getOutput()->writeAll("\033[" . implode(';', $handle) . "m");
return;
}
/**
* Change color number to a specific RGB color.
*
* @param int $fromCode Color number.
* @param int $toColor RGB color.
* @return void
*/
public static function changeColor($fromCode, $toColor)
{
$tput = Console::getTput();
if (true !== $tput->has('can_change')) {
return;
}
$r = ($toColor >> 16) & 255;
$g = ($toColor >> 8) & 255;
$b = $toColor & 255;
Console::getOutput()->writeAll(
str_replace(
[
'%p1%d',
'rgb:',
'%p2%{255}%*%{1000}%/%2.2X/',
'%p3%{255}%*%{1000}%/%2.2X/',
'%p4%{255}%*%{1000}%/%2.2X'
],
[
$fromCode,
'',
sprintf('%02x', $r),
sprintf('%02x', $g),
sprintf('%02x', $b)
],
$tput->get('initialize_color')
)
);
return;
}
/**
* Set cursor style.
* Style can be:
* • b, block, ▋: block;
* • u, underline, _: underline;
* • v, vertical, |: vertical.
*
* @param int $style Style.
* @param bool $blink Whether the cursor is blink or steady.
* @return void
*/
public static function setStyle($style, $blink = true)
{
if (OS_WIN) {
return;
}
switch ($style) {
case 'b':
case 'block':
case '▋':
$_style = 1;
break;
case 'u':
case 'underline':
case '_':
$_style = 2;
break;
case 'v':
case 'vertical':
case '|':
$_style = 5;
break;
}
if (false === $blink) {
++$_style;
}
// Not sure what tput entry we can use here…
Console::getOutput()->writeAll("\033[" . $_style . " q");
return;
}
/**
* Make a stupid “bip”.
*
* @return void
*/
public static function bip()
{
Console::getOutput()->writeAll(
Console::getTput()->get('bell')
);
return;
}
}
/**
* Advanced interaction.
*/
Console::advancedInteraction();
+269
Ver Arquivo
@@ -0,0 +1,269 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Dispatcher;
use Hoa\Console;
use Hoa\Dispatcher;
use Hoa\Router;
use Hoa\View;
/**
* Class \Hoa\Console\Dispatcher\Kit.
*
* A structure, given to action, that holds some important data.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Kit extends Dispatcher\Kit
{
/**
* CLI parser.
*
* @var \Hoa\Console\Parser
*/
public $parser = null;
/**
* Options (as described in \Hoa\Console\GetOption).
*
* @var array
*/
protected $options = null;
/**
* Options analyzer.
*
* @var \Hoa\Console\GetOption
*/
protected $_options = null;
/**
* Build a dispatcher kit.
*
* @param \Hoa\Router $router The router.
* @param \Hoa\Dispatcher $dispatcher The dispatcher.
* @param \Hoa\View\Viewable $view The view.
*/
public function __construct(
Router $router,
Dispatcher $dispatcher,
View\Viewable $view = null
) {
parent::__construct($router, $dispatcher, $view);
$this->parser = new Console\Parser();
return;
}
/**
* Alias of \Hoa\Console\GetOption::getOptions().
*
* @param string &$optionValue Please, see original API.
* @param string $short Please, see original API.
* @return mixed
*/
public function getOption(&$optionValue, $short = null)
{
if (null === $this->_options && !empty($this->options)) {
$this->setOptions($this->options);
}
if (null === $this->_options) {
return false;
}
return $this->_options->getOption($optionValue, $short);
}
/**
* Initialize options.
*
* @param array $options Options, as described in
* \Hoa\Console\GetOption.
* @return array
*/
public function setOptions(array $options)
{
$old = $this->options;
$this->options = $options;
$rule = $this->router->getTheRule();
$variables = $rule[Router::RULE_VARIABLES];
if (isset($variables['_tail'])) {
$this->parser->parse($variables['_tail']);
$this->_options = new Console\GetOption(
$this->options,
$this->parser
);
}
return $old;
}
/**
* It is a helper to make the usage options list.
*
* @param array $definitions An associative arry: short or long option
* associated to the definition.
* @return string
*/
public function makeUsageOptionsList(array $definitions = [])
{
$out = [];
foreach ($this->options as $i => $options) {
$out[] = [
' -' . $options[Console\GetOption::OPTION_VAL] . ', --' .
$options[Console\GetOption::OPTION_NAME] .
($options[Console\GetOption::OPTION_HAS_ARG] ===
Console\GetOption::REQUIRED_ARGUMENT
? '='
: ($options[Console\GetOption::OPTION_HAS_ARG] ===
Console\GetOption::OPTIONAL_ARGUMENT
? '[=]'
: '')),
(isset($definitions[$options[Console\GetOption::OPTION_VAL]])
? $definitions[$options[Console\GetOption::OPTION_VAL]]
: (isset($definitions[$options[0]])
? $definitions[$options[Console\GetOption::OPTION_NAME]]
: null
)
)
];
}
return Console\Chrome\Text::columnize(
$out,
Console\Chrome\Text::ALIGN_LEFT,
.5,
0,
'|: '
);
}
/**
* Resolve option ambiguity by asking the user to choose amongst some
* appropriated solutions.
*
* @param array $solutions Solutions.
* @return void
*/
public function resolveOptionAmbiguity(array $solutions)
{
echo
'You have made a typo in the option ',
$solutions['option'], '; it can match the following options: ', "\n",
' • ', implode(";\n", $solutions['solutions']), '.', "\n",
'Please, type the right option (empty to choose the first one):', "\n";
$new = $this->readLine('> ');
if (empty($new)) {
$new = $solutions['solutions'][0];
}
$solutions['solutions'] = [$new];
$this->_options->resolveOptionAmbiguity($solutions);
return;
}
/**
* Make a render of an operation.
*
* @param string $text The operation text.
* @param bool $status The operation status.
* @return void
*/
public function status($text, $status)
{
$window = Console\Window::getSize();
$out =
' ' . Console\Chrome\Text::colorize('*', 'foreground(yellow)') . ' ' .
$text . str_pad(
' ',
$window['x']
- strlen(preg_replace('#' . "\033" . '\[[0-9]+m#', '', $text))
- 8
) .
($status === true
? '[' . Console\Chrome\Text::colorize('ok', 'foreground(green)') . ']'
: '[' . Console\Chrome\Text::colorize('!!', 'foreground(white) background(red)') . ']');
Console::getOutput()->writeAll($out . "\n");
return;
}
/**
* Read, edit, bind… a line from STDIN.
*
* @param string $prefix Prefix.
* @return string
*/
public function readLine($prefix = null)
{
static $_rl = null;
if (null === $_rl) {
$_rl = new Console\Readline();
}
return $_rl->readLine($prefix);
}
/**
* Read, edit, bind… a password from STDIN.
*
* @param string $prefix Prefix.
* @return string
*/
public function readPassword($prefix = null)
{
static $_rl = null;
if (null === $_rl) {
$_rl = new Console\Readline\Password();
}
return $_rl->readLine($prefix);
}
}
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 116 KiB

+51
Ver Arquivo
@@ -0,0 +1,51 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Exception as HoaException;
/**
* Class \Hoa\Console\Exception.
*
* Extending the \Hoa\Exception\Exception class.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Exception extends HoaException
{
}
+359
Ver Arquivo
@@ -0,0 +1,359 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Ustring;
/**
* Class \Hoa\Console\GetOption.
*
* This class is complementary to the \Hoa\Console\Parser class.
* This class manages the options profile for a command, i.e. argument,
* interactivity, option name etc.
* And, of course, it proposes the getOption method, that allow user to loop
* easily the command options/arguments.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class GetOption
{
/**
* Argument: no argument is needed.
*
* @const int
*/
const NO_ARGUMENT = 0;
/**
* Argument: required.
*
* @const int
*/
const REQUIRED_ARGUMENT = 1;
/**
* Argument: optional.
*
* @const int
*/
const OPTIONAL_ARGUMENT = 2;
/**
* Option bucket: name.
*
* @const int
*/
const OPTION_NAME = 0;
/**
* Option bucket: has argument.
*
* @const int
*/
const OPTION_HAS_ARG = 1;
/**
* Option bucket: value.
*
* @const int
*/
const OPTION_VAL = 2;
/**
* Describe the command options (or switches).
* An option is describing like this:
* name, has_arg, val
* (In C, we got the flag data before val, but it does not have sens here).
*
* The name is the option name and the long option value.
* The has_arg is a constant: NO_ARGUMENT, REQUIRED_ARGUMENT, and
* OPTIONAL_ARGUMENT.
* The val is the short option value.
*
* @var array
*/
protected $_options = [];
/**
* Parser.
*
* @var \Hoa\Console\Parser
*/
protected $_parser = null;
/**
* The pipette contains all the short value of options.
*
* @var array
*/
protected $_pipette = [];
/**
* Prepare the pipette.
*
* @param array $options The option definition.
* @param \Hoa\Console\Parser $parser The parser.
* @throws \Hoa\Console\Exception
*/
public function __construct(array $options, Parser $parser)
{
$this->_options = $options;
$this->_parser = $parser;
if (empty($options)) {
$this->_pipette[null] = null;
return;
}
$names = [];
foreach ($options as $i => $option) {
if (isset($option[self::OPTION_NAME])) {
$names[$option[self::OPTION_NAME]] = $i;
}
if (isset($option[self::OPTION_VAL])) {
$names[$option[self::OPTION_VAL]] = $i;
}
}
$_names = array_keys($names);
$switches = $parser->getSwitches();
foreach ($switches as $name => $value) {
if (false === in_array($name, $_names)) {
if (1 === strlen($name)) {
$this->_pipette[] = ['__ambiguous', [
'solutions' => [],
'value' => $value,
'option' => $name
]];
continue;
}
$haystack = implode(';', $_names);
$differences = (int) ceil(strlen($name) / 3);
$searched = Ustring\Search::approximated(
$haystack,
$name,
$differences
);
$solutions = [];
foreach ($searched as $s) {
$h = substr($haystack, $s['i'], $s['l']);
if (false !== strpos($h, ';') ||
false !== in_array($h, array_keys($switches)) ||
false === in_array($h, $_names)) {
continue;
}
$solutions[] = $h;
}
if (empty($solutions)) {
continue;
}
$this->_pipette[] = ['__ambiguous', [
'solutions' => $solutions,
'value' => $value,
'option' => $name
]];
continue;
}
$option = $options[$names[$name]];
$argument = $option[self::OPTION_HAS_ARG];
if (self::NO_ARGUMENT === $argument) {
if (!is_bool($value)) {
$parser->transferSwitchToInput($name, $value);
}
} elseif (self::REQUIRED_ARGUMENT === $argument && !is_string($value)) {
throw new Exception(
'The argument %s requires a value (it is not a switch).',
0,
$name
);
}
$this->_pipette[] = [$option[self::OPTION_VAL], $value];
}
$this->_pipette[null] = null;
reset($this->_pipette);
return;
}
/**
* Get option from the pipette.
*
* @param string &$optionValue Place a variable that will receive the
* value of the current option.
* @param string $short Short options to scan (in a single
* string). If $short = null, all short
* options will be selected.
* @return mixed
*/
public function getOption(&$optionValue, $short = null)
{
static $first = true;
$optionValue = null;
if (true === $this->isPipetteEmpty() && true === $first) {
$first = false;
return false;
}
$k = key($this->_pipette);
$c = current($this->_pipette);
$key = $c[0];
$value = $c[1];
if (null == $k && null === $c) {
reset($this->_pipette);
$first = true;
return false;
}
$allow = [];
if (null === $short) {
foreach ($this->_options as $option) {
$allow[] = $option[self::OPTION_VAL];
}
} else {
$allow = str_split($short);
}
if (!in_array($key, $allow) && '__ambiguous' != $key) {
return false;
}
$optionValue = $value;
$return = $key;
next($this->_pipette);
return $return;
}
/**
* Check if the pipette is empty.
*
* @return bool
*/
public function isPipetteEmpty()
{
return count($this->_pipette) == 1;
}
/**
* Resolve option ambiguity. Please see the special pipette entry
* “ambiguous” in the self::__construct method.
* For a smarter resolving, you could use the console kit (please, see
* Hoa\Console\Dispatcher\Kit).
*
* @param array $solutions Solutions.
* @return void
* @throws \Hoa\Console\Exception
*/
public function resolveOptionAmbiguity(array $solutions)
{
if (!isset($solutions['solutions']) ||
!isset($solutions['value']) ||
!isset($solutions['option'])) {
throw new Exception(
'Cannot resolve option ambiguity because the given solution ' .
'seems to be corruped.',
1
);
}
$choices = $solutions['solutions'];
if (1 > count($choices)) {
throw new Exception(
'Cannot resolve ambiguity, fix your typo in the option %s :-).',
2,
$solutions['option']
);
}
$theSolution = $choices[0];
foreach ($this->_options as $option) {
if ($theSolution == $option[self::OPTION_NAME] ||
$theSolution == $option[self::OPTION_VAL]) {
$argument = $option[self::OPTION_HAS_ARG];
$value = $solutions['value'];
if (self::NO_ARGUMENT === $argument) {
if (!is_bool($value)) {
$this->_parser->transferSwitchToInput($theSolution, $value);
}
} elseif (self::REQUIRED_ARGUMENT === $argument &&
!is_string($value)) {
throw new Exception(
'The argument %s requires a value (it is not a switch).',
3,
$theSolution
);
}
unset($this->_pipette[null]);
$this->_pipette[] = [$option[self::OPTION_VAL], $value];
$this->_pipette[null] = null;
return;
}
}
return;
}
}
+212
Ver Arquivo
@@ -0,0 +1,212 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\File;
use Hoa\Stream;
/**
* Interface \Hoa\Console\Input.
*
* This interface represents the input of a program. Most of the time, this is
* going to be `php://stdin` but it can be `/dev/tty` if the former has been
* closed.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Input implements Stream\IStream\In
{
/**
* Real input stream.
*
* @var \Hoa\Stream\IStream\In
*/
protected $_input = null;
/**
* Wraps an `Hoa\Stream\IStream\In` stream.
*
* @param \Hoa\Stream\IStream\In $input Input.
*/
public function __construct(Stream\IStream\In $input = null)
{
if (null === $input) {
if (defined('STDIN') &&
false !== @stream_get_meta_data(STDIN)) {
$input = new File\Read('php://stdin');
} else {
$input = new File\Read('/dev/tty');
}
}
$this->_input = $input;
return;
}
/**
* Get underlying stream.
*
* @return \Hoa\Stream\IStream\In
*/
public function getStream()
{
return $this->_input;
}
/**
* Test for end-of-file.
*
* @return bool
*/
public function eof()
{
return $this->_input->eof();
}
/**
* Read n characters.
*
* @param int $length Length.
* @return string
*/
public function read($length)
{
return $this->_input->read($length);
}
/**
* Alias of $this->read().
*
* @param int $length Length.
* @return string
*/
public function readString($length)
{
return $this->_input->readString($length);
}
/**
* Read a character.
*
* @return string
*/
public function readCharacter()
{
return $this->_input->readCharacter();
}
/**
* Read a boolean.
*
* @return bool
*/
public function readBoolean()
{
return $this->_input->readBoolean();
}
/**
* Read an integer.
*
* @param int $length Length.
* @return int
*/
public function readInteger($length = 1)
{
return $this->_input->readInteger($length);
}
/**
* Read a float.
*
* @param int $length Length.
* @return float
*/
public function readFloat($length = 1)
{
return $this->_input->readFloat($length);
}
/**
* Read an array.
* Alias of the $this->scanf() method.
*
* @param mixed $argument Argument (because the behavior is very
* different according to the implementation).
* @return array
*/
public function readArray($argument = null)
{
return $this->_input->readArray($argument);
}
/**
* Read a line.
*
* @return string
*/
public function readLine()
{
return $this->_input->readLine();
}
/**
* Read all, i.e. read as much as possible.
*
* @param int $offset Offset.
* @return string
*/
public function readAll($offset = 0)
{
return $this->_input->readAll($offset);
}
/**
* Parse input from a stream according to a format.
*
* @param string $format Format (see printf's formats).
* @return array
*/
public function scanf($format)
{
return $this->_input->scanf($format);
}
}
+295
Ver Arquivo
@@ -0,0 +1,295 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Consistency;
use Hoa\Event;
/**
* Class \Hoa\Console\Mouse.
*
* Allow to listen the mouse.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Mouse implements Event\Listenable
{
use Event\Listens;
/**
* Pointer code for left button.
*
* @const int
*/
const BUTTON_LEFT = 0;
/**
* Pointer code for the middle button.
*
* @const int
*/
const BUTTON_MIDDLE = 1;
/**
* Pointer code for the right button.
*
* @const int
*/
const BUTTON_RIGHT = 2;
/**
* Pointer code for the release of the button.
*
* @const int
*/
const BUTTON_RELEASE = 3;
/**
* Pointer code for the wheel up.
*
* @const int
*/
const WHEEL_UP = 64;
/**
* Pointer code for the wheel down.
*
* @const int
*/
const WHEEL_DOWN = 65;
/**
* Singleton.
*
* @var \Hoa\Console\Mouse
*/
protected static $_instance = null;
/**
* Whether the mouse is tracked or not.
*
* @var bool
*/
protected static $_enabled = false;
/**
* Constructor.
*
*/
private function __construct()
{
$this->setListener(
new Event\Listener(
$this,
[
'mouseup',
'mousedown',
'wheelup',
'wheeldown',
]
)
);
return;
}
/**
* Singleton.
*
* @return \Hoa\Console\Mouse
*/
public static function getInstance()
{
if (null === static::$_instance) {
static::$_instance = new static();
}
return static::$_instance;
}
/**
* Track the mouse.
*
* @return bool
*/
public static function track()
{
if (true === static::$_enabled) {
return;
}
static::$_enabled = true;
Console::getOutput()->writeAll(
"\033[1;2'z" .
"\033[?1000h" .
"\033[?1003h"
);
$instance = static::getInstance();
$bucket = [
'x' => 0,
'y' => 0,
'button' => null,
'shift' => false,
'meta' => false,
'ctrl' => false
];
$input = Console::getInput();
$read = [$input->getStream()->getStream()];
while (true) {
if (false === @stream_select($read, $write, $except, 30)) {
static::untrack();
break;
}
$string = $input->readCharacter();
if ("\033" !== $string) {
continue;
}
$char = $input->readCharacter();
if ('[' !== $char) {
continue;
}
$char = $input->readCharacter();
if ('M' !== $char) {
continue;
}
$data = $input->read(3);
$cb = ord($data[0]);
$cx = ord($data[1]) - 32;
$cy = ord($data[2]) - 32;
$bucket['x'] = $cx;
$bucket['y'] = $cy;
$bucket['shift'] = 0 !== ($cb & 4);
$bucket['meta'] = 0 !== ($cb & 8);
$bucket['ctrl'] = 0 !== ($cb & 16);
$cb = ($cb | 28) ^ 28; // 28 = 4 | 8 | 16
$cb -= 32;
switch ($cb) {
case static::WHEEL_UP:
$instance->getListener()->fire(
'wheelup',
new Event\Bucket($bucket)
);
break;
case static::WHEEL_DOWN:
$instance->getListener()->fire(
'wheeldown',
new Event\Bucket($bucket)
);
break;
case static::BUTTON_RELEASE:
$instance->getListener()->fire(
'mouseup',
new Event\Bucket($bucket)
);
$bucket['button'] = null;
break;
default:
if (static::BUTTON_LEFT === $cb) {
$bucket['button'] = 'left';
} elseif (static::BUTTON_MIDDLE === $cb) {
$bucket['button'] = 'middle';
} elseif (static::BUTTON_RIGHT === $cb) {
$bucket['button'] = 'right';
} else {
// hover
continue 2;
}
$instance->getListener()->fire(
'mousedown',
new Event\Bucket($bucket)
);
}
}
return;
}
/**
* Untrack the mouse.
*
* @return void
*/
public static function untrack()
{
if (false === static::$_enabled) {
return;
}
Console::getOutput()->writeAll(
"\033[?1003l" .
"\033[?1000l"
);
static::$_enabled = false;
return;
}
}
/**
* Advanced interaction.
*/
Console::advancedInteraction();
/**
* Untrack mouse.
*/
Consistency::registerShutdownFunction(xcallable('Hoa\Console\Mouse::untrack'));
+264
Ver Arquivo
@@ -0,0 +1,264 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Stream;
/**
* Class \Hoa\Console\Output.
*
* This class represents the output of a program. Most of the time, this is
* going to be STDOUT.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Output implements Stream\IStream\Out
{
/**
* Whether the multiplexer must be considered while writing on the output.
*
* @var bool
*/
protected $_considerMultiplexer = false;
/**
* Real output stream.
*
* @var \Hoa\Stream\IStream\Out
*/
protected $_output = null;
/**
* Wraps an `Hoa\Stream\IStream\Out` stream.
*
* @param \Hoa\Stream\IStream\Out $output Output.
*/
public function __construct(Stream\IStream\Out $output = null)
{
$this->_output = $output;
return;
}
/**
* Get the real output stream.
*
* @return \Hoa\Stream\IStream\Out
*/
public function getStream()
{
return $this->_output;
}
/**
* Write n characters.
*
* @param string $string String.
* @param int $length Length.
* @return void
* @throws \Hoa\Console\Exception
*/
public function write($string, $length)
{
if (0 > $length) {
throw new Exception(
'Length must be greater than 0, given %d.',
0,
$length
);
}
$out = substr($string, 0, $length);
if (true === $this->isMultiplexerConsidered()) {
if (true === Console::isTmuxRunning()) {
$out =
"\033Ptmux;" .
str_replace("\033", "\033\033", $out) .
"\033\\";
}
$length = strlen($out);
}
if (null === $this->_output) {
echo $out;
} else {
$this->_output->write($out, $length);
}
}
/**
* Write a string.
*
* @param string $string String.
* @return void
*/
public function writeString($string)
{
$string = (string) $string;
return $this->write($string, strlen($string));
}
/**
* Write a character.
*
* @param string $character Character.
* @return void
*/
public function writeCharacter($character)
{
return $this->write((string) $character[0], 1);
}
/**
* Write a boolean.
*
* @param bool $boolean Boolean.
* @return void
*/
public function writeBoolean($boolean)
{
return $this->write(((bool) $boolean) ? '1' : '0', 1);
}
/**
* Write an integer.
*
* @param int $integer Integer.
* @return void
*/
public function writeInteger($integer)
{
$integer = (string) (int) $integer;
return $this->write($integer, strlen($integer));
}
/**
* Write a float.
*
* @param float $float Float.
* @return void
*/
public function writeFloat($float)
{
$float = (string) (float) $float;
return $this->write($float, strlen($float));
}
/**
* Write an array.
*
* @param array $array Array.
* @return void
*/
public function writeArray(array $array)
{
$array = var_export($array, true);
return $this->write($array, strlen($array));
}
/**
* Write a line.
*
* @param string $line Line.
* @return void
*/
public function writeLine($line)
{
if (false === $n = strpos($line, "\n")) {
return $this->write($line . "\n", strlen($line) + 1);
}
++$n;
return $this->write(substr($line, 0, $n), $n);
}
/**
* Write all, i.e. as much as possible.
*
* @param string $string String.
* @return void
*/
public function writeAll($string)
{
return $this->write($string, strlen($string));
}
/**
* Truncate a stream to a given length.
*
* @param int $size Size.
* @return bool
*/
public function truncate($size)
{
return false;
}
/**
* Consider the multiplexer (if running) while writing on the output.
*
* @param bool $consider Consider the multiplexer or not.
* @return bool
*/
public function considerMultiplexer($consider)
{
$old = $this->_considerMultiplexer;
$this->_considerMultiplexer = $consider;
return $old;
}
/**
* Check whether the multiplexer must be considered or not.
*
* @return bool
*/
public function isMultiplexerConsidered()
{
return $this->_considerMultiplexer;
}
}
+512
Ver Arquivo
@@ -0,0 +1,512 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
/**
* Class \Hoa\Console\Parser.
*
* This class parses a command line.
* See the parse() method to get more informations about command-line
* vocabulary, patterns, limitations, etc.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Parser
{
/**
* If long value is not enabled, -abc is equivalent to -a -b -c, else -abc
* is equivalent to --abc.
*
* @var \Hoa\Console\Parser
*/
protected $_longonly = false;
/**
* The parsed result in three categories : command, input, and switch.
*
* @var array
*/
protected $_parsed = null;
/**
* Parse a command.
* Some explanations :
* 1. Command :
* $ cmd is the command : cmd ;
* $ "cmd sub" is the command : cmd sub ;
* $ cmd\ sub is the command : cmd sub.
*
* 2. Short option :
* $ … -s is a short option ;
* $ … -abc is equivalent to -a -b -c if and only if $longonly is set
* to false, else (set to true) -abc is equivalent to --abc.
*
* 3. Long option :
* $ … --long is a long option ;
* $ … --lo-ng is a long option.
* $ etc.
*
* 4. Boolean switch or flag :
* $ … -s is a boolean switch, -s is set to true ;
* $ … --long is a boolean switch, --long is set to true ;
* $ … -s -s and --long --long
* are boolean switches, -s and --long are set to false ;
* $ … -aa are boolean switches, -a is set to false, if and only if
* the $longonly is set to false, else --aa is set to true.
*
* 5. Valued switch :
* x should be s, -long, abc etc.
* All the following examples are valued switches, where -x is set to the
* specified value.
* $ … -x=value : value ;
* $ … -x=va\ lue : va lue ;
* $ … -x="va lue" : va lue ;
* $ … -x="va l\"ue" : va l"ue ;
* $ … -x value : value ;
* $ … -x va\ lue : va lue ;
* $ … -x "value" : value ;
* $ … -x "va lue" : va lue ;
* $ … -x va\ l"ue : va l"ue ;
* $ … -x 'va "l"ue' : va "l"ue ;
* $ etc. (we did not written all cases, but the philosophy is here).
* Two type of quotes are supported : double quotes ("), and simple
* quotes (').
* We got very particulary cases :
* $ … -x=-value : -value ;
* $ … -x "-value" : -value ;
* $ … -x \-value : -value ;
* $ … -x -value : two switches, -x and -value are set to true ;
* $ … -x=-7 : -7, a negative number.
* And if we have more than one valued switch, the value is overwritted :
* $ … -x a -x b : b.
* Maybe, it should produce an array, like the special valued switch (see
* the point 6. please).
*
* 6. Special valued switch :
* Some valued switch can have a list, or an interval in value ;
* e.g. -x=a,b,c, or -x=1:7 etc.
* This class gives the value as it is, i.e. no manipulation or treatment
* is made.
* $ … -x=a,b,c : a,b,c (and no array('a', 'b', 'c')) ;
* $ etc.
* These manipulations should be made by the user no ? The
* self::parseSpecialValue() is written for that.
*
* 7. Input :
* The regular expression sets a value as much as possible to each
* switch (option). If a switch does not take a value (see the
* \Hoa\Console\GetOption::NO_ARGUMENT constant), the value will be
* transfered to the input stack. But this action is not made in this
* class, only in the \Hoa\Console\GetOption class, because this class
* does not have the options profile. We got the transferSwitchToInput()
* method, that is called in the GetOption class.
* So :
* $ cmd -x input the input is the -x value ;
* $ cmd -x -- input the input is a real input, not a value ;
* $ cmd -x value input -x is set to value, and the input is a real
* input ;
* $ cmd -x value -- input equivalent to -x value input ;
* $ … -a b i -c d ii -a is set to b, -c to d, and we got two
* inputs : i and ii.
*
* Warning : if the command was reconstitued from the $_SERVER variable, all
* these cases are not sure to work, because the command was already
* interpreted/parsed by an other parser (Shell, DOS etc.), and maybe they
* remove some character, or some particular case. But if we give the
* command manually — i.e. without any reconstitution —, all these cases
* will work :).
*
* @param string $command Command to parse.
* @return void
*/
public function parse($command)
{
unset($this->_parsed);
$this->_parsed = [
'input' => [],
'switch' => []
];
/**
* Here we go …
*
* #
* (?:
* (?<b>--?[^=\s]+)
* (?:
* (?:(=)|(\s))
* (?<!\\\)(?:("|\')|)
* (?<s>(?(3)[^-]|).*?)
* (?(4)
* (?<!\\\)\4
* |
* (?(2)
* (?<!\\\)\s
* |
* (?:(?:(?<!\\\)\s)|$)
* )
* )
* )?
* )
* |
* (?:
* (?<!\\\)(?:("|\')|)
* (?<i>.*?)
* (?(6)
* (?<!\\\)\6
* |
* (?:(?:(?<!\\\)\s)|$)
* )
* )
* #xSsm
*
* Nice isn't it :-D ?
*
* Note : this regular expression likes to capture empty array (near
* <i>), why?
*/
$regex = '#(?:(?<b>--?[^=\s]+)(?:(?:(=)|(\s))(?<!\\\)(?:("|\')|)(?<s>(?(3)[^-]|).*?)(?(4)(?<!\\\)\4|(?(2)(?<!\\\)\s|(?:(?:(?<!\\\)\s)|$))))?)|(?:(?<!\\\)(?:("|\')|)(?<i>.*?)(?(6)(?<!\\\)\6|(?:(?:(?<!\\\)\s)|$)))#Ssm';
preg_match_all($regex, $command, $matches, PREG_SET_ORDER);
for ($i = 0, $max = count($matches); $i < $max; ++$i) {
$match = $matches[$i];
if (isset($match['i']) &&
('0' === $match['i'] || !empty($match['i']))) {
$this->addInput($match);
} elseif (!isset($match['i']) && !isset($match['s'])) {
if (isset($matches[$i + 1])) {
$nextMatch = $matches[$i + 1];
if (!empty($nextMatch['i']) &&
'=' === $nextMatch['i'][0]) {
++$i;
$match[2] = '=';
$match[3] =
$match[4] = null;
$match['s'] =
$match[5] = substr($nextMatch[7], 1);
$this->addValuedSwitch($match);
continue;
}
}
$this->addBoolSwitch($match);
} elseif (!isset($match['i']) && isset($match['s'])) {
$this->addValuedSwitch($match);
}
}
return;
}
/**
* Add an input.
*
* @param array $input Intput.
* @return void
*/
protected function addInput(array $input)
{
$handle = $input['i'];
if (!empty($input[6])) {
$handle = str_replace('\\' . $input[6], $input[6], $handle);
} else {
$handle = str_replace('\\ ', ' ', $handle);
}
$this->_parsed['input'][] = $handle;
return;
}
/**
* Add a boolean switch.
*
* @param array $switch Switch.
* @return void
*/
protected function addBoolSwitch(array $switch)
{
$this->addSwitch($switch['b'], true);
return;
}
/**
* Add a valued switch.
*
* @param array $switch Switch.
* @return void
*/
protected function addValuedSwitch(array $switch)
{
$this->addSwitch($switch['b'], $switch['s'], $switch[4]);
return;
}
/**
* Add a switch.
*
* @param string $name Switch name.
* @param string $value Switch value.
* @param string $escape Character to escape.
* @return void
*/
protected function addSwitch($name, $value, $escape = null)
{
if (substr($name, 0, 2) == '--') {
return $this->addSwitch(substr($name, 2), $value, $escape);
}
if (substr($name, 0, 1) == '-') {
if (true === $this->getLongOnly()) {
return $this->addSwitch('-' . $name, $value, $escape);
}
foreach (str_split(substr($name, 1)) as $foo => $switch) {
$this->addSwitch($switch, $value, $escape);
}
return;
}
if (null !== $escape) {
$escape = '' == $escape ? ' ' : $escape;
if (is_string($value)) {
$value = str_replace('\\' . $escape, $escape, $value);
}
} elseif (is_string($value)) {
$value = str_replace('\\ ', ' ', $value);
}
if (isset($this->_parsed['switch'][$name])) {
if (is_bool($this->_parsed['switch'][$name])) {
$value = !$this->_parsed['switch'][$name];
} else {
$value = [$this->_parsed['switch'][$name], $value];
}
}
if (empty($name)) {
return $this->addInput([6 => null, 'i' => $value]);
}
$this->_parsed['switch'][$name] = $value;
return;
}
/**
* Transfer a switch value in the input stack.
*
* @param string $name The switch name.
* @param string $value The switch value.
* @return void
*/
public function transferSwitchToInput($name, &$value)
{
if (!isset($this->_parsed['switch'][$name])) {
return;
}
$this->_parsed['input'][] = $this->_parsed['switch'][$name];
$value = true;
unset($this->_parsed['switch'][$name]);
return;
}
/**
* Get all inputs.
*
* @return array
*/
public function getInputs()
{
return $this->_parsed['input'];
}
/**
* Distribute inputs in variable (like the list() function, but without
* error).
*
* @param string $a First input.
* @param string $b Second input.
* @param string $c Third input.
* @param ... ... ...
* @param string $z 26th input.
* @return void
*/
public function listInputs(
&$a,
&$b = null,
&$c = null,
&$d = null,
&$e = null,
&$f = null,
&$g = null,
&$h = null,
&$i = null,
&$j = null,
&$k = null,
&$l = null,
&$m = null,
&$n = null,
&$o = null,
&$p = null,
&$q = null,
&$r = null,
&$s = null,
&$t = null,
&$u = null,
&$v = null,
&$w = null,
&$x = null,
&$y = null,
&$z = null
) {
$inputs = $this->getInputs();
$i = 'a';
$ii = -1;
while (isset($inputs[++$ii]) && $i <= 'z') {
${$i++} = $inputs[$ii];
}
return;
}
/**
* Get all switches.
*
* @return array
*/
public function getSwitches()
{
return $this->_parsed['switch'];
}
/**
* Parse a special value, i.e. with comma and intervals.
*
* @param string $value The value to parse.
* @param array $keywords Value of keywords.
* @return array
* @throws \Hoa\Console\Exception
* @todo Could be ameliorate with a ":" explode, and some eval.
* Check if operands are integer.
*/
public function parseSpecialValue($value, array $keywords = [])
{
$out = [];
foreach (explode(',', $value) as $key => $subvalue) {
$subvalue = str_replace(
array_keys($keywords),
array_values($keywords),
$subvalue
);
if (0 !== preg_match('#^(-?[0-9]+):(-?[0-9]+)$#', $subvalue, $matches)) {
if (0 > $matches[1] && 0 > $matches[2]) {
throw new Exception(
'Cannot give two negative numbers, given %s.',
0,
$subvalue
);
}
array_shift($matches);
$max = max($matches);
$min = min($matches);
if (0 > $max || 0 > $min) {
if (0 > $max - $min) {
throw new Exception(
'The difference between operands must be ' .
'positive.',
1
);
}
$min = $max + $min;
}
$out = array_merge(range($min, $max), $out);
} else {
$out[] = $subvalue;
}
}
return $out;
}
/**
* Set the long-only parameter.
*
* @param bool $longonly The long-only value.
* @return bool
*/
public function setLongOnly($longonly = false)
{
$old = $this->_longonly;
$this->_longonly = $longonly;
return $old;
}
/**
* Get the long-only value.
*
* @return bool
*/
public function getLongOnly()
{
return $this->_longonly;
}
}
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+476
Ver Arquivo
@@ -0,0 +1,476 @@
<p align="center">
<img src="https://static.hoa-project.net/Image/Hoa.svg" alt="Hoa" width="250px" />
</p>
---
<p align="center">
<a href="https://travis-ci.org/hoaproject/Console"><img src="https://img.shields.io/travis/hoaproject/Console/master.svg" alt="Build status" /></a>
<a href="https://coveralls.io/github/hoaproject/Console?branch=master"><img src="https://img.shields.io/coveralls/hoaproject/Console/master.svg" alt="Code coverage" /></a>
<a href="https://packagist.org/packages/hoa/console"><img src="https://img.shields.io/packagist/dt/hoa/console.svg" alt="Packagist" /></a>
<a href="https://hoa-project.net/LICENSE"><img src="https://img.shields.io/packagist/l/hoa/console.svg" alt="License" /></a>
</p>
<p align="center">
Hoa is a <strong>modular</strong>, <strong>extensible</strong> and
<strong>structured</strong> set of PHP libraries.<br />
Moreover, Hoa aims at being a bridge between industrial and research worlds.
</p>
# Hoa\Console
[![Help on IRC](https://img.shields.io/badge/help-%23hoaproject-ff0066.svg)](https://webchat.freenode.net/?channels=#hoaproject)
[![Help on Gitter](https://img.shields.io/badge/help-gitter-ff0066.svg)](https://gitter.im/hoaproject/central)
[![Documentation](https://img.shields.io/badge/documentation-hack_book-ff0066.svg)](https://central.hoa-project.net/Documentation/Library/Console)
[![Board](https://img.shields.io/badge/organisation-board-ff0066.svg)](https://waffle.io/hoaproject/console)
This library allows to interact easily with a terminal: getoption, cursor,
window, processus, readline etc.
[Learn more](https://central.hoa-project.net/Documentation/Library/Console).
## Installation
With [Composer](https://getcomposer.org/), to include this library into
your dependencies, you need to
require [`hoa/console`](https://packagist.org/packages/hoa/console):
```sh
$ composer require hoa/console '~3.0'
```
For more installation procedures, please read [the Source
page](https://hoa-project.net/Source.html).
## Testing
Before running the test suites, the development dependencies must be installed:
```sh
$ composer install
```
Then, to run all the test suites:
```sh
$ vendor/bin/hoa test:run
```
For more information, please read the [contributor
guide](https://hoa-project.net/Literature/Contributor/Guide.html).
## Quick usage
We propose a quick overview of some features: cursor, window, readline,
processus and finally getoption.
### Cursor
The `Hoa\Console\Cursor` class allows to manipulate the cursor. Here is a list
of some operations:
* `move`,
* `moveTo`,
* `save`,
* `restore`,
* `clear`,
* `hide`,
* `show`,
* `getPosition`,
* `colorize`,
* etc.
The API is very straightforward. For example, we can use `l`, `left` or `←` to
move the cursor on the left column. Thus we move the cursor to the left 3 times
and then to the top 2 times:
```php
Hoa\Console\Cursor::move('left left left up up');
```
… or with Unicode symbols:
```php
Hoa\Console\Cursor::move('← ← ← ↑ ↑');
```
This method moves the cursor relatively from its current position, but we are
able to move the cursor to absolute coordinates:
```php
Hoa\Console\Cursor::moveTo(13, 42);
```
We are also able to save the current cursor position, to move, clear etc., and
then to restore the saved position:
```php
Hoa\Console\Cursor::save(); // save
Hoa\Console\Cursor::move('↓'); // move below
Hoa\Console\Cursor::clear('↔'); // clear the line
echo 'Something below…'; // write something
Hoa\Console\Cursor::restore(); // restore
```
Another example with colors:
```php
Hoa\Console\Cursor::colorize(
'underlined foreground(yellow) background(#932e2e)'
);
```
Please, read the API documentation for more informations.
### Mouse
The `Hoa\Console\Mouse` class allows to listen the mouse actions and provides
the following listeners: `mouseup`, `mousedown`, `wheelup` and `wheeldown`.
Example:
```php
$mouse = Hoa\Console\Mouse::getInstance();
$mouse->on('mousedown', function ($bucket) {
print_r($bucket->getData());
});
$mouse::track();
```
And then, when we left-click, we will see:
```
Array
(
[x] => 69
[y] => 30
[button] => left
[shift] =>
[meta] =>
[ctrl] =>
)
```
When we left-click while hiting the shift key, we will see:
```
Array
(
[x] => 71
[y] => 32
[button] => left
[shift] => 1
[meta] =>
[ctrl] =>
)
```
This is an experimental API.
### Window
The `Hoa\Console\Window` class allows to manipulate the window. Here is a list
of some operations:
* `setSize`,
* `getSize`,
* `moveTo`,
* `getPosition`,
* `scroll`,
* `minimize`,
* `restore`,
* `raise`,
* `setTitle`,
* `getTitle`,
* `copy`,
* etc.
Furthermore, we have the `hoa://Event/Console/Window:resize` event channel to
listen when the window has been resized.
For example, we resize the window to 40 lines and 80 columns, and then we move
the window to 400px horizontally and 100px vertically:
```php
Hoa\Console\Window::setSize(40, 80);
Hoa\Console\Window::moveTo(400, 100);
```
If we do not like our user, we are able to minimize its window:
```php
Hoa\Console\Window::minimize();
sleep(2);
Hoa\Console\Window::restore();
```
We are also able to set or get the title of the window:
```php
Hoa\Console\Window::setTitle('My awesome application');
```
Finally, if we have a complex application layout, we can repaint it when the
window is resized by listening the `hoa://Event/Console/Window:resize` event
channel:
```php
Hoa\Event\Event::getEvent('hoa://Event/Console/Window:resize')
->attach(function (Hoa\Event\Bucket $bucket) {
$data = $bucket->getData();
$size = $data['size'];
echo
'New dimensions: ', $size['x'], ' lines x ',
$size['y'], ' columns.', "\n";
});
```
Please, read the API documentation for more informations
### Readline
The `Hoa\Console\Readline\Readline` class provides an advanced readline which
allows the following operations:
* edition,
* history,
* autocompletion.
It supports UTF-8. It is based on bindings, and here are some:
* `arrow up` and `arrow down`: move in the history,
* `arrow left` and `arrow right`: move the cursor left and right,
* `Ctrl-A`: move to the beginning of the line,
* `Ctrl-E`: move to the end of the line,
* `Ctrl-B`: move backward of one word,
* `Ctrl-F`: move forward of one word,
* `Ctrl-W`: delete first backard word,
* `Backspace`: delete first backward character,
* `Enter`: submit the line,
* `Tab`: autocomplete.
Thus, to read one line:
```php
$readline = new Hoa\Console\Readline\Readline();
$line = $readline->readLine('> '); // “> ” is the prefix of the line.
```
The `Hoa\Console\Readline\Password` allows the same operations but without
printing on STDOUT.
```php
$password = new Hoa\Console\Readline\Password();
$line = $password->readLine('password: ');
```
We are able to add a mapping with the help of the
`Hoa\Console\Readline\Readline::addMapping` method. We use `\e[…` for `\033[`,
`\C-…` for `Ctrl-…` and a character for the rest. We can associate a character
or a callable:
```php
$readline->addMapping('a', 'z'); // crazy, we replace “a” by “z”.
$readline->addMapping('\C-R', function ($readline) {
// do something when pressing Ctrl-R.
});
```
We are also able to manipulate the history, thanks to the `addHistory`,
`clearHistory`, `getHistory`, `previousHistory` and `nextHistory` methods on the
`Hoa\Console\Readline\Readline` class.
Finally, we have autocompleters that are enabled on `Tab`. If one solution is
proposed, it will be inserted directly. If many solutions are proposed, we are
able to navigate in a menu to select the solution (with the help of keyboard
arrows, Enter, Esc etc.). Also, we are able to combine autocompleters. The
following example combine the `Word` and `Path` autocompleters:
```php
$functions = get_defined_functions();
$readline->setAutocompleter(
new Hoa\Console\Readline\Autocompleter\Aggregate([
new Hoa\Console\Readline\Autocompleter\Path(),
new Hoa\Console\Readline\Autocompleter\Word($functions['internal'])
])
);
```
Here is an example of the result:
![Autocompleters in action](http://central.hoa-project.net/Resource/Library/Console/Documentation/Image/Readline_autocompleters.gif?format=raw)
On Windows, a readline is equivalent to a simple `fgets(STDIN)`.
### Processus
The `Hoa\Console\Processus` class allows to manipulate processus as a stream
which implements `Hoa\Stream\IStream\In`, `Hoa\Stream\IStream\Out` and
`Hoa\Stream\IStream\Pathable` interfaces (please, see the
[`Hoa\Stream` library](http://central.hoa-project.net/Resource/Library/Stream)).
Basically, we can read STDOUT like this:
```php
$processus = new Hoa\Console\Processus('ls');
$processus->open();
echo $processus->readAll();
```
And we can write on STDIN like this:
```php
$processus->writeAll('foobar');
```
etc. This is very classical.
`Hoa\Console\Processus` also proposes many events: `start`, `stop`, `input`,
`output` and `timeout`. Thus:
```php
$processus = new Hoa\Console\Processus('ls');
$processus->on('output', function (Hoa\Event\Bucket $bucket) {
$data = $bucket->getData();
echo '> ', $data['line'], "\n";
});
$processus->run();
```
We are also able to read and write on more pipes than 0 (STDOUT), 1 (STDIN) and
2 (STDERR). In the same way, we can set the current working directory of the
processus and its environment.
We can quickly execute a processus without using a stream with the help of the
`Hoa\Console\Processus::execute` method.
### GetOption
The `Hoa\Console\Parser` and `Hoa\Console\GetOption` classes allow to parse a
command-line and get options and inputs values easily.
First, we need to parse a command-line, such as:
```php
$parser = new Hoa\Console\Parser();
$parser->parse('-s --long=value input');
```
Second, we need to define our options:
```php
$options = new Hoa\Console\GetOption(
[
// long name type short name
// ↓ ↓ ↓
['short', Hoa\Console\GetOption::NO_ARGUMENT, 's'],
['long', Hoa\Console\GetOption::REQUIRED_ARGUMENT, 'l']
],
$parser
);
```
And finally, we iterate over options:
```php
$short = false;
$long = null;
// short name value
// ↓ ↓
while (false !== $c = $options->getOption($v)) {
switch ($c) {
case 's':
$short = true;
break;
case 'l':
$long = $v;
break;
}
}
var_dump($short, $long); // bool(true) and string(5) "value".
```
Please, see API documentation of `Hoa\Console\Parser` to see all supported forms
of options (flags or switches, long or short ones, inputs etc.).
It also support typos in options. In this case, we have to add:
```php
case '__ambiguous':
$options->resolveOptionAmbiguity($v);
break;
```
If one solution is found, it will select this one automatically, else it will
raise an exception. This exception is caught by `Hoa\Console\Dispatcher\Kit`
when using the `hoa` script and a prompt is proposed.
Thanks to the [`Hoa\Router`
library](http://central.hoa-project.net/Resource/Library/Router) and the
[`Hoa\Dispatcher`
library](http://central.hoa-project.net/Resource/Library/Dispatcher) (with its
dedicated kit `Hoa\Console\Dispatcher\Kit`), we are able to build commands
easily. Please, see all `Bin/` directories in different libraries (for example
[`Hoa\Cli\Bin\Resolve`](http://central.hoa-project.net/Resource/Library/Cli/Bin/Resolve.php))
and
[`Hoa/Cli/Bin/Hoa.php`](http://central.hoa-project.net/Resource/Library/Cli/Bin/Hoa.php)
to learn more.
## Awecode
The following awecodes show this library in action:
* [`Hoa\Console\Readline`](https://hoa-project.net/Awecode/Console-readline.html):
*why and how to use `Hoa\Console\Readline`? Simple examples will help us to
use default shortcuts and we will even see the auto-completion*,
* [`Hoa\Websocket`](https://hoa-project.net/Awecode/Websocket.html):
*why and how to use `Hoa\Websocket\Server` and `Hoa\Websocket\Client`? A
simple example will illustrate the WebSocket protocol*.
## Documentation
The
[hack book of `Hoa\Console`](https://central.hoa-project.net/Documentation/Library/Console)
contains detailed information about how to use this library and how it works.
To generate the documentation locally, execute the following commands:
```sh
$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open
```
More documentation can be found on the project's website:
[hoa-project.net](https://hoa-project.net/).
## Getting help
There are mainly two ways to get help:
* On the [`#hoaproject`](https://webchat.freenode.net/?channels=#hoaproject)
IRC channel,
* On the forum at [users.hoa-project.net](https://users.hoa-project.net).
## Contribution
Do you want to contribute? Thanks! A detailed [contributor
guide](https://hoa-project.net/Literature/Contributor/Guide.html) explains
everything you need to know.
## License
Hoa is under the New BSD License (BSD-3-Clause). Please, see
[`LICENSE`](https://hoa-project.net/LICENSE) for details.
## Related projects
The following projects are using this library:
* [PsySH](http://psysh.org/), A runtime developer console,
interactive debugger and REPL for PHP.
+137
Ver Arquivo
@@ -0,0 +1,137 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Readline\Autocompleter;
/**
* Class \Hoa\Console\Readline\Autocompleter\Aggregate.
*
* Aggregate several autocompleters.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Aggregate implements Autocompleter
{
/**
* List of autocompleters.
*
* @var array
*/
protected $_autocompleters = null;
/**
* Constructor.
*
* @param array $autocompleters Auto-completers.
*/
public function __construct(array $autocompleters)
{
$this->setAutocompleters($autocompleters);
return;
}
/**
* Complete a word.
* Returns null for no word, a full-word or an array of full-words.
*
* @param string &$prefix Prefix to autocomplete.
* @return mixed
*/
public function complete(&$prefix)
{
foreach ($this->getAutocompleters() as $autocompleter) {
$preg = preg_match(
'#(' . $autocompleter->getWordDefinition() . ')$#u',
$prefix,
$match
);
if (0 === $preg) {
continue;
}
$_prefix = $match[0];
if (null === $out = $autocompleter->complete($_prefix)) {
continue;
}
$prefix = $_prefix;
return $out;
}
return null;
}
/**
* Set/initialize list of autocompleters.
*
* @param array $autocompleters Auto-completers.
* @return \ArrayObject
*/
protected function setAutocompleters(array $autocompleters)
{
$old = $this->_autocompleters;
$this->_autocompleters = new \ArrayObject($autocompleters);
return $old;
}
/**
* Get list of autocompleters.
*
* @return \ArrayObject
*/
public function getAutocompleters()
{
return $this->_autocompleters;
}
/**
* Get definition of a word.
*
* @return string
*/
public function getWordDefinition()
{
return '.*';
}
}
@@ -0,0 +1,72 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Readline\Autocompleter;
use Hoa\Consistency;
/**
* Interface \Hoa\Console\Readline\Autocompleter.
*
* Interface for all auto-completers.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
interface Autocompleter
{
/**
* Complete a word.
* Returns null for no word, a full-word or an array of full-words.
*
* @param string &$prefix Prefix to autocomplete.
* @return mixed
*/
public function complete(&$prefix);
/**
* Get definition of a word.
* Example: \b\w+\b. PCRE delimiters and options must not be provided.
*
* @return string
*/
public function getWordDefinition();
}
/**
* Flex entity.
*/
Consistency::flexEntity('Hoa\Console\Readline\Autocompleter\Autocompleter');
+228
Ver Arquivo
@@ -0,0 +1,228 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Readline\Autocompleter;
/**
* Class \Hoa\Console\Readline\Autocompleter\Path.
*
* Path autocompleter.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Path implements Autocompleter
{
/**
* Root is the current working directory.
*
* @const string
*/
const PWD = null;
/**
* Root.
*
* @var string
*/
protected $_root = null;
/**
* Iterator factory. Please, see the self::setIteratorFactory method.
*
* @var \Closure
*/
protected $_iteratorFactory = null;
/**
* Constructor.
*
* @param string $root Root.
* @param \Closure $iteratorFactory Iterator factory (please, see
* the self::setIteratorFactory
* method).
*/
public function __construct(
$root = null,
\Closure $iteratorFactory = null
) {
if (null === $root) {
$root = static::PWD;
}
$this->setRoot($root);
if (null !== $iteratorFactory) {
$this->setIteratorFactory($iteratorFactory);
}
return;
}
/**
* Complete a word.
* Returns null for no word, a full-word or an array of full-words.
*
* @param string &$prefix Prefix to autocomplete.
* @return mixed
*/
public function complete(&$prefix)
{
$root = $this->getRoot();
if (static::PWD === $root) {
$root = getcwd();
}
$path = $root . DS . $prefix;
if (!is_dir($path)) {
$path = dirname($path) . DS;
$prefix = basename($prefix);
} else {
$prefix = null;
}
$iteratorFactory = $this->getIteratorFactory() ?:
static::getDefaultIteratorFactory();
try {
$iterator = $iteratorFactory($path);
$out = [];
$length = mb_strlen($prefix);
foreach ($iterator as $fileinfo) {
$filename = $fileinfo->getFilename();
if (null === $prefix ||
(mb_substr($filename, 0, $length) === $prefix)) {
if ($fileinfo->isDir()) {
$out[] = $filename . '/';
} else {
$out[] = $filename;
}
}
}
} catch (\Exception $e) {
return null;
}
$count = count($out);
if (1 === $count) {
return $out[0];
}
if (0 === $count) {
return null;
}
return $out;
}
/**
* Get definition of a word.
*
* @return string
*/
public function getWordDefinition()
{
return '/?[\w\d\\_\-\.]+(/[\w\d\\_\-\.]*)*';
}
/**
* Set root.
*
* @param string $root Root.
* @return string
*/
public function setRoot($root)
{
$old = $this->_root;
$this->_root = $root;
return $old;
}
/**
* Get root.
*
* @return string
*/
public function getRoot()
{
return $this->_root;
}
/**
* Set iterator factory (a finder).
*
* @param \Closure $iteratorFactory Closore with a single argument:
* $path of the iterator.
* @return string
*/
public function setIteratorFactory(\Closure $iteratorFactory)
{
$old = $this->_iteratorFactory;
$this->_iteratorFactory = $iteratorFactory;
return $old;
}
/**
* Get iterator factory.
*
* @return \Closure
*/
public function getIteratorFactory()
{
return $this->_iteratorFactory;
}
/**
* Get default iterator factory (based on \DirectoryIterator).
*
* @return \Closure
*/
public static function getDefaultIteratorFactory()
{
return function ($path) {
return new \DirectoryIterator($path);
};
}
}
+132
Ver Arquivo
@@ -0,0 +1,132 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Readline\Autocompleter;
/**
* Class \Hoa\Console\Readline\Autocompleter\Word.
*
* The simplest auto-completer: complete a word.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Word implements Autocompleter
{
/**
* List of words.
*
* @var array
*/
protected $_words = null;
/**
* Constructor.
*
* @param array $words Words.
*/
public function __construct(array $words)
{
$this->setWords($words);
return;
}
/**
* Complete a word.
* Returns null for no word, a full-word or an array of full-words.
*
* @param string &$prefix Prefix to autocomplete.
* @return mixed
*/
public function complete(&$prefix)
{
$out = [];
$length = mb_strlen($prefix);
foreach ($this->getWords() as $word) {
if (mb_substr($word, 0, $length) === $prefix) {
$out[] = $word;
}
}
if (empty($out)) {
return null;
}
if (1 === count($out)) {
return $out[0];
}
return $out;
}
/**
* Get definition of a word.
*
* @return string
*/
public function getWordDefinition()
{
return '\b\w+';
}
/**
* Set list of words.
*
* @param array $words Words.
* @return array
*/
public function setWords(array $words)
{
$old = $this->_words;
$this->_words = $words;
return $old;
}
/**
* Get list of words.
*
* @return array
*/
public function getWords()
{
return $this->_words;
}
}
+55
Ver Arquivo
@@ -0,0 +1,55 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Readline;
/**
* Class \Hoa\Console\Readline\Password.
*
* Read, edit, bind… a password from the input.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Password extends Readline
{
/**
* State: continue to read and no output.
*
* @const int
*/
const STATE_CONTINUE = 5; // parent::STATE_CONTINUE | parent::STATE_NO_ECHO
}
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+194
Ver Arquivo
@@ -0,0 +1,194 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console as LUT;
use Hoa\Console\Console as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Console.
*
* Test suite of the console class.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Console extends Test\Unit\Suite
{
public function case_get_mode_fifo()
{
return $this->_case_get_mode_xxx(0010000, SUT::IS_FIFO);
}
public function case_get_mode_character()
{
return $this->_case_get_mode_xxx(0020000, SUT::IS_CHARACTER);
}
public function case_get_mode_directory()
{
return $this->_case_get_mode_xxx(0040000, SUT::IS_DIRECTORY);
}
public function case_get_mode_block()
{
return $this->_case_get_mode_xxx(0060000, SUT::IS_BLOCK);
}
public function case_get_mode_regular()
{
return $this->_case_get_mode_xxx(0100000, SUT::IS_REGULAR);
}
public function case_get_mode_link()
{
return $this->_case_get_mode_xxx(0120000, SUT::IS_LINK);
}
public function case_get_mode_socket()
{
return $this->_case_get_mode_xxx(0140000, SUT::IS_SOCKET);
}
public function case_get_mode_whiteout()
{
return $this->_case_get_mode_xxx(0160000, SUT::IS_WHITEOUT);
}
public function case_get_mode_unknown()
{
return $this->_case_get_mode_xxx(0170000, -1);
}
protected function _case_get_mode_xxx($mask, $expect)
{
$this
->given($this->function->fstat = ['mode' => $mask & 0170000])
->when($result = SUT::getMode(null))
->then
->integer($result)
->isEqualTo($expect);
}
public function case_set_input()
{
$this
->given($input = new LUT\Input())
->when($result = SUT::setInput($input))
->then
->variable($result)
->isNull()
->object(SUT::getInput())
->isIdenticalTo($input);
}
public function case_get_input()
{
$this
->when($result = SUT::getInput())
->then
->object($result)
->isInstanceOf('Hoa\Console\Input')
->isIdenticalTo(SUT::getInput());
}
public function case_set_output()
{
$this
->given($output = new LUT\Output())
->when($result = SUT::setOutput($output))
->then
->variable($result)
->isNull()
->object(SUT::getOutput())
->isIdenticalTo($output);
}
public function case_get_output()
{
$this
->when($result = SUT::getOutput())
->then
->object($result)
->isInstanceOf('Hoa\Console\Output')
->isIdenticalTo(SUT::getOutput());
}
public function case_set_tput()
{
$this
->given($tput = new LUT\Tput('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = SUT::setTput($tput))
->then
->variable($result)
->isNull()
->object(SUT::getTput())
->isIdenticalTo($tput);
}
public function case_get_tput()
{
$this
->when($result = SUT::getTput())
->then
->object($result)
->isInstanceOf('Hoa\Console\Tput')
->isIdenticalTo(SUT::getTput());
}
public function case_is_tmux_running()
{
$this
->given($_SERVER['TMUX'] = 'foo')
->when($result = SUT::isTmuxRunning())
->then
->boolean($result)
->isTrue();
}
public function case_is_not_tmux_running()
{
unset($_SERVER['TMUX']);
$this
->when($result = SUT::isTmuxRunning())
->then
->boolean($result)
->isFalse();
}
}
+988
Ver Arquivo
@@ -0,0 +1,988 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console as LUT;
use Hoa\Console\Cursor as SUT;
use Hoa\File;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Cursor.
*
* Test suite of the cursor.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Cursor extends Test\Unit\Suite
{
public function beforeTestMethod($methodName)
{
parent::beforeTestMethod($methodName);
LUT::setTput(new LUT\Tput('hoa://Library/Console/Terminfo/78/xterm-256color'));
return;
}
public function case_move_u()
{
$this
->when(SUT::move('u'))
->then
->output
->isEqualTo("\033[1A");
}
public function case_move_up()
{
$this
->when(SUT::move('up'))
->then
->output
->isEqualTo("\033[1A");
}
public function case_move_↑()
{
$this
->when(SUT::move('↑'))
->then
->output
->isEqualTo("\033[1A");
}
public function case_move_↑_repeated()
{
$this
->when(SUT::move('↑', 42))
->then
->output
->isEqualTo("\033[42A");
}
public function case_move_r()
{
$this
->when(SUT::move('r'))
->then
->output
->isEqualTo("\033[1C");
}
public function case_move_right()
{
$this
->when(SUT::move('right'))
->then
->output
->isEqualTo("\033[1C");
}
public function case_move_→()
{
$this
->when(SUT::move('→'))
->then
->output
->isEqualTo("\033[1C");
}
public function case_move_→_repeated()
{
$this
->when(SUT::move('→', 42))
->then
->output
->isEqualTo("\033[42C");
}
public function case_move_d()
{
$this
->when(SUT::move('d'))
->then
->output
->isEqualTo("\033[1B");
}
public function case_move_down()
{
$this
->when(SUT::move('down'))
->then
->output
->isEqualTo("\033[1B");
}
public function case_move_↓()
{
$this
->when(SUT::move('↓'))
->then
->output
->isEqualTo("\033[1B");
}
public function case_move_↓_repeated()
{
$this
->when(SUT::move('↓', 42))
->then
->output
->isEqualTo("\033[42B");
}
public function case_move_l()
{
$this
->when(SUT::move('l'))
->then
->output
->isEqualTo("\033[1D");
}
public function case_move_left()
{
$this
->when(SUT::move('left'))
->then
->output
->isEqualTo("\033[1D");
}
public function case_move_←()
{
$this
->when(SUT::move('←'))
->then
->output
->isEqualTo("\033[1D");
}
public function case_move_←_repeated()
{
$this
->when(SUT::move('←', 42))
->then
->output
->isEqualTo("\033[42D");
}
public function case_move_sequence()
{
$this
->when(SUT::move('↑ → ↓ ←'))
->then
->output
->isEqualTo("\033[1A\033[1C\033[1B\033[1D");
}
public function case_move_to_x_y()
{
$this
->when(SUT::moveTo(7, 42))
->then
->output
->isEqualTo("\033[42;7H");
}
public function case_move_to_x()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033[42;7R"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file))
)
->when(SUT::moveTo(153))
->then
->output
->isEqualTo("\033[6n\033[42;153H");
}
public function case_move_to_y()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033[42;7R"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file))
)
->when(SUT::moveTo(null, 153))
->then
->output
->isEqualTo("\033[6n\033[153;7H");
}
public function case_get_position()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033[42;7R"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file))
)
->when($result = SUT::getPosition())
->then
->output
->isEqualTo("\033[6n")
->array($result)
->isEqualTo([
'x' => 7,
'y' => 42
]);
}
public function case_save()
{
$this
->when(SUT::save())
->then
->output
->isEqualTo("\0337");
}
public function case_restore()
{
$this
->when(SUT::restore())
->then
->output
->isEqualTo("\0338");
}
public function case_clear_a()
{
$this
->when(SUT::clear('a'))
->then
->output
->isEqualTo("\033[H\033[2J\033[1;1H");
}
public function case_clear_all()
{
$this
->when(SUT::clear('all'))
->then
->output
->isEqualTo("\033[H\033[2J\033[1;1H");
}
public function case_clear_↕()
{
$this
->when(SUT::clear('↕'))
->then
->output
->isEqualTo("\033[H\033[2J\033[1;1H");
}
public function case_clear_u()
{
$this
->when(SUT::clear('u'))
->then
->output
->isEqualTo("\033[1J");
}
public function case_clear_up()
{
$this
->when(SUT::clear('up'))
->then
->output
->isEqualTo("\033[1J");
}
public function case_clear_↑()
{
$this
->when(SUT::clear('↑'))
->then
->output
->isEqualTo("\033[1J");
}
public function case_clear_r()
{
$this
->when(SUT::clear('r'))
->then
->output
->isEqualTo("\033[K");
}
public function case_clear_right()
{
$this
->when(SUT::clear('right'))
->then
->output
->isEqualTo("\033[K");
}
public function case_clear_→()
{
$this
->when(SUT::clear('→'))
->then
->output
->isEqualTo("\033[K");
}
public function case_clear_d()
{
$this
->when(SUT::clear('d'))
->then
->output
->isEqualTo("\033[J");
}
public function case_clear_down()
{
$this
->when(SUT::clear('down'))
->then
->output
->isEqualTo("\033[J");
}
public function case_clear_↓()
{
$this
->when(SUT::clear('↓'))
->then
->output
->isEqualTo("\033[J");
}
public function case_clear_l()
{
$this
->when(SUT::clear('l'))
->then
->output
->isEqualTo("\033[1K");
}
public function case_clear_left()
{
$this
->when(SUT::clear('left'))
->then
->output
->isEqualTo("\033[1K");
}
public function case_clear_←()
{
$this
->when(SUT::clear('←'))
->then
->output
->isEqualTo("\033[1K");
}
public function case_clear_line()
{
$this
->when(SUT::clear('line'))
->then
->output
->isEqualTo("\r\033[K");
}
public function case_clear_↔()
{
$this
->when(SUT::clear('↔'))
->then
->output
->isEqualTo("\r\033[K");
}
public function case_hide()
{
$this
->when(SUT::hide())
->then
->output
->isEqualTo("\033[?25l");
}
public function case_show()
{
$this
->when(SUT::show())
->then
->output
->isEqualTo("\033[?12;25h");
}
public function case_colorize_n()
{
$this
->when(SUT::colorize('n'))
->then
->output
->isEqualTo("\033[0m");
}
public function case_colorize_normal()
{
$this
->when(SUT::colorize('normal'))
->then
->output
->isEqualTo("\033[0m");
}
public function case_colorize_normal_repeated()
{
$this
->when(SUT::colorize('n normal'))
->then
->output
->isEqualTo("\033[0;0m");
}
public function case_colorize_b()
{
$this
->when(SUT::colorize('b'))
->then
->output
->isEqualTo("\033[1m");
}
public function case_colorize_bold()
{
$this
->when(SUT::colorize('bold'))
->then
->output
->isEqualTo("\033[1m");
}
public function case_colorize_u()
{
$this
->when(SUT::colorize('u'))
->then
->output
->isEqualTo("\033[4m");
}
public function case_colorize_underlined()
{
$this
->when(SUT::colorize('underlined'))
->then
->output
->isEqualTo("\033[4m");
}
public function case_colorize_bl()
{
$this
->when(SUT::colorize('bl'))
->then
->output
->isEqualTo("\033[5m");
}
public function case_colorize_blink()
{
$this
->when(SUT::colorize('blink'))
->then
->output
->isEqualTo("\033[5m");
}
public function case_colorize_i()
{
$this
->when(SUT::colorize('i'))
->then
->output
->isEqualTo("\033[7m");
}
public function case_colorize_inverse()
{
$this
->when(SUT::colorize('inverse'))
->then
->output
->isEqualTo("\033[7m");
}
public function case_colorize_not_b()
{
$this
->when(SUT::colorize('!b'))
->then
->output
->isEqualTo("\033[22m");
}
public function case_colorize_not_bold()
{
$this
->when(SUT::colorize('!bold'))
->then
->output
->isEqualTo("\033[22m");
}
public function case_colorize_not_u()
{
$this
->when(SUT::colorize('!u'))
->then
->output
->isEqualTo("\033[24m");
}
public function case_colorize_not_underlined()
{
$this
->when(SUT::colorize('!underlined'))
->then
->output
->isEqualTo("\033[24m");
}
public function case_colorize_not_bl()
{
$this
->when(SUT::colorize('!bl'))
->then
->output
->isEqualTo("\033[25m");
}
public function case_colorize_not_blink()
{
$this
->when(SUT::colorize('!blink'))
->then
->output
->isEqualTo("\033[25m");
}
public function case_colorize_not_i()
{
$this
->when(SUT::colorize('!i'))
->then
->output
->isEqualTo("\033[27m");
}
public function case_colorize_not_inverse()
{
$this
->when(SUT::colorize('!inverse'))
->then
->output
->isEqualTo("\033[27m");
}
public function case_colorize_fg_black()
{
$this
->when(SUT::colorize('fg(black)'))
->then
->output
->isEqualTo("\033[30m");
}
public function case_colorize_foreground_black()
{
$this
->when(SUT::colorize('foreground(black)'))
->then
->output
->isEqualTo("\033[30m");
}
public function case_colorize_fg_red()
{
$this
->when(SUT::colorize('fg(red)'))
->then
->output
->isEqualTo("\033[31m");
}
public function case_colorize_fg_green()
{
$this
->when(SUT::colorize('fg(green)'))
->then
->output
->isEqualTo("\033[32m");
}
public function case_colorize_fg_yellow()
{
$this
->when(SUT::colorize('fg(yellow)'))
->then
->output
->isEqualTo("\033[33m");
}
public function case_colorize_fg_blue()
{
$this
->when(SUT::colorize('fg(blue)'))
->then
->output
->isEqualTo("\033[34m");
}
public function case_colorize_fg_magenta()
{
$this
->when(SUT::colorize('fg(magenta)'))
->then
->output
->isEqualTo("\033[35m");
}
public function case_colorize_fg_cyan()
{
$this
->when(SUT::colorize('fg(cyan)'))
->then
->output
->isEqualTo("\033[36m");
}
public function case_colorize_fg_white()
{
$this
->when(SUT::colorize('fg(white)'))
->then
->output
->isEqualTo("\033[37m");
}
public function case_colorize_fg_default()
{
$this
->when(SUT::colorize('fg(default)'))
->then
->output
->isEqualTo("\033[39m");
}
public function case_colorize_bg_black()
{
$this
->when(SUT::colorize('bg(black)'))
->then
->output
->isEqualTo("\033[40m");
}
public function case_colorize_background_black()
{
$this
->when(SUT::colorize('background(black)'))
->then
->output
->isEqualTo("\033[40m");
}
public function case_colorize_bg_red()
{
$this
->when(SUT::colorize('bg(red)'))
->then
->output
->isEqualTo("\033[41m");
}
public function case_colorize_bg_green()
{
$this
->when(SUT::colorize('bg(green)'))
->then
->output
->isEqualTo("\033[42m");
}
public function case_colorize_bg_yellow()
{
$this
->when(SUT::colorize('bg(yellow)'))
->then
->output
->isEqualTo("\033[43m");
}
public function case_colorize_bg_blue()
{
$this
->when(SUT::colorize('bg(blue)'))
->then
->output
->isEqualTo("\033[44m");
}
public function case_colorize_bg_magenta()
{
$this
->when(SUT::colorize('bg(magenta)'))
->then
->output
->isEqualTo("\033[45m");
}
public function case_colorize_bg_cyan()
{
$this
->when(SUT::colorize('bg(cyan)'))
->then
->output
->isEqualTo("\033[46m");
}
public function case_colorize_bg_white()
{
$this
->when(SUT::colorize('bg(white)'))
->then
->output
->isEqualTo("\033[47m");
}
public function case_colorize_bg_default()
{
$this
->when(SUT::colorize('bg(default)'))
->then
->output
->isEqualTo("\033[49m");
}
public function case_colorize_foreground_ff0066()
{
$this
->when(SUT::colorize('foreground(#ff0066)'))
->then
->output
->isEqualTo("\033[38;5;197m");
}
public function case_colorize_background_ff0066()
{
$this
->when(SUT::colorize('background(#ff0066)'))
->then
->output
->isEqualTo("\033[48;5;197m");
}
public function case_colorize_foreground_color_index()
{
$this
->when(SUT::colorize('foreground(42)'))
->then
->output
->isEqualTo("\033[38;5;42m");
}
public function case_change_color()
{
$this
->when(SUT::changeColor(35, 0xff0066))
->then
->output
->isEqualTo("\033]4;35;ff0066\033\\");
}
public function case_set_style_b()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('b'))
->then
->output
->isEqualTo("\033[1 q");
}
public function case_set_style_block()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('block'))
->then
->output
->isEqualTo("\033[1 q");
}
public function case_set_style_▋()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('▋'))
->then
->output
->isEqualTo("\033[1 q");
}
public function case_set_style_block_no_blink()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('block', false))
->then
->output
->isEqualTo("\033[2 q");
}
public function case_set_style_u()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('u'))
->then
->output
->isEqualTo("\033[2 q");
}
public function case_set_style_underline()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('underline'))
->then
->output
->isEqualTo("\033[2 q");
}
public function case_set_style__()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('_'))
->then
->output
->isEqualTo("\033[2 q");
}
public function case_set_style_underline_no_blink()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('underline', false))
->then
->output
->isEqualTo("\033[3 q");
}
public function case_set_style_v()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('v'))
->then
->output
->isEqualTo("\033[5 q");
}
public function case_set_style_vertical()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('vertical'))
->then
->output
->isEqualTo("\033[5 q");
}
public function case_set_style_pipe()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('|'))
->then
->output
->isEqualTo("\033[5 q");
}
public function case_set_style_vertical_no_blink()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setStyle('vertical', false))
->then
->output
->isEqualTo("\033[6 q");
}
public function case_set_style_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::setStyle('b'))
->then
->output
->isEmpty();
}
public function case_bip()
{
$this
->when(SUT::bip())
->then
->output
->isEqualTo("\007");
}
}
+234
Ver Arquivo
@@ -0,0 +1,234 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console as LUT;
use Hoa\Console\GetOption as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\GetOption.
*
* Test suite of the option reader.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class GetOption extends Test\Unit\Suite
{
public function case_empty()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse(''),
$options = new SUT([], $parser)
)
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isTrue()
->boolean($result)
->isFalse()
->variable($value)
->isNull();
}
public function case_one_entry()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse('--foo'),
$options = new SUT(
[
['foo', SUT::NO_ARGUMENT, 'f']
],
$parser
)
)
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isFalse()
->string($result)
->isEqualTo('f')
->boolean($value)
->isTrue()
->when($result = $options->getOption($value))
->boolean($options->isPipetteEmpty())
->isFalse()
->boolean($result)
->isFalse()
->variable($value)
->isNull();
}
public function case_more_entries()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse('--foo --bar baz'),
$options = new SUT(
[
['foo', SUT::NO_ARGUMENT, 'f'],
['bar', SUT::REQUIRED_ARGUMENT, 'b']
],
$parser
)
)
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isFalse()
->string($result)
->isEqualTo('f')
->boolean($value)
->isTrue()
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isFalse()
->string($result)
->isEqualTo('b')
->string($value)
->isEqualTo('baz')
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isFalse()
->boolean($result)
->isFalse()
->variable($value)
->isNull();
}
public function case_ambiguous()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse('--baz'),
$options = new SUT(
[
['foo', SUT::NO_ARGUMENT, 'f'],
['bar', SUT::REQUIRED_ARGUMENT, 'b']
],
$parser
)
)
->when($result = $options->getOption($value))
->then
->boolean($options->isPipetteEmpty())
->isFalse()
->string($result)
->isEqualTo('__ambiguous')
->array($value)
->isEqualTo([
'solutions' => ['bar'],
'value' => true,
'option' => 'baz'
]);
}
public function case_resolve_option_ambiguity_no_solution()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse(''),
$options = new SUT([], $parser),
$solutions = [
'solutions' => [],
'value' => true,
'option' => 'baz'
]
)
->exception(function () use ($options, $solutions) {
$options->resolveOptionAmbiguity($solutions);
})
->isInstanceOf('Hoa\Console\Exception');
}
public function case_resolve_option_ambiguity()
{
$this
->given(
$parser = new LUT\Parser(),
$parser->parse('--baz'),
$options = new SUT(
[
['bar', SUT::NO_ARGUMENT, 'b']
],
$parser
)
)
->when($result = $options->getOption($value))
->then
->string($result)
->isEqualTo('__ambiguous')
->array($value)
->isEqualTo([
'solutions' => ['bar'],
'value' => true,
'option' => 'baz'
])
->when($result = $options->resolveOptionAmbiguity($value))
->then
->variable($result)
->isNull()
->when($result = $options->getOption($value))
->then
->string($result)
->isEqualTo('b')
->boolean($value)
->isEqualTo(true);
}
}
+254
Ver Arquivo
@@ -0,0 +1,254 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console\Input as SUT;
use Hoa\File;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Input.
*
* Test suite of the input object.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Input extends Test\Unit\Suite
{
public function case_is_a_stream()
{
$this
->when($result = new SUT())
->then
->object($result)
->isInstanceOf('Hoa\Stream\IStream\In');
}
public function case_eof()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$input = new SUT($file)
)
->when($result = $input->eof())
->then
->boolean($result)
->isEqualTo($file->eof());
}
public function case_read()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foobar'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->read(3))
->then
->string($result)
->isEqualTo('foo');
}
public function case_read_string()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foobar'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readString(3))
->then
->string($result)
->isEqualTo('foo');
}
public function case_read_character()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foobar'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readCharacter(1))
->then
->string($result)
->isEqualTo('f');
}
public function case_read_boolean_true()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('1'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readBoolean())
->then
->boolean($result)
->isTrue();
}
public function case_read_boolean_false()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('0'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readBoolean())
->then
->boolean($result)
->isFalse();
}
public function case_read_integer()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('42'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readInteger(2))
->then
->integer($result)
->isEqualTo(42);
}
public function case_read_float()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('4.2'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readFloat(3))
->then
->float($result)
->isEqualTo(4.2);
}
public function case_read_array()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foo bar'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readArray('%s %s'))
->then
->array($result)
->isEqualTo([
0 => 'foo',
1 => 'bar'
]);
}
public function case_read_line()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foo' . "\n" . 'bar'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readLine())
->then
->string($result)
->isEqualTo('foo' . "\n");
}
public function case_read_all()
{
$this
->given(
$content = '4.2foo' . "\n" . 'bar',
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll($content),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->readAll())
->then
->string($result)
->isEqualTo($content);
}
public function case_scanf()
{
$this
->given(
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll('foo 42' . "\n" . 'bar 153'),
$file->rewind(),
$input = new SUT($file)
)
->when($result = $input->scanf('%s %d'))
->then
->array($result)
->isEqualTo([
0 => 'foo',
1 => 42
])
->when($result = $input->scanf('%s %d'))
->then
->array($result)
->isEqualTo([
0 => 'bar',
1 => 153
]);
}
}
+241
Ver Arquivo
@@ -0,0 +1,241 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console as LUT;
use Hoa\Console\Mouse as SUT;
use Hoa\Event;
use Hoa\File;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Mouse.
*
* Test suite of the mouse.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Mouse extends Test\Unit\Suite
{
public function beforeTestMethod($methodName)
{
parent::beforeTestMethod($methodName);
LUT::setTput(new LUT\Tput('hoa://Library/Console/Terminfo/78/xterm-256color'));
return;
}
public function case_get_instance()
{
$this
->when($result = SUT::getInstance())
->then
->object($result)
->isIdenticalTo(SUT::getInstance());
}
public function case_track_button_left()
{
return $this->_case_track(
7,
42,
SUT::BUTTON_LEFT,
'mousedown',
[
'x' => 7,
'y' => 42,
'button' => 'left',
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function case_track_button_middle()
{
return $this->_case_track(
7,
42,
SUT::BUTTON_MIDDLE,
'mousedown',
[
'x' => 7,
'y' => 42,
'button' => 'middle',
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function case_track_button_right()
{
return $this->_case_track(
7,
42,
SUT::BUTTON_RIGHT,
'mousedown',
[
'x' => 7,
'y' => 42,
'button' => 'right',
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function case_track_button_release()
{
return $this->_case_track(
7,
42,
SUT::BUTTON_RELEASE,
'mouseup',
[
'x' => 7,
'y' => 42,
'button' => null,
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function case_track_wheelup()
{
return $this->_case_track(
7,
42,
SUT::WHEEL_UP,
'wheelup',
[
'x' => 7,
'y' => 42,
'button' => null,
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function case_track_wheeldown()
{
return $this->_case_track(
7,
42,
SUT::WHEEL_DOWN,
'wheeldown',
[
'x' => 7,
'y' => 42,
'button' => null,
'shift' => false,
'meta' => false,
'ctrl' => false
]
);
}
public function _case_track($x, $y, $pointerActionCode, $listenerName, array $listenerData)
{
$this
->given(
$self = $this,
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll(
"\033[M" .
chr(($pointerActionCode + 32) & ~28) .
chr($x + 32) .
chr($y + 32)
),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file)),
$this->function->stream_select = function () {
static $i = 1;
if (1 === $i) {
return $i--;
}
return false;
},
SUT::getInstance()->on(
$listenerName,
function (Event\Bucket $bucket) use (&$_listenerData) {
$_listenerData = $bucket->getData();
return;
}
)
)
->when(SUT::track())
->then
->output
->isEqualTo(
// Track.
"\033[1;2'z" .
"\033[?1000h" .
"\033[?1003h" .
// Untrack.
"\033[?1003l" .
"\033[?1000l"
)
->array($_listenerData)
->isEqualTo($listenerData);
}
public function case_untrack_when_not_tracked()
{
$this
->when($result = SUT::untrack())
->then
->variable($result)
->isNull()
->output
->isEmpty();
}
}
+217
Ver Arquivo
@@ -0,0 +1,217 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console\Output as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Output.
*
* Test suite of the output object.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Output extends Test\Unit\Suite
{
public function case_is_a_stream()
{
$this
->when($result = new SUT())
->then
->object($result)
->isInstanceOf('Hoa\Stream\IStream\Out');
}
public function case_write()
{
$this
->given($output = new SUT())
->when($output->write('foobar', 3))
->then
->output
->isIdenticalTo('foo');
}
public function case_write_string()
{
$this
->given($output = new SUT())
->when($output->writeString(123))
->then
->output
->isIdenticalTo('123');
}
public function case_write_character()
{
$this
->given($output = new SUT())
->when($output->writeCharacter('foo'))
->then
->output
->isIdenticalTo('f');
}
public function case_write_boolean_true()
{
$this
->given($output = new SUT())
->when($output->writeBoolean(true))
->then
->output
->isIdenticalTo('1');
}
public function case_write_boolean_false()
{
$this
->given($output = new SUT())
->when($output->writeBoolean(false))
->then
->output
->isIdenticalTo('0');
}
public function case_write_integer()
{
$this
->given($output = new SUT())
->when($output->writeInteger(-42))
->then
->output
->isIdenticalTo('-42');
}
public function case_write_float()
{
$this
->given($output = new SUT())
->when($output->writeFloat(-4.2))
->then
->output
->isIdenticalTo('-4.2');
}
public function case_write_array()
{
$this
->given($output = new SUT())
->when($output->writeArray(['foo' => 'bar']))
->then
->output
->isIdenticalTo(
'array (' . "\n" .
' \'foo\' => \'bar\',' . "\n" .
')'
);
}
public function case_write_line_no_newline()
{
$this
->given($output = new SUT())
->when($output->writeLine('foo'))
->then
->output
->isIdenticalTo('foo' . "\n");
}
public function case_write_line_with_newline()
{
$this
->given($output = new SUT())
->when($output->writeLine('foo' . "\n"))
->then
->output
->isIdenticalTo('foo' . "\n");
}
public function case_write_line_with_newlines()
{
$this
->given($output = new SUT())
->when($output->writeLine('foo' . "\n" . 'bar' . "\n"))
->then
->output
->isIdenticalTo('foo' . "\n");
}
public function case_write_all()
{
$this
->given($output = new SUT())
->when($output->writeAll('foobar'))
->then
->output
->isIdenticalTo('foobar');
}
public function case_truncate()
{
$this
->given($output = new SUT())
->when($result = $output->truncate(42))
->then
->boolean($result)
->isFalse();
}
public function case_default_multiplexer_consideration()
{
$this
->given($output = new SUT())
->when($result = $output->isMultiplexerConsidered())
->then
->boolean($result)
->isFalse();
}
public function case_consider_multiplexer()
{
$this
->given($output = new SUT())
->when(
$output->considerMultiplexer(true),
$result = $output->isMultiplexerConsidered()
)
->then
->boolean($result)
->isTrue();
}
}
+308
Ver Arquivo
@@ -0,0 +1,308 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console\Parser as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Parser.
*
* Test suite of the parser.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Parser extends Test\Unit\Suite
{
public function case_short_options()
{
return $this->_case(
'-a -b -c',
['a' => true, 'b' => true, 'c' => true]
);
}
public function case_single_dashed_short_options()
{
return $this->_case(
'-abc',
['a' => true, 'b' => true, 'c' => true]
);
}
public function case_long_options()
{
return $this->_case(
'--foo --bar --b-a-z',
['foo' => true, 'bar' => true, 'b-a-z' => true]
);
}
public function case_boolean_switches()
{
return $this->_case(
'-a -a --foo --foo --bar --bar --bar',
['a' => false, 'foo' => false, 'bar' => true]
);
}
public function case_valued_switches_equal_simple()
{
return $this->_case(
'-a=foo --long=bar',
['a' => 'foo', 'long' => 'bar']
);
}
public function case_valued_switches_equal_with_escaped_space()
{
return $this->_case(
'-a=fo\ o --long=b\ a\ r',
['a' => 'fo o', 'long' => 'b a r']
);
}
public function case_valued_switches_equal_double_quoted()
{
return $this->_case(
'-a="fo\"o" --long="b\"a\'r"',
['a' => 'fo"o', 'long' => 'b"a\'r']
);
}
public function case_valued_switches_equal_single_quoted()
{
return $this->_case(
'-a=\'fo\\\'"o\' --long=\'b\\\'a"r\'',
['a' => 'fo\'"o', 'long' => 'b\'a"r']
);
}
public function case_valued_switches_space_simple()
{
return $this->_case(
'-a foo --long bar',
['a' => 'foo', 'long' => 'bar']
);
}
public function case_valued_switches_space_with_escaped_space()
{
return $this->_case(
'-a fo\ o --long b\ a\ r',
['a' => 'fo o', 'long' => 'b a r']
);
}
public function case_valued_switches_space_double_quoted()
{
return $this->_case(
'-a "fo\"o" --long "b\"a\'r"',
['a' => 'fo"o', 'long' => 'b"a\'r']
);
}
public function case_valued_switches_space_single_quoted()
{
return $this->_case(
'-a \'fo\\\'"o\' --long \'b\\\'a"r\'',
['a' => 'fo\'"o', 'long' => 'b\'a"r']
);
}
public function case_valued_switch_equal_negative_value()
{
return $this->_case(
'-a=-foo --long=-bar',
['a' => '-foo', 'long' => '-bar']
);
}
public function case_special_valued_switch()
{
return $this->_case(
'-a f,o,o --long b,a,r',
['a' => 'f,o,o', 'long' => 'b,a,r']
);
}
public function case_input_associated_to_a_short_option()
{
return $this->_case(
'-a input',
['a' => 'input']
);
}
public function case_double_dashes_input()
{
return $this->_case(
'-a --long bar -- inputA inputB',
['a' => true, 'long' => 'bar'],
['inputA', 'inputB']
);
}
public function case_simple_input()
{
return $this->_case(
'inputA inputB',
[],
['inputA', 'inputB']
);
}
public function case_valued_switch_followed_by_an_input()
{
return $this->_case(
'-a foo --long bar inputA inputB',
['a' => 'foo', 'long' => 'bar'],
['inputA', 'inputB']
);
}
public function case_unordered()
{
return $this->_case(
'inputA -a foo inputB --long bar inputC',
['a' => 'foo', 'long' => 'bar'],
['inputA', 'inputB', 'inputC']
);
}
protected function _case($command, array $switches, array $inputs = [])
{
$this
->given($parser = new SUT())
->when($result = $parser->parse($command))
->then
->variable($result)
->isNull()
->array($parser->getSwitches())
->isIdenticalTo($switches)
->array($parser->getInputs())
->isIdenticalTo($inputs);
}
public function case_state_is_reset()
{
$this
->given($parser = new SUT())
->when($result = $parser->parse('--foo=bar baz'))
->then
->variable($result)
->isNull()
->array($parser->getSwitches())
->isIdenticalTo(['foo' => 'bar'])
->array($parser->getInputs())
->isIdenticalTo(['baz'])
->when($result = $parser->parse('--bar=baz qux'))
->variable($result)
->isNull()
->array($parser->getSwitches())
->isIdenticalTo(['bar' => 'baz'])
->array($parser->getInputs())
->isIdenticalTo(['qux']);
}
public function case_parse_special_value_list()
{
$this
->given($parser = new SUT())
->when($result = $parser->parseSpecialValue('foo,bar,baz'))
->then
->array($result)
->isIdenticalTo([
'foo',
'bar',
'baz'
]);
}
public function case_parse_special_value_list_with_keywords()
{
$this
->given($parser = new SUT())
->when($result = $parser->parseSpecialValue('foo,bar,QUX', ['QUX' => 'baz']))
->then
->array($result)
->isIdenticalTo([
'foo',
'bar',
'baz'
]);
}
public function case_parse_special_value_list_with_range()
{
$this
->given($parser = new SUT())
->when($result = $parser->parseSpecialValue('foo,bar,1:3'))
->then
->array($result)
->isIdenticalTo([
1,
2,
3,
'foo',
'bar'
]);
}
public function case_set_long_only()
{
$this
->given($parser = new SUT())
->when(
$parser->setLongOnly(true),
$result = $parser->parse('-abc')
)
->then
->boolean($parser->getLongOnly())
->isTrue()
->variable($result)
->isNull()
->array($parser->getSwitches())
->isIdenticalTo([
'abc' => true,
])
->array($parser->getInputs())
->isEmpty();
}
}
@@ -0,0 +1,182 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit\Readline\Autocompleter;
use Hoa\Console\Readline\Autocompleter\Aggregate as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Readline\Autocompleter\Aggregate.
*
* Test suite of the readline autocompleter aggregator.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Aggregate extends Test\Unit\Suite
{
public function case_get_word_definition()
{
$this
->given($autocompleter = new SUT([]))
->when($result = $autocompleter->getWordDefinition())
->then
->string($result)
->isEqualTo('.*');
}
public function case_constructor()
{
$this
->given(
$autocompleterA = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$autocompleterB = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter()
)
->when($result = new SUT([$autocompleterA, $autocompleterB]))
->then
->object($result)
->isInstanceOf('Hoa\Console\Readline\Autocompleter\Autocompleter')
->let($autocompleters = $result->getAutocompleters())
->object($autocompleters)
->isInstanceOf('ArrayObject')
->integer(count($autocompleters))
->isEqualTo(2)
->object($autocompleters[0])
->isIdenticalTo($autocompleterA)
->object($autocompleters[1])
->isIdenticalTo($autocompleterB);
}
public function case_complete_no_solution()
{
$this
->given(
$autocompleterA = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$autocompleterA->getWordDefinition = function () {
return 'aaa';
},
$autocompleterB = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$autocompleterB->getWordDefinition = function () {
return 'bbb';
},
$autocompleter = new SUT([$autocompleterA, $autocompleterB]),
$prefix = 'ccc'
)
->when($result = $autocompleter->complete($prefix))
->then
->variable($result)
->isNull()
->string($prefix)
->isEqualTo('ccc');
}
public function case_complete_one_solution_first_autocompleter()
{
$self = $this;
$this
->given(
$autocompleterA = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$this->calling($autocompleterA)->getWordDefinition = function () {
return 'aaa';
},
$this->calling($autocompleterA)->complete = function ($prefix) use ($self) {
$self
->string($prefix)
->isEqualTo('aaa');
return 'AAA';
},
$autocompleterB = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$this->calling($autocompleterB)->getWordDefinition = function () {
return 'bbb';
},
$this->calling($autocompleterB)->complete = function ($prefix) use ($self) {
$self->fail('Bad autocompleter called.');
},
$autocompleter = new SUT([$autocompleterA, $autocompleterB]),
$prefix = 'aaa'
)
->when($result = $autocompleter->complete($prefix))
->then
->string($result)
->isEqualTo('AAA')
->string($prefix)
->isEqualTo('aaa');
}
public function case_complete_one_solution_second_autocompleter()
{
$self = $this;
$this
->given(
$autocompleterA = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$this->calling($autocompleterA)->getWordDefinition = function () {
return 'aaa';
},
$this->calling($autocompleterA)->complete = function ($prefix) use ($self) {
$self->fail('Bad autocompleter called.');
},
$autocompleterB = new \Mock\Hoa\Console\Readline\Autocompleter\Autocompleter(),
$this->calling($autocompleterB)->getWordDefinition = function () {
return 'bbb';
},
$this->calling($autocompleterB)->complete = function ($prefix) use ($self) {
$self
->string($prefix)
->isEqualTo('bbb');
return 'BBB';
},
$autocompleter = new SUT([$autocompleterA, $autocompleterB]),
$prefix = 'bbb'
)
->when($result = $autocompleter->complete($prefix))
->then
->string($result)
->isEqualTo('BBB')
->string($prefix)
->isEqualTo('bbb');
}
}
@@ -0,0 +1,240 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit\Readline\Autocompleter;
use Hoa\Console\Readline\Autocompleter\Path as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Readline\Autocompleter\Path.
*
* Test suite of the path autocompleter for the readline.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Path extends Test\Unit\Suite
{
public function case_get_word_definition()
{
$this
->given($autocompleter = new SUT())
->when($result = $autocompleter->getWordDefinition())
->then
->string($result)
->isEqualTo('/?[\w\d\\_\-\.]+(/[\w\d\\_\-\.]*)*');
}
public function case_constructor()
{
$this
->given(
$root = 'foo',
$iteratorFactory = function () {
return 42;
}
)
->when($result = new SUT($root, $iteratorFactory))
->then
->object($result)
->isInstanceOf('Hoa\Console\Readline\Autocompleter\Autocompleter')
->string($result->getRoot())
->isEqualTo($root)
->object($result->getIteratorFactory())
->isIdenticalTo($iteratorFactory);
}
public function case_complete_no_solution()
{
$this
->given(
resolve('hoa://Test/Vfs/Root?type=directory'),
resolve('hoa://Test/Vfs/Root/Foo?type=file'),
resolve('hoa://Test/Vfs/Root/Bar?type=file'),
$autocompleter = new SUT('hoa://Test/Vfs/Root'),
$prefix = 'Q'
)
->when($result = $autocompleter->complete($prefix))
->then
->variable($result)
->isNull()
->string($prefix)
->isEqualTo('Q');
}
public function case_complete_one_solution()
{
$this
->given(
resolve('hoa://Test/Vfs/Root?type=directory'),
resolve('hoa://Test/Vfs/Root/Foo?type=file'),
resolve('hoa://Test/Vfs/Root/Bar?type=file'),
$autocompleter = new SUT('hoa://Test/Vfs/Root'),
$prefix = 'F'
)
->when($result = $autocompleter->complete($prefix))
->then
->string($result)
->isEqualTo('Foo')
->string($prefix)
->isEqualTo('F');
}
public function case_complete_with_smallest_prefix()
{
$this
->given(
resolve('hoa://Test/Vfs/Root?type=directory'),
resolve('hoa://Test/Vfs/Root/Foo?type=file'),
resolve('hoa://Test/Vfs/Root/Bar?type=file'),
resolve('hoa://Test/Vfs/Root/Baz?type=file'),
resolve('hoa://Test/Vfs/Root/Qux?type=file'),
$autocompleter = new SUT('hoa://Test/Vfs/Root'),
$prefix = 'B'
)
->when($result = $autocompleter->complete($prefix))
->then
->array($result)
->isEqualTo(['Bar', 'Baz'])
->string($prefix)
->isEqualTo('B');
}
public function case_complete_with_longer_prefix()
{
$this
->given(
resolve('hoa://Test/Vfs/Root?type=directory'),
resolve('hoa://Test/Vfs/Root/Bara?type=file'),
resolve('hoa://Test/Vfs/Root/Barb?type=file'),
resolve('hoa://Test/Vfs/Root/Baza?type=file'),
$autocompleter = new SUT('hoa://Test/Vfs/Root'),
$prefix = 'Bar'
)
->when($result = $autocompleter->complete($prefix))
->then
->array($result)
->isEqualTo(['Bara', 'Barb'])
->string($prefix)
->isEqualTo('Bar');
}
public function case_set_root()
{
$this
->given($autocompleter = new SUT())
->when($result = $autocompleter->setRoot('foo'))
->then
->variable($result)
->isNull()
->when($result = $autocompleter->setRoot('bar'))
->then
->string($result)
->isEqualTo('foo');
}
public function case_get_root()
{
$this
->given(
$autocompleter = new SUT(),
$autocompleter->setRoot('foo')
)
->when($result = $autocompleter->getRoot())
->then
->string($result)
->isEqualTo('foo');
}
public function case_set_iterator_factory()
{
$this
->given($autocompleter = new SUT())
->when(
$result = $autocompleter->setIteratorFactory(function () {
return 42;
})
)
->then
->variable($result)
->isNull()
->when(
$result = $autocompleter->setIteratorFactory(function () {
return 43;
})
)
->then
->integer($result())
->isEqualTo(42);
}
public function case_get_iterator_factory()
{
$this
->given(
$autocompleter = new SUT(),
$autocompleter->setIteratorFactory(function () {
return 42;
})
)
->when(function () use (&$result, $autocompleter) {
$result = $autocompleter->getIteratorFactory();
})
->then
->integer($result())
->isEqualTo(42);
}
public function case_get_default_iterator_factory()
{
$this
->when(function () use (&$result) {
$result = SUT::getDefaultIteratorFactory();
})
->then
->object($result)
->isInstanceOf('Closure')
->object($result(__DIR__))
->isInstanceOf('DirectoryIterator');
}
}
@@ -0,0 +1,159 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit\Readline\Autocompleter;
use Hoa\Console\Readline\Autocompleter\Word as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Readline\Autocompleter\Word.
*
* Test suite of the word autocompleter for the readline.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Word extends Test\Unit\Suite
{
public function case_constructor()
{
$this
->given($words = ['foo', 'bar', 'baz', 'qux'])
->when($result = new SUT($words))
->then
->object($result)
->isInstanceOf('Hoa\Console\Readline\Autocompleter\Autocompleter')
->array($result->getWords())
->isEqualTo($words);
}
public function case_complete_no_solution()
{
$this
->given(
$autocompleter = new SUT(['foo', 'bar']),
$prefix = 'q'
)
->when($result = $autocompleter->complete($prefix))
->then
->variable($result)
->isNull()
->string($prefix)
->isEqualTo('q');
}
public function case_complete_one_solution()
{
$this
->given(
$autocompleter = new SUT(['foo', 'bar']),
$prefix = 'f'
)
->when($result = $autocompleter->complete($prefix))
->then
->string($result)
->isEqualTo('foo')
->string($prefix)
->isEqualTo('f');
}
public function case_complete_with_smallest_prefix()
{
$this
->given(
$autocompleter = new SUT(['foo', 'bar', 'baz', 'qux']),
$prefix = 'b'
)
->when($result = $autocompleter->complete($prefix))
->then
->array($result)
->isEqualTo(['bar', 'baz'])
->string($prefix)
->isEqualTo('b');
}
public function case_complete_with_longer_prefix()
{
$this
->given(
$autocompleter = new SUT(['bara', 'barb', 'baza']),
$prefix = 'bar'
)
->when($result = $autocompleter->complete($prefix))
->then
->array($result)
->isEqualTo(['bara', 'barb'])
->string($prefix)
->isEqualTo('bar');
}
public function case_get_word_definition()
{
$this
->given($autocompleter = new SUT([]))
->when($result = $autocompleter->getWordDefinition())
->then
->string($result)
->isEqualTo('\b\w+');
}
public function case_set_words()
{
$this
->given(
$words = ['foo', 'bar', 'baz', 'qux'],
$autocompleter = new SUT([])
)
->when($result = $autocompleter->setWords($words))
->then
->array($result)
->isEmpty();
}
public function case_get_words()
{
$this
->given(
$words = ['foo', 'bar', 'baz', 'qux'],
$autocompleter = new SUT($words)
)
->when($result = $autocompleter->getWords())
->then
->array($result)
->isEqualTo($words);
}
}
+64
Ver Arquivo
@@ -0,0 +1,64 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit\Readline;
use Hoa\Console as LUT;
use Hoa\Console\Readline\Password as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Readline\Password.
*
* Test suite of the password readline.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Password extends Test\Unit\Suite
{
public function case_ensure_hidden()
{
$this
->when($result = SUT::STATE_CONTINUE)
->then
->integer($result)
->isEqualTo(
LUT\Readline::STATE_CONTINUE |
LUT\Readline::STATE_NO_ECHO
);
}
}
+411
Ver Arquivo
@@ -0,0 +1,411 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console\Tput as SUT;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Tput.
*
* Test suite of the tput parser.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Tput extends Test\Unit\Suite
{
public function case_get_term_from_environment()
{
$this
->given($_SERVER['TERM'] = 'foo')
->when($result = SUT::getTerm())
->then
->string($result)
->isEqualTo('foo');
}
public function case_get_unknown_term_on_windows()
{
unset($_SERVER['TERM']);
$this
->given($this->constant->OS_WIN = true)
->when($result = SUT::getTerm())
->then
->string($result)
->isEqualTo('windows-ansi');
}
public function case_get_unknown_term()
{
unset($_SERVER['TERM']);
$this
->given($this->constant->OS_WIN = false)
->when($result = SUT::getTerm())
->then
->string($result)
->isEqualTo('xterm');
}
public function case_unknown_file_when_parsing()
{
$this
->exception(function () {
new SUT('/hoa/flatland');
})
->isInstanceOf('Hoa\Console\Exception');
}
public function case_all_informations()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->getInformations())
->then
->array($result)
->isIdenticalTo([
'file' => 'hoa://Library/Console/Terminfo/78/xterm',
'headers' => [
'data_size' => 3258,
'header_size' => 12,
'magic_number' => 282,
'names_size' => 48,
'bool_count' => 38,
'number_count' => 15,
'string_count' => 413,
'string_table_size' => 1388
],
'name' => 'xterm',
'description' => 'xterm terminal emulator (X Window System)',
'booleans' => [
'auto_left_margin' => false,
'auto_right_margin' => true,
'no_esc_ctlc' => false,
'ceol_standout_glitch' => false,
'eat_newline_glitch' => true,
'erase_overstrike' => false,
'generic_type' => false,
'hard_copy' => false,
'meta_key' => true,
'status_line' => false,
'insert_null_glitch' => false,
'memory_above' => false,
'memory_below' => false,
'move_insert_mode' => true,
'move_standout_mode' => true,
'over_strike' => false,
'status_line_esc_ok' => false,
'dest_tabs_magic_smso' => false,
'tilde_glitch' => false,
'transparent_underline' => false,
'xon_xoff' => false,
'needs_xon_xoff' => false,
'prtr_silent' => true,
'hard_cursor' => false,
'non_rev_rmcup' => false,
'no_pad_char' => true,
'non_dest_scroll_region' => false,
'can_change' => false,
'back_color_erase' => true,
'hue_lightness_saturation' => false,
'col_addr_glitch' => false,
'cr_cancels_micro_mode' => false,
'print_wheel' => false,
'row_addr_glitch' => false,
'semi_auto_right_margin' => false,
'cpi_changes_res' => false,
'lpi_changes_res' => false,
'backspaces_with_bs' => true
],
'numbers' => [
'columns' => 80,
'init_tabs' => 8,
'lines' => 24,
'lines_of_memory' => -1,
'magic_cookie_glitch' => -1,
'padding_baud_rate' => -1,
'virtual_terminal' => -1,
'width_status_line' => -1,
'num_labels' => -1,
'label_height' => -1,
'label_width' => -1,
'max_attributes' => -1,
'maximum_windows' => -1,
'max_colors' => 8,
'max_pairs' => 64
],
'strings' => [
'back_tab' => '',
'bell' => '',
'carriage_return' => '
',
'change_scroll_region' => '[%i%p1%d;%p2%dr',
'clear_all_tabs' => '',
'clear_screen' => '',
'clr_eol' => '',
'clr_eos' => '',
'column_address' => '[%i%p1%dG',
'cursor_address' => '[%i%p1%d;%p2%dH',
'cursor_down' => "\n",
'cursor_home' => '',
'cursor_invisible' => '[?25l',
'cursor_left' => '',
'cursor_normal' => '[?12l[?25h',
'cursor_right' => '',
'cursor_up' => '',
'cursor_visible' => '[?12;25h',
'delete_character' => '',
'delete_line' => '',
'enter_alt_charset_mode' => '(0',
'enter_blink_mode' => '',
'enter_bold_mode' => '',
'enter_ca_mode' => '[?1049h',
'enter_insert_mode' => '',
'enter_secure_mode' => '',
'enter_reverse_mode' => '',
'enter_standout_mode' => '',
'enter_underline_mode' => '',
'erase_chars' => '[%p1%dX',
'exit_alt_charset_mode' => '(B',
'exit_attribute_mode' => '(B',
'exit_ca_mode' => '[?1049l',
'exit_insert_mode' => '',
'exit_standout_mode' => '',
'exit_underline_mode' => '',
'flash_screen' => '[?5h$<100/>[?5l',
'init_2string' => '[!p[?3;4l>',
'insert_line' => '',
'key_backspace' => '',
'key_dc' => '[3~',
'key_down' => 'OB',
'key_f1' => 'OP',
'key_f10' => '[21~',
'key_f2' => 'OQ',
'key_f3' => 'OR',
'key_f4' => 'OS',
'key_f5' => '[15~',
'key_f6' => '[17~',
'key_f7' => '[18~',
'key_f8' => '[19~',
'key_f9' => '[20~',
'key_home' => 'OH',
'key_ic' => '[2~',
'key_left' => 'OD',
'key_npage' => '[6~',
'key_ppage' => '[5~',
'key_right' => 'OC',
'key_sf' => '',
'key_sr' => '',
'key_up' => 'OA',
'keypad_local' => '[?1l>',
'keypad_xmit' => '[?1h=',
'meta_off' => '[?1034l',
'meta_on' => '[?1034h',
'parm_dch' => '[%p1%dP',
'parm_delete_line' => '[%p1%dM',
'parm_down_cursor' => '[%p1%dB',
'parm_ich' => '[%p1%d@',
'parm_index' => '[%p1%dS',
'parm_insert_line' => '[%p1%dL',
'parm_left_cursor' => '[%p1%dD',
'parm_right_cursor' => '[%p1%dC',
'parm_rindex' => '[%p1%dT',
'parm_up_cursor' => '[%p1%dA',
'print_screen' => '',
'prtr_off' => '',
'prtr_on' => '',
'reset_1string' => 'c',
'reset_2string' => '[!p[?3;4l>',
'restore_cursor' => '8',
'row_address' => '[%i%p1%dd',
'save_cursor' => '7',
'scroll_forward' => "\n",
'scroll_reverse' => 'M',
'set_attributes' => '%?%p9%t(0%e(B%;[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m',
'set_tab' => 'H',
'tab' => ' ',
'key_b2' => 'OE',
'acs_chars' => '``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~',
'key_btab' => '',
'enter_am_mode' => '[?7h',
'exit_am_mode' => '[?7l',
'key_end' => 'OF',
'key_enter' => 'OM',
'key_sdc' => '[3;2~',
'key_send' => '',
'key_shome' => '',
'key_sic' => '[2;2~',
'key_sleft' => '',
'key_snext' => '[6;2~',
'key_sprevious' => '[5;2~',
'key_sright' => '',
'key_f11' => '[23~',
'key_f12' => '[24~',
'key_f13' => '',
'key_f14' => '',
'key_f15' => '',
'key_f16' => '',
'key_f17' => '[15;2~',
'key_f18' => '[17;2~',
'key_f19' => '[18;2~',
'key_f20' => '[19;2~',
'key_f21' => '[20;2~',
'key_f22' => '[21;2~',
'key_f23' => '[23;2~',
'key_f24' => '[24;2~',
'key_f25' => '',
'key_f26' => '',
'key_f27' => '',
'key_f28' => '',
'key_f29' => '[15;5~',
'key_f30' => '[17;5~',
'key_f31' => '[18;5~',
'key_f32' => '[19;5~',
'key_f33' => '[20;5~',
'key_f34' => '[21;5~',
'key_f35' => '[23;5~',
'key_f36' => '[24;5~',
'key_f37' => '',
'key_f38' => '',
'key_f39' => '',
'key_f40' => '',
'key_f41' => '[15;6~',
'key_f42' => '[17;6~',
'key_f43' => '[18;6~',
'key_f44' => '[19;6~',
'key_f45' => '[20;6~',
'key_f46' => '[21;6~',
'key_f47' => '[23;6~',
'key_f48' => '[24;6~',
'key_f49' => '',
'key_f50' => '',
'key_f51' => '',
'key_f52' => '',
'key_f53' => '[15;3~',
'key_f54' => '[17;3~',
'key_f55' => '[18;3~',
'key_f56' => '[19;3~',
'key_f57' => '[20;3~',
'key_f58' => '[21;3~',
'key_f59' => '[23;3~',
'key_f60' => '[24;3~',
'key_f61' => '',
'key_f62' => '',
'key_f63' => '',
'clr_bol' => '',
'user6' => '[%i%d;%dR',
'user7' => '',
'user8' => '[?1;2c',
'user9' => '',
'orig_pair' => '',
'set_foreground' => '[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m',
'set_background' => '[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m',
'key_mouse' => '',
'set_a_foreground' => '[3%p1%dm',
'set_a_background' => '[4%p1%dm',
'memory_lock' => 'l',
'memory_unlock' => 'm'
]
]);
}
public function case_has()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->has('auto_left_margin'))
->then
->boolean($result)
->isFalse()
->when($result = $tput->has('auto_right_margin'))
->then
->boolean($result)
->isTrue();
}
public function case_has_unknown_boolean()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->has('💩'))
->then
->boolean($result)
->isFalse();
}
public function case_count()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->count('columns'))
->then
->integer($result)
->isEqualTo(80);
}
public function case_count_unknown_integer()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->count('💩'))
->then
->integer($result)
->isEqualTo(0);
}
public function case_get()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->get('cursor_down'))
->then
->string($result)
->isEqualTo("\n");
}
public function case_get_unknown_string()
{
$this
->given($tput = new SUT('hoa://Library/Console/Terminfo/78/xterm'))
->when($result = $tput->get('💩'))
->then
->variable($result)
->isNull();
}
+475
Ver Arquivo
@@ -0,0 +1,475 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console\Test\Unit;
use Hoa\Console as LUT;
use Hoa\Console\Window as SUT;
use Hoa\File;
use Hoa\Test;
/**
* Class \Hoa\Console\Test\Unit\Window.
*
* Test suite of the window.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Window extends Test\Unit\Suite
{
public function beforeTestMethod($methodName)
{
parent::beforeTestMethod($methodName);
LUT::setTput(new LUT\Tput('hoa://Library/Console/Terminfo/78/xterm-256color'));
return;
}
public function case_get_instance()
{
$this
->when($result = SUT::getInstance())
->then
->object($result)
->isIdenticalTo(SUT::getInstance());
}
public function case_set_size()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setSize(7, 42))
->then
->output
->isEqualTo("\033[8;42;7t");
}
public function case_set_size_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::setSize(7, 42))
->then
->output
->isEmpty();
}
public function case_move_to()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::moveTo(7, 42))
->then
->output
->isEqualTo("\033[3;7;42t");
}
public function case_move_to_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::moveTo(7, 42))
->then
->output
->isEmpty();
}
public function case_get_position()
{
$this
->given(
$this->constant->OS_WIN = false,
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033[3;7;42t"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file))
)
->when($result = SUT::getPosition())
->then
->output
->isEqualTo("\033[13t")
->array($result)
->isEqualTo([
'x' => 7,
'y' => 42
]);
}
public function case_get_position_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when($result = SUT::getPosition())
->then
->variable($result)
->isNull()
->output
->isEmpty();
}
public function case_scroll_u()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('u'))
->then
->output
->isEqualTo("\033[1S");
}
public function case_scroll_up()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('up'))
->then
->output
->isEqualTo("\033[1S");
}
public function case_scroll_d()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('d'))
->then
->output
->isEqualTo("\033[1T");
}
public function case_scroll_down()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('d'))
->then
->output
->isEqualTo("\033[1T");
}
public function case_scroll_u_d_up_down()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('u d up down'))
->then
->output
->isEqualTo("\033[2S\033[2T");
}
public function case_scroll_up_repeated()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::scroll('up', 3))
->then
->output
->isEqualTo("\033[3S");
}
public function case_scroll_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::scroll('u'))
->then
->output
->isEmpty();
}
public function case_minimize()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::minimize())
->then
->output
->isEqualTo("\033[2t");
}
public function case_minimize_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::minimize())
->then
->output
->isEmpty();
}
public function case_restore()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::restore())
->then
->output
->isEqualTo("\033[1t");
}
public function case_restore_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::restore())
->then
->output
->isEmpty();
}
public function case_raise()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::raise())
->then
->output
->isEqualTo("\033[5t");
}
public function case_raise_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::raise())
->then
->output
->isEmpty();
}
public function case_lower()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::lower())
->then
->output
->isEqualTo("\033[6t");
}
public function case_lower_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::lower())
->then
->output
->isEmpty();
}
public function case_set_title()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::setTitle('foobar 😄'))
->then
->output
->isEqualTo("\033]0;foobar 😄\033\\");
}
public function case_set_title_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::setTitle('foobar 😄'))
->then
->output
->isEmpty();
}
public function case_get_title()
{
$this
->given(
$this->constant->OS_WIN = false,
$title = 'hello 🌍',
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033]l" . $title . "\033\\"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file)),
$this->function->stream_select = function () {
return 1;
}
)
->when($result = SUT::getTitle())
->then
->output
->isEqualTo("\033[21t")
->string($result)
->isEqualTo($title);
}
public function case_get_title_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when($result = SUT::getTitle())
->then
->variable($result)
->isNull()
->output
->isEmpty();
}
public function case_get_title_timed_out()
{
$this
->given(
$this->function->stream_select = function () {
return 0;
}
)
->when($result = SUT::getTitle())
->then
->output
->isEqualTo("\033[21t")
->variable($result)
->isNull();
}
public function case_get_label()
{
$this
->given(
$this->constant->OS_WIN = false,
$label = 'hello 🌍',
$file = new File\ReadWrite('hoa://Test/Vfs/Input?type=file'),
$file->writeAll("\033]L" . $label . "\033\\"),
$file->rewind(),
$input = LUT::setInput(new LUT\Input($file)),
$this->function->stream_select = function () {
return 1;
}
)
->when($result = SUT::getLabel())
->then
->output
->isEqualTo("\033[20t")
->string($result)
->isEqualTo($label);
}
public function case_get_label_timed_out()
{
$this
->given(
$this->function->stream_select = function () {
return 0;
}
)
->when($result = SUT::getLabel())
->then
->output
->isEqualTo("\033[20t")
->variable($result)
->isNull();
}
public function case_get_label_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when($result = SUT::getLabel())
->then
->variable($result)
->isNull()
->output
->isEmpty();
}
public function case_refresh()
{
$this
->given($this->constant->OS_WIN = false)
->when(SUT::refresh())
->then
->output
->isEqualTo("\033[7t");
}
public function case_refresh_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::refresh())
->then
->output
->isEmpty();
}
public function case_copy()
{
unset($_SERVER['TMUX']);
$this
->given($this->constant->OS_WIN = false)
->when(SUT::copy('bla'))
->then
->output
->isEqualTo("\033]52;;" . base64_encode('bla') . "\033\\");
}
public function case_copy_on_tmux()
{
$this
->given(
$_SERVER['TMUX'] = 'foo',
$this->constant->OS_WIN = false
)
->when(SUT::copy('bla'))
->then
->output
->isEqualTo(
"\033Ptmux;" .
"\033\033]52;;" . base64_encode('bla') . "\033\033\\" .
"\033\\"
);
}
public function case_copy_on_windows()
{
$this
->given($this->constant->OS_WIN = true)
->when(SUT::copy('bla'))
->then
->output
->isEmpty();
}
}
+845
Ver Arquivo
@@ -0,0 +1,845 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
/**
* Class \Hoa\Console\Tput.
*
* Query terminfo database.
* Resources:
* • http://man.cx/terminfo(5),
* • http://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html,
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Tput
{
/**
* Booleans.
*
* @var array
*/
protected static $_booleans = [
'auto_left_margin',
'auto_right_margin',
'no_esc_ctlc',
'ceol_standout_glitch',
'eat_newline_glitch',
'erase_overstrike',
'generic_type',
'hard_copy',
'meta_key', // originally has_meta_key
'status_line', // originally has_status_line
'insert_null_glitch',
'memory_above',
'memory_below',
'move_insert_mode',
'move_standout_mode',
'over_strike',
'status_line_esc_ok',
'dest_tabs_magic_smso',
'tilde_glitch',
'transparent_underline',
'xon_xoff',
'needs_xon_xoff',
'prtr_silent',
'hard_cursor',
'non_rev_rmcup',
'no_pad_char',
'non_dest_scroll_region',
'can_change',
'back_color_erase',
'hue_lightness_saturation',
'col_addr_glitch',
'cr_cancels_micro_mode',
'print_wheel', // originally has_print_wheel
'row_addr_glitch',
'semi_auto_right_margin',
'cpi_changes_res',
'lpi_changes_res',
// #ifdef __INTERNAL_CAPS_VISIBLE
'backspaces_with_bs',
'crt_no_scrolling',
'no_correctly_working_cr',
'gnu_meta_key', // originally gnu_has_meta_key
'linefeed_is_newline',
'hardware_tabs', // originally has_hardware_tabs
'return_does_clr_eol'
];
/**
* Numbers.
*
* @var array
*/
protected static $_numbers = [
'columns',
'init_tabs',
'lines',
'lines_of_memory',
'magic_cookie_glitch',
'padding_baud_rate',
'virtual_terminal',
'width_status_line',
'num_labels',
'label_height',
'label_width',
'max_attributes',
'maximum_windows',
'max_colors',
'max_pairs',
'no_color_video',
'buffer_capacity',
'dot_vert_spacing',
'dot_horz_spacing',
'max_micro_address',
'max_micro_jump',
'micro_col_size',
'micro_line_size',
'number_of_pins',
'output_res_char',
'output_res_line',
'output_res_horz_inch',
'output_res_vert_inch',
'print_rate',
'wide_char_size',
'buttons',
'bit_image_entwining',
'bit_image_type',
// #ifdef __INTERNAL_CAPS_VISIBLE
'magic_cookie_glitch_ul',
'carriage_return_delay',
'new_line_delay',
'backspace_delay',
'horizontal_tab_delay',
'number_of_function_keys'
];
/**
* Strings.
*
* @var array
*/
protected static $_strings = [
'back_tab',
'bell',
'carriage_return',
'change_scroll_region',
'clear_all_tabs',
'clear_screen',
'clr_eol',
'clr_eos',
'column_address',
'command_character',
'cursor_address',
'cursor_down',
'cursor_home',
'cursor_invisible',
'cursor_left',
'cursor_mem_address',
'cursor_normal',
'cursor_right',
'cursor_to_ll',
'cursor_up',
'cursor_visible',
'delete_character',
'delete_line',
'dis_status_line',
'down_half_line',
'enter_alt_charset_mode',
'enter_blink_mode',
'enter_bold_mode',
'enter_ca_mode',
'enter_delete_mode',
'enter_dim_mode',
'enter_insert_mode',
'enter_secure_mode',
'enter_protected_mode',
'enter_reverse_mode',
'enter_standout_mode',
'enter_underline_mode',
'erase_chars',
'exit_alt_charset_mode',
'exit_attribute_mode',
'exit_ca_mode',
'exit_delete_mode',
'exit_insert_mode',
'exit_standout_mode',
'exit_underline_mode',
'flash_screen',
'form_feed',
'from_status_line',
'init_1string',
'init_2string',
'init_3string',
'init_file',
'insert_character',
'insert_line',
'insert_padding',
'key_backspace',
'key_catab',
'key_clear',
'key_ctab',
'key_dc',
'key_dl',
'key_down',
'key_eic',
'key_eol',
'key_eos',
'key_f0',
'key_f1',
'key_f10',
'key_f2',
'key_f3',
'key_f4',
'key_f5',
'key_f6',
'key_f7',
'key_f8',
'key_f9',
'key_home',
'key_ic',
'key_il',
'key_left',
'key_ll',
'key_npage',
'key_ppage',
'key_right',
'key_sf',
'key_sr',
'key_stab',
'key_up',
'keypad_local',
'keypad_xmit',
'lab_f0',
'lab_f1',
'lab_f10',
'lab_f2',
'lab_f3',
'lab_f4',
'lab_f5',
'lab_f6',
'lab_f7',
'lab_f8',
'lab_f9',
'meta_off',
'meta_on',
'newline',
'pad_char',
'parm_dch',
'parm_delete_line',
'parm_down_cursor',
'parm_ich',
'parm_index',
'parm_insert_line',
'parm_left_cursor',
'parm_right_cursor',
'parm_rindex',
'parm_up_cursor',
'pkey_key',
'pkey_local',
'pkey_xmit',
'print_screen',
'prtr_off',
'prtr_on',
'repeat_char',
'reset_1string',
'reset_2string',
'reset_3string',
'reset_file',
'restore_cursor',
'row_address',
'save_cursor',
'scroll_forward',
'scroll_reverse',
'set_attributes',
'set_tab',
'set_window',
'tab',
'to_status_line',
'underline_char',
'up_half_line',
'init_prog',
'key_a1',
'key_a3',
'key_b2',
'key_c1',
'key_c3',
'prtr_non',
'char_padding',
'acs_chars',
'plab_norm',
'key_btab',
'enter_xon_mode',
'exit_xon_mode',
'enter_am_mode',
'exit_am_mode',
'xon_character',
'xoff_character',
'ena_acs',
'label_on',
'label_off',
'key_beg',
'key_cancel',
'key_close',
'key_command',
'key_copy',
'key_create',
'key_end',
'key_enter',
'key_exit',
'key_find',
'key_help',
'key_mark',
'key_message',
'key_move',
'key_next',
'key_open',
'key_options',
'key_previous',
'key_print',
'key_redo',
'key_reference',
'key_refresh',
'key_replace',
'key_restart',
'key_resume',
'key_save',
'key_suspend',
'key_undo',
'key_sbeg',
'key_scancel',
'key_scommand',
'key_scopy',
'key_screate',
'key_sdc',
'key_sdl',
'key_select',
'key_send',
'key_seol',
'key_sexit',
'key_sfind',
'key_shelp',
'key_shome',
'key_sic',
'key_sleft',
'key_smessage',
'key_smove',
'key_snext',
'key_soptions',
'key_sprevious',
'key_sprint',
'key_sredo',
'key_sreplace',
'key_sright',
'key_srsume',
'key_ssave',
'key_ssuspend',
'key_sundo',
'req_for_input',
'key_f11',
'key_f12',
'key_f13',
'key_f14',
'key_f15',
'key_f16',
'key_f17',
'key_f18',
'key_f19',
'key_f20',
'key_f21',
'key_f22',
'key_f23',
'key_f24',
'key_f25',
'key_f26',
'key_f27',
'key_f28',
'key_f29',
'key_f30',
'key_f31',
'key_f32',
'key_f33',
'key_f34',
'key_f35',
'key_f36',
'key_f37',
'key_f38',
'key_f39',
'key_f40',
'key_f41',
'key_f42',
'key_f43',
'key_f44',
'key_f45',
'key_f46',
'key_f47',
'key_f48',
'key_f49',
'key_f50',
'key_f51',
'key_f52',
'key_f53',
'key_f54',
'key_f55',
'key_f56',
'key_f57',
'key_f58',
'key_f59',
'key_f60',
'key_f61',
'key_f62',
'key_f63',
'clr_bol',
'clear_margins',
'set_left_margin',
'set_right_margin',
'label_format',
'set_clock',
'display_clock',
'remove_clock',
'create_window',
'goto_window',
'hangup',
'dial_phone',
'quick_dial',
'tone',
'pulse',
'flash_hook',
'fixed_pause',
'wait_tone',
'user0',
'user1',
'user2',
'user3',
'user4',
'user5',
'user6',
'user7',
'user8',
'user9',
'orig_pair',
'orig_colors',
'initialize_color',
'initialize_pair',
'set_color_pair',
'set_foreground',
'set_background',
'change_char_pitch',
'change_line_pitch',
'change_res_horz',
'change_res_vert',
'define_char',
'enter_doublewide_mode',
'enter_draft_quality',
'enter_italics_mode',
'enter_leftward_mode',
'enter_micro_mode',
'enter_near_letter_quality',
'enter_normal_quality',
'enter_shadow_mode',
'enter_subscript_mode',
'enter_superscript_mode',
'enter_upward_mode',
'exit_doublewide_mode',
'exit_italics_mode',
'exit_leftward_mode',
'exit_micro_mode',
'exit_shadow_mode',
'exit_subscript_mode',
'exit_superscript_mode',
'exit_upward_mode',
'micro_column_address',
'micro_down',
'micro_left',
'micro_right',
'micro_row_address',
'micro_up',
'order_of_pins',
'parm_down_micro',
'parm_left_micro',
'parm_right_micro',
'parm_up_micro',
'select_char_set',
'set_bottom_margin',
'set_bottom_margin_parm',
'set_left_margin_parm',
'set_right_margin_parm',
'set_top_margin',
'set_top_margin_parm',
'start_bit_image',
'start_char_set_def',
'stop_bit_image',
'stop_char_set_def',
'subscript_characters',
'superscript_characters',
'these_cause_cr',
'zero_motion',
'char_set_names',
'key_mouse',
'mouse_info',
'req_mouse_pos',
'get_mouse',
'set_a_foreground',
'set_a_background',
'pkey_plab',
'device_type',
'code_set_init',
'set0_des_seq',
'set1_des_seq',
'set2_des_seq',
'set3_des_seq',
'set_lr_margin',
'set_tb_margin',
'bit_image_repeat',
'bit_image_newline',
'bit_image_carriage_return',
'color_names',
'define_bit_image_region',
'end_bit_image_region',
'set_color_band',
'set_page_length',
'display_pc_char',
'enter_pc_charset_mode',
'exit_pc_charset_mode',
'enter_scancode_mode',
'exit_scancode_mode',
'pc_term_options',
'scancode_escape',
'alt_scancode_esc',
'enter_horizontal_hl_mode',
'enter_left_hl_mode',
'enter_low_hl_mode',
'enter_right_hl_mode',
'enter_top_hl_mode',
'enter_vertical_hl_mode',
'set_a_attributes',
'set_pglen_inch',
// #ifdef __INTERNAL_CAPS_VISIBLE
'termcap_init2',
'termcap_reset',
'linefeed_if_not_lf',
'backspace_if_not_bs',
'other_non_function_keys',
'arrow_key_map',
'acs_ulcorner',
'acs_llcorner',
'acs_urcorner',
'acs_lrcorner',
'acs_ltee',
'acs_rtee',
'acs_btee',
'acs_ttee',
'acs_hline',
'acs_vline',
'acs_plus',
'memory_lock',
'memory_unlock',
'box_chars_1'
];
/**
* Computed informations.
*
* @var array
*/
protected $_informations = [];
/**
* Set stream and parse.
*
* @param string $terminfo Terminfo file.
*/
public function __construct($terminfo = null)
{
if (null === $terminfo) {
$terminfo = static::getTerminfo();
}
$this->parse($terminfo);
return;
}
/**
* Parse.
*
* @param string $terminfo Terminfo file.
* @return array
* @throws \Hoa\Console\Exception
*/
protected function parse($terminfo)
{
if (!file_exists($terminfo)) {
throw new Exception(
'Terminfo file %s does not exist.',
0,
$terminfo
);
}
$data = file_get_contents($terminfo);
$length = strlen($data);
$out = ['file' => $terminfo];
$headers = [
'data_size' => $length,
'header_size' => 12,
'magic_number' => (ord($data[ 1]) << 8) | ord($data[ 0]),
'names_size' => (ord($data[ 3]) << 8) | ord($data[ 2]),
'bool_count' => (ord($data[ 5]) << 8) | ord($data[ 4]),
'number_count' => (ord($data[ 7]) << 8) | ord($data[ 6]),
'string_count' => (ord($data[ 9]) << 8) | ord($data[ 8]),
'string_table_size' => (ord($data[11]) << 8) | ord($data[10]),
];
$out['headers'] = $headers;
// Names.
$i = $headers['header_size'];
$nameAndDescription = explode('|', substr($data, $i, $headers['names_size'] - 1));
$out['name'] = $nameAndDescription[0];
$out['description'] = $nameAndDescription[1];
// Booleans.
$i += $headers['names_size'];
$booleans = [];
$booleanNames = &static::$_booleans;
for (
$e = 0, $max = $i + $headers['bool_count'];
$i < $max;
++$e, ++$i
) {
$booleans[$booleanNames[$e]] = 1 === ord($data[$i]);
}
$out['booleans'] = $booleans;
// Numbers.
if (1 === ($i % 2)) {
++$i;
}
$numbers = [];
$numberNames = &static::$_numbers;
for (
$e = 0, $max = $i + $headers['number_count'] * 2;
$i < $max;
++$e, $i += 2
) {
$name = $numberNames[$e];
$data_i0 = ord($data[$i ]);
$data_i1 = ord($data[$i + 1]);
if ($data_i1 === 255 && $data_i0 === 255) {
$numbers[$name] = -1;
} else {
$numbers[$name] = ($data_i1 << 8) | $data_i0;
}
}
$out['numbers'] = $numbers;
// Strings.
$strings = [];
$stringNames = &static::$_strings;
$ii = $i + $headers['string_count'] * 2;
for (
$e = 0, $max = $ii;
$i < $max;
++$e, $i += 2
) {
$name = $stringNames[$e];
$data_i0 = ord($data[$i ]);
$data_i1 = ord($data[$i + 1]);
if ($data_i1 === 255 && $data_i0 === 255) {
continue;
}
$a = ($data_i1 << 8) | $data_i0;
$strings[$name] = $a;
if (65534 === $a) {
continue;
}
$b = $ii + $a;
$c = $b;
while ($c < $length && ord($data[$c])) {
$c++;
}
$value = substr($data, $b, $c - $b);
$strings[$name] = false !== $value ? $value : null;
}
$out['strings'] = $strings;
return $this->_informations = $out;
}
/**
* Get all informations.
*
* @return array
*/
public function getInformations()
{
return $this->_informations;
}
/**
* Get a boolean value.
*
* @param bool $boolean Boolean.
* @return bool
*/
public function has($boolean)
{
if (!isset($this->_informations['booleans'][$boolean])) {
return false;
}
return $this->_informations['booleans'][$boolean];
}
/**
* Get a number value.
*
* @param int $number Number.
* @return int
*/
public function count($number)
{
if (!isset($this->_informations['numbers'][$number])) {
return 0;
}
return $this->_informations['numbers'][$number];
}
/**
* Get a string value.
*
* @param string $string String.
* @return int
*/
public function get($string)
{
if (!isset($this->_informations['strings'][$string])) {
return null;
}
return $this->_informations['strings'][$string];
}
/**
* Get current term profile.
*
* @return string
*/
public static function getTerm()
{
return
isset($_SERVER['TERM']) && !empty($_SERVER['TERM'])
? $_SERVER['TERM']
: (OS_WIN ? 'windows-ansi' : 'xterm');
}
/**
* Get pathname to the current terminfo.
*
* @param string $term Term.
* @return string
*/
public static function getTerminfo($term = null)
{
$paths = [];
if (isset($_SERVER['TERMINFO'])) {
$paths[] = $_SERVER['TERMINFO'];
}
if (isset($_SERVER['HOME'])) {
$paths[] = $_SERVER['HOME'] . DS . '.terminfo';
}
if (isset($_SERVER['TERMINFO_DIRS'])) {
foreach (explode(':', $_SERVER['TERMINFO_DIRS']) as $path) {
$paths[] = $path;
}
}
$paths[] = '/usr/share/terminfo';
$paths[] = '/usr/share/lib/terminfo';
$paths[] = '/lib/terminfo';
$paths[] = '/usr/lib/terminfo';
$paths[] = '/usr/local/share/terminfo';
$paths[] = '/usr/local/share/lib/terminfo';
$paths[] = '/usr/local/lib/terminfo';
$paths[] = '/usr/local/ncurses/lib/terminfo';
$paths[] = 'hoa://Library/Console/Terminfo';
$term = $term ?: static::getTerm();
$fileHexa = dechex(ord($term[0])) . DS . $term;
$fileAlpha = $term[0] . DS . $term;
$pathname = null;
foreach ($paths as $path) {
if (file_exists($_ = $path . DS . $fileHexa) ||
file_exists($_ = $path . DS . $fileAlpha)) {
$pathname = $_;
break;
}
}
if (null === $pathname && 'xterm' !== $term) {
return static::getTerminfo('xterm');
}
return $pathname;
}
}
+579
Ver Arquivo
@@ -0,0 +1,579 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\Console;
use Hoa\Event;
/**
* Class \Hoa\Console\Window.
*
* Allow to manipulate the window.
*
* We can listen the event channel hoa://Event/Console/Window:resize to detect
* if the window has been resized. Please, see the constructor documentation to
* get more informations.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Window implements Event\Source
{
/**
* Singleton (only for events).
*
* @var \Hoa\Console\Window
*/
private static $_instance = null;
/**
* Set the event channel.
* We need to declare(ticks = 1) in the main script to ensure that the event
* is fired. Also, we need the pcntl_signal() function enabled.
*
*/
private function __construct()
{
Event::register(
'hoa://Event/Console/Window:resize',
$this
);
return;
}
/**
* Singleton.
*
* @return \Hoa\Console\Window
*/
public static function getInstance()
{
if (null === static::$_instance) {
static::$_instance = new static();
}
return static::$_instance;
}
/**
* Set size to X lines and Y columns.
*
* @param int $x X coordinate.
* @param int $y Y coordinate.
* @return void
*/
public static function setSize($x, $y)
{
if (OS_WIN) {
return;
}
Console::getOutput()->writeAll("\033[8;" . $y . ";" . $x . "t");
return;
}
/**
* Get current size (x and y) of the window.
*
* @return array
*/
public static function getSize()
{
if (OS_WIN) {
$modecon = explode("\n", ltrim(Processus::execute('mode con')));
$_y = trim($modecon[2]);
preg_match('#[^:]+:\s*([0-9]+)#', $_y, $matches);
$y = (int) $matches[1];
$_x = trim($modecon[3]);
preg_match('#[^:]+:\s*([0-9]+)#', $_x, $matches);
$x = (int) $matches[1];
return [
'x' => $x,
'y' => $y
];
}
$term = '';
if (isset($_SERVER['TERM'])) {
$term = 'TERM="' . $_SERVER['TERM'] . '" ';
}
$command = $term . 'tput cols && ' . $term . 'tput lines';
$tput = Processus::execute($command, false);
if (!empty($tput)) {
list($x, $y) = explode("\n", $tput);
return [
'x' => intval($x),
'y' => intval($y)
];
}
// DECSLPP.
Console::getOutput()->writeAll("\033[18t");
$input = Console::getInput();
// Read \033[8;y;xt.
$input->read(4); // skip \033, [, 8 and ;.
$x = null;
$y = null;
$handle = &$y;
do {
$char = $input->readCharacter();
switch ($char) {
case ';':
$handle = &$x;
break;
case 't':
break 2;
default:
if (false === ctype_digit($char)) {
break 2;
}
$handle .= $char;
}
} while (true);
if (null === $x || null === $y) {
return [
'x' => 0,
'y' => 0
];
}
return [
'x' => (int) $x,
'y' => (int) $y
];
}
/**
* Move to X and Y (in pixels).
*
* @param int $x X coordinate.
* @param int $y Y coordinate.
* @return void
*/
public static function moveTo($x, $y)
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[3;" . $x . ";" . $y . "t");
return;
}
/**
* Get current position (x and y) of the window (in pixels).
*
* @return array
*/
public static function getPosition()
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[13t");
$input = Console::getInput();
// Read \033[3;x;yt.
$input->read(4); // skip \033, [, 3 and ;.
$x = null;
$y = null;
$handle = &$x;
do {
$char = $input->readCharacter();
switch ($char) {
case ';':
$handle = &$y;
break;
case 't':
break 2;
default:
$handle .= $char;
}
} while (true);
return [
'x' => (int) $x,
'y' => (int) $y
];
}
/**
* Scroll whole page.
* Directions can be:
* • u, up, ↑ : scroll whole page up;
* • d, down, ↓ : scroll whole page down.
* Directions can be concatenated by a single space.
*
* @param string $directions Directions.
* @param int $repeat How many times do we scroll?
* @return void
*/
public static function scroll($directions, $repeat = 1)
{
if (OS_WIN) {
return;
}
if (1 > $repeat) {
return;
} elseif (1 === $repeat) {
$handle = explode(' ', $directions);
} else {
$handle = explode(' ', $directions, 1);
}
$tput = Console::getTput();
$count = ['up' => 0, 'down' => 0];
foreach ($handle as $direction) {
switch ($direction) {
case 'u':
case 'up':
case '↑':
++$count['up'];
break;
case 'd':
case 'down':
case '↓':
++$count['down'];
break;
}
}
$output = Console::getOutput();
if (0 < $count['up']) {
$output->writeAll(
str_replace(
'%p1%d',
$count['up'] * $repeat,
$tput->get('parm_index')
)
);
}
if (0 < $count['down']) {
$output->writeAll(
str_replace(
'%p1%d',
$count['down'] * $repeat,
$tput->get('parm_rindex')
)
);
}
return;
}
/**
* Minimize the window.
*
* @return void
*/
public static function minimize()
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[2t");
return;
}
/**
* Restore the window (de-minimize).
*
* @return void
*/
public static function restore()
{
if (OS_WIN) {
return;
}
Console::getOutput()->writeAll("\033[1t");
return;
}
/**
* Raise the window to the front of the stacking order.
*
* @return void
*/
public static function raise()
{
if (OS_WIN) {
return;
}
Console::getOutput()->writeAll("\033[5t");
return;
}
/**
* Lower the window to the bottom of the stacking order.
*
* @return void
*/
public static function lower()
{
if (OS_WIN) {
return;
}
Console::getOutput()->writeAll("\033[6t");
return;
}
/**
* Set title.
*
* @param string $title Title.
* @return void
*/
public static function setTitle($title)
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033]0;" . $title . "\033\\");
return;
}
/**
* Get title.
*
* @return string
*/
public static function getTitle()
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[21t");
$input = Console::getInput();
$read = [$input->getStream()->getStream()];
$write = [];
$except = [];
$out = null;
if (0 === stream_select($read, $write, $except, 0, 50000)) {
return $out;
}
// Read \033]l<title>\033\
$input->read(3); // skip \033, ] and l.
do {
$char = $input->readCharacter();
if ("\033" === $char) {
$chaar = $input->readCharacter();
if ('\\' === $chaar) {
break;
}
$char .= $chaar;
}
$out .= $char;
} while (true);
return $out;
}
/**
* Get label.
*
* @return string
*/
public static function getLabel()
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[20t");
$input = Console::getInput();
$read = [$input->getStream()->getStream()];
$write = [];
$except = [];
$out = null;
if (0 === stream_select($read, $write, $except, 0, 50000)) {
return $out;
}
// Read \033]L<label>\033\
$input->read(3); // skip \033, ] and L.
do {
$char = $input->readCharacter();
if ("\033" === $char) {
$chaar = $input->readCharacter();
if ('\\' === $chaar) {
break;
}
$char .= $chaar;
}
$out .= $char;
} while (true);
return $out;
}
/**
* Refresh the window.
*
* @return void
*/
public static function refresh()
{
if (OS_WIN) {
return;
}
// DECSLPP.
Console::getOutput()->writeAll("\033[7t");
return;
}
/**
* Set clipboard value.
*
* @param string $data Data to copy.
* @return void
*/
public static function copy($data)
{
if (OS_WIN) {
return;
}
$out = "\033]52;;" . base64_encode($data) . "\033\\";
$output = Console::getOutput();
$considerMultiplexer = $output->considerMultiplexer(true);
$output->writeAll($out);
$output->considerMultiplexer($considerMultiplexer);
return;
}
}
/**
* Advanced interaction.
*/
Console::advancedInteraction();
/**
* Event.
*/
if (function_exists('pcntl_signal')) {
Window::getInstance();
pcntl_signal(
SIGWINCH,
function () {
static $_window = null;
if (null === $_window) {
$_window = Window::getInstance();
}
Event::notify(
'hoa://Event/Console/Window:resize',
$_window,
new Event\Bucket([
'size' => Window::getSize()
])
);
}
);
}
+54
Ver Arquivo
@@ -0,0 +1,54 @@
{
"name" : "hoa/console",
"description": "The Hoa\\Console library.",
"type" : "library",
"keywords" : ["library", "console", "processus", "getoption", "option",
"cli", "parser", "readline", "autocompletion", "chrome",
"cursor", "window", "tput", "terminfo"],
"homepage" : "https://hoa-project.net/",
"license" : "BSD-3-Clause",
"authors" : [
{
"name" : "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name" : "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"support": {
"email" : "support@hoa-project.net",
"irc" : "irc://chat.freenode.net/hoaproject",
"forum" : "https://users.hoa-project.net/",
"docs" : "https://central.hoa-project.net/Documentation/Library/Console",
"source": "https://central.hoa-project.net/Resource/Library/Console"
},
"require": {
"hoa/consistency": "~1.0",
"hoa/event" : "~1.0",
"hoa/exception" : "~1.0",
"hoa/file" : "~1.0",
"hoa/protocol" : "~1.0",
"hoa/stream" : "~1.0",
"hoa/ustring" : "~4.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"autoload": {
"psr-4": {
"Hoa\\Console\\": "."
}
},
"suggest": {
"hoa/dispatcher": "To use the console kit.",
"hoa/router" : "To use the console kit.",
"ext-pcntl" : "To enable hoa://Event/Console/Window:resize."
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
}
}
+2
Ver Arquivo
@@ -0,0 +1,2 @@
/vendor/
/composer.lock
+71
Ver Arquivo
@@ -0,0 +1,71 @@
# 1.17.07.11
* doc(api) Rewrite `copy` definition. (Ivan Enderlin, 2017-07-11T09:35:10+02:00)
* fix(directory) Use read-only mode when copying. (Ivan Enderlin, 2017-07-06T13:34:16+02:00)
* chore(cs) Remove an empty line. (Ivan Enderlin, 2017-07-06T13:32:34+02:00)
# 1.17.01.13
* Quality: Happy new year! (Alexis von Glasow, 2017-01-10T12:56:03+01:00)
* Quality: Fix CS. (Ivan Enderlin, 2016-10-13T22:51:31+02:00)
* Finder: Better variable semantics in `in`. (Ivan Enderlin, 2016-10-13T22:47:37+02:00)
* Finder: Reduce error vulnerability. (Ivan Enderlin, 2016-10-13T22:43:03+02:00)
* Add Glob pattern handling in the `Finder` (Stéphane HULARD, 2015-11-12T22:28:20+01:00)
* Documentation: Update `support` properties. (Ivan Enderlin, 2016-10-05T20:43:22+02:00)
* Composer: New stable library. (Ivan Enderlin, 2016-01-14T21:55:56+01:00)
# 1.16.01.15
* Composer: New stable library. (Ivan Enderlin, 2016-01-14T21:54:42+01:00)
# 1.16.01.14
* Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:26+01:00)
* Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T09:02:11+01:00)
* Core: Remove `Hoa\Core`. (Ivan Enderlin, 2016-01-09T08:16:42+01:00)
* Consistency: Use `Hoa\Consistency`. (Ivan Enderlin, 2015-12-08T11:13:39+01:00)
* Event: Use `Hoa\Event`. (Ivan Enderlin, 2015-11-23T22:08:07+01:00)
* Exception: Use `Hoa\Exception`. (Ivan Enderlin, 2015-11-20T07:47:57+01:00)
* Fix API documentation, type-hints & co. (Ivan Enderlin, 2015-11-09T08:09:46+01:00)
# 0.15.11.09
* Add a `.gitignore` file. (Stéphane HULARD, 2015-08-03T11:30:34+02:00)
# 0.15.05.27
* `getSize` returns `false` if stream is unstatable. (Ivan Enderlin, 2015-05-27T11:05:46+02:00)
* `getStatistic` works on the stream pointer. (Ivan Enderlin, 2015-05-27T11:04:26+02:00)
# 0.15.05.12
* Move to PSR-1 and PSR-2. (Ivan Enderlin, 2015-05-12T10:23:01+02:00)
* Remove `from`/`import`. (Ivan Enderlin, 2015-05-12T10:00:37+02:00)
# 0.15.02.19
* Add the CHANGELOG.md file. (Ivan Enderlin, 2015-02-19T09:00:34+01:00)
* Happy new year! (Ivan Enderlin, 2015-01-05T14:30:33+01:00)
# 0.14.12.10
* Move to PSR-4. (Ivan Enderlin, 2014-12-09T13:48:14+01:00)
# 0.14.11.26
* Format the `composer.json` file. (Ivan Enderlin, 2014-11-25T14:08:32+01:00)
* Require `hoa/test`. (Alexis von Glasow, 2014-11-25T13:50:25+01:00)
# 0.14.11.09
* Use `hoa/iterator` `~1.0`. (Ivan Enderlin, 2014-11-09T11:00:47+01:00)
# 0.14.09.23
* Add `branch-alias`. (Stéphane PY, 2014-09-23T11:50:42+02:00)
# 0.14.09.17
* Drop PHP5.3. (Ivan Enderlin, 2014-09-17T17:03:25+02:00)
(first snapshot)
+277
Ver Arquivo
@@ -0,0 +1,277 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File;
use Hoa\Stream;
/**
* Class \Hoa\File\Directory.
*
* Directory handler.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Directory extends Generic
{
/**
* Open for reading.
*
* @const string
*/
const MODE_READ = 'rb';
/**
* Open for reading and writing. If the directory does not exist, attempt to
* create it.
*
* @const string
*/
const MODE_CREATE = 'xb';
/**
* Open for reading and writing. If the directory does not exist, attempt to
* create it recursively.
*
* @const string
*/
const MODE_CREATE_RECURSIVE = 'xrb';
/**
* Open a directory.
*
* @param string $streamName Stream name.
* @param string $mode Open mode, see the self::MODE* constants.
* @param string $context Context ID (please, see the
* \Hoa\Stream\Context class).
* @param bool $wait Differ opening or not.
*/
public function __construct(
$streamName,
$mode = self::MODE_READ,
$context = null,
$wait = false
) {
$this->setMode($mode);
parent::__construct($streamName, $context, $wait);
return;
}
/**
* Open the stream and return the associated resource.
*
* @param string $streamName Stream name (e.g. path or URL).
* @param \Hoa\Stream\Context $context Context.
* @return resource
* @throws \Hoa\File\Exception\FileDoesNotExist
* @throws \Hoa\File\Exception
*/
protected function &_open($streamName, Stream\Context $context = null)
{
if (false === is_dir($streamName)) {
if ($this->getMode() == self::MODE_READ) {
throw new Exception\FileDoesNotExist(
'Directory %s does not exist.',
0,
$streamName
);
} else {
self::create(
$streamName,
$this->getMode(),
null !== $context
? $context->getContext()
: null
);
}
}
$out = null;
return $out;
}
/**
* Close the current stream.
*
* @return bool
*/
protected function _close()
{
return true;
}
/**
* Recursive copy of a directory.
*
* @param string $to Destination path.
* @param bool $force Force to copy if the file $to already exists.
* Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
* constants.
* @return bool
* @throws \Hoa\File\Exception
*/
public function copy($to, $force = Stream\IStream\Touchable::DO_NOT_OVERWRITE)
{
if (empty($to)) {
throw new Exception(
'The destination path (to copy) is empty.',
1
);
}
$from = $this->getStreamName();
$fromLength = strlen($from) + 1;
$finder = new Finder();
$finder->in($from);
self::create($to, self::MODE_CREATE_RECURSIVE);
foreach ($finder as $file) {
$relative = substr($file->getPathname(), $fromLength);
$_to = $to . DS . $relative;
if (true === $file->isDir()) {
self::create($_to, self::MODE_CREATE);
continue;
}
// This is not possible to do `$file->open()->copy();
// $file->close();` because the file will be opened in read and
// write mode. In a PHAR for instance, this operation is
// forbidden. So a special care must be taken to open file in read
// only mode.
$handle = null;
if (true === $file->isFile()) {
$handle = new Read($file->getPathname());
} elseif (true === $file->isDir()) {
$handle = new Directory($file->getPathName());
} elseif (true === $file->isLink()) {
$handle = new Link\Read($file->getPathName());
}
if (null !== $handle) {
$handle->copy($_to, $force);
$handle->close();
}
}
return true;
}
/**
* Delete a directory.
*
* @return bool
*/
public function delete()
{
$from = $this->getStreamName();
$finder = new Finder();
$finder->in($from)
->childFirst();
foreach ($finder as $file) {
$file->open()->delete();
$file->close();
}
if (null === $this->getStreamContext()) {
return @rmdir($from);
}
return @rmdir($from, $this->getStreamContext()->getContext());
}
/**
* Create a directory.
*
* @param string $name Directory name.
* @param string $mode Create mode. Please, see the self::MODE_CREATE*
* constants.
* @param string $context Context ID (please, see the
* \Hoa\Stream\Context class).
* @return bool
* @throws \Hoa\File\Exception
*/
public static function create(
$name,
$mode = self::MODE_CREATE_RECURSIVE,
$context = null
) {
if (true === is_dir($name)) {
return true;
}
if (empty($name)) {
return false;
}
if (null !== $context) {
if (false === Stream\Context::contextExists($context)) {
throw new Exception(
'Context %s was not previously declared, cannot retrieve ' .
'this context.',
2,
$context
);
} else {
$context = Stream\Context::getInstance($context);
}
}
if (null === $context) {
return @mkdir(
$name,
0755,
self::MODE_CREATE_RECURSIVE === $mode
);
}
return @mkdir(
$name,
0755,
self::MODE_CREATE_RECURSIVE === $mode,
$context->getContext()
);
}
}
+57
Ver Arquivo
@@ -0,0 +1,57 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File\Exception;
use Hoa\Consistency;
use Hoa\Exception as HoaException;
/**
* Class \Hoa\File\Exception.
*
* Extending the \Hoa\Exception\Exception class.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Exception extends HoaException
{
}
/**
* Flex entity.
*/
Consistency::flexEntity('Hoa\File\Exception\Exception');
+49
Ver Arquivo
@@ -0,0 +1,49 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File\Exception;
/**
* Class \Hoa\File\Exception\FileDoesNotExist.
*
* Extending the \Hoa\File\Exception class.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class FileDoesNotExist extends Exception
{
}
+374
Ver Arquivo
@@ -0,0 +1,374 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File;
use Hoa\Consistency;
use Hoa\Stream;
/**
* Class \Hoa\File.
*
* File handler.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
abstract class File
extends Generic
implements Stream\IStream\Bufferable,
Stream\IStream\Lockable,
Stream\IStream\Pointable
{
/**
* Open for reading only; place the file pointer at the beginning of the
* file.
*
* @const string
*/
const MODE_READ = 'rb';
/**
* Open for reading and writing; place the file pointer at the beginning of
* the file.
*
* @const string
*/
const MODE_READ_WRITE = 'r+b';
/**
* Open for writing only; place the file pointer at the beginning of the
* file and truncate the file to zero length. If the file does not exist,
* attempt to create it.
*
* @const string
*/
const MODE_TRUNCATE_WRITE = 'wb';
/**
* Open for reading and writing; place the file pointer at the beginning of
* the file and truncate the file to zero length. If the file does not
* exist, attempt to create it.
*
* @const string
*/
const MODE_TRUNCATE_READ_WRITE = 'w+b';
/**
* Open for writing only; place the file pointer at the end of the file. If
* the file does not exist, attempt to create it.
*
* @const string
*/
const MODE_APPEND_WRITE = 'ab';
/**
* Open for reading and writing; place the file pointer at the end of the
* file. If the file does not exist, attempt to create it.
*
* @const string
*/
const MODE_APPEND_READ_WRITE = 'a+b';
/**
* Create and open for writing only; place the file pointer at the beginning
* of the file. If the file already exits, the fopen() call with fail by
* returning false and generating an error of level E_WARNING. If the file
* does not exist, attempt to create it. This is equivalent to specifying
* O_EXCL | O_CREAT flags for the underlying open(2) system call.
*
* @const string
*/
const MODE_CREATE_WRITE = 'xb';
/**
* Create and open for reading and writing; place the file pointer at the
* beginning of the file. If the file already exists, the fopen() call with
* fail by returning false and generating an error of level E_WARNING. If
* the file does not exist, attempt to create it. This is equivalent to
* specifying O_EXCL | O_CREAT flags for the underlying open(2) system call.
*
* @const string
*/
const MODE_CREATE_READ_WRITE = 'x+b';
/**
* Open a file.
*
* @param string $streamName Stream name (or file descriptor).
* @param string $mode Open mode, see the self::MODE_*
* constants.
* @param string $context Context ID (please, see the
* \Hoa\Stream\Context class).
* @param bool $wait Differ opening or not.
* @throws \Hoa\File\Exception
*/
public function __construct(
$streamName,
$mode,
$context = null,
$wait = false
) {
$this->setMode($mode);
switch ($streamName) {
case '0':
$streamName = 'php://stdin';
break;
case '1':
$streamName = 'php://stdout';
break;
case '2':
$streamName = 'php://stderr';
break;
default:
if (true === ctype_digit($streamName)) {
if (PHP_VERSION_ID >= 50306) {
$streamName = 'php://fd/' . $streamName;
} else {
throw new Exception(
'You need PHP5.3.6 to use a file descriptor ' .
'other than 0, 1 or 2 (tried %d with PHP%s).',
0,
[$streamName, PHP_VERSION]
);
}
}
}
parent::__construct($streamName, $context, $wait);
return;
}
/**
* Open the stream and return the associated resource.
*
* @param string $streamName Stream name (e.g. path or URL).
* @param \Hoa\Stream\Context $context Context.
* @return resource
* @throws \Hoa\File\Exception\FileDoesNotExist
* @throws \Hoa\File\Exception
*/
protected function &_open($streamName, Stream\Context $context = null)
{
if (substr($streamName, 0, 4) == 'file' &&
false === is_dir(dirname($streamName))) {
throw new Exception(
'Directory %s does not exist. Could not open file %s.',
1,
[dirname($streamName), basename($streamName)]
);
}
if (null === $context) {
if (false === $out = @fopen($streamName, $this->getMode(), true)) {
throw new Exception(
'Failed to open stream %s.',
2,
$streamName
);
}
return $out;
}
$out = @fopen(
$streamName,
$this->getMode(),
true,
$context->getContext()
);
if (false === $out) {
throw new Exception(
'Failed to open stream %s.',
3,
$streamName
);
}
return $out;
}
/**
* Close the current stream.
*
* @return bool
*/
protected function _close()
{
return @fclose($this->getStream());
}
/**
* Start a new buffer.
* The callable acts like a light filter.
*
* @param mixed $callable Callable.
* @param int $size Size.
* @return int
*/
public function newBuffer($callable = null, $size = null)
{
$this->setStreamBuffer($size);
//@TODO manage $callable as a filter?
return 1;
}
/**
* Flush the output to a stream.
*
* @return bool
*/
public function flush()
{
return fflush($this->getStream());
}
/**
* Delete buffer.
*
* @return bool
*/
public function deleteBuffer()
{
return $this->disableStreamBuffer();
}
/**
* Get bufffer level.
*
* @return int
*/
public function getBufferLevel()
{
return 1;
}
/**
* Get buffer size.
*
* @return int
*/
public function getBufferSize()
{
return $this->getStreamBufferSize();
}
/**
* Portable advisory locking.
*
* @param int $operation Operation, use the
* \Hoa\Stream\IStream\Lockable::LOCK_* constants.
* @return bool
*/
public function lock($operation)
{
return flock($this->getStream(), $operation);
}
/**
* Rewind the position of a stream pointer.
*
* @return bool
*/
public function rewind()
{
return rewind($this->getStream());
}
/**
* Seek on a stream pointer.
*
* @param int $offset Offset (negative value should be supported).
* @param int $whence Whence, use the
* \Hoa\Stream\IStream\Pointable::SEEK_* constants.
* @return int
*/
public function seek($offset, $whence = Stream\IStream\Pointable::SEEK_SET)
{
return fseek($this->getStream(), $offset, $whence);
}
/**
* Get the current position of the stream pointer.
*
* @return int
*/
public function tell()
{
$stream = $this->getStream();
if (null === $stream) {
return 0;
}
return ftell($stream);
}
/**
* Create a file.
*
* @param string $name File name.
* @param mixed $dummy To be compatible with childs.
* @return bool
*/
public static function create($name, $dummy)
{
if (file_exists($name)) {
return true;
}
return touch($name);
}
}
/**
* Flex entity.
*/
Consistency::flexEntity('Hoa\File\File');
+757
Ver Arquivo
@@ -0,0 +1,757 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File;
use Hoa\Iterator;
/**
* Class \Hoa\File\Finder.
*
* This class allows to find files easily by using filters and flags.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Finder implements Iterator\Aggregate
{
/**
* SplFileInfo classname.
*
* @var string
*/
protected $_splFileInfo = 'Hoa\File\SplFileInfo';
/**
* Paths where to look for.
*
* @var array
*/
protected $_paths = [];
/**
* Max depth in recursion.
*
* @var int
*/
protected $_maxDepth = -1;
/**
* Filters.
*
* @var array
*/
protected $_filters = [];
/**
* Flags.
*
* @var int
*/
protected $_flags = -1;
/**
* Types of files to handle.
*
* @var array
*/
protected $_types = [];
/**
* What comes first: parent or child?
*
* @var int
*/
protected $_first = -1;
/**
* Sorts.
*
* @var array
*/
protected $_sorts = [];
/**
* Initialize.
*
*/
public function __construct()
{
$this->_flags = Iterator\FileSystem::KEY_AS_PATHNAME
| Iterator\FileSystem::CURRENT_AS_FILEINFO
| Iterator\FileSystem::SKIP_DOTS;
$this->_first = Iterator\Recursive\Iterator::SELF_FIRST;
return;
}
/**
* Select a directory to scan.
*
* @param string|array $paths One or more paths.
* @return \Hoa\File\Finder
*/
public function in($paths)
{
if (!is_array($paths)) {
$paths = [$paths];
}
foreach ($paths as $path) {
if (1 === preg_match('/[\*\?\[\]]/', $path)) {
$iterator = new Iterator\CallbackFilter(
new Iterator\Glob(rtrim($path, DS)),
function ($current) {
return $current->isDir();
}
);
foreach ($iterator as $fileInfo) {
$this->_paths[] = $fileInfo->getPathname();
}
} else {
$this->_paths[] = $path;
}
}
return $this;
}
/**
* Set max depth for recursion.
*
* @param int $depth Depth.
* @return \Hoa\File\Finder
*/
public function maxDepth($depth)
{
$this->_maxDepth = $depth;
return $this;
}
/**
* Include files in the result.
*
* @return \Hoa\File\Finder
*/
public function files()
{
$this->_types[] = 'file';
return $this;
}
/**
* Include directories in the result.
*
* @return \Hoa\File\Finder
*/
public function directories()
{
$this->_types[] = 'dir';
return $this;
}
/**
* Include links in the result.
*
* @return \Hoa\File\Finder
*/
public function links()
{
$this->_types[] = 'link';
return $this;
}
/**
* Follow symbolink links.
*
* @param bool $flag Whether we follow or not.
* @return \Hoa\File\Finder
*/
public function followSymlinks($flag = true)
{
if (true === $flag) {
$this->_flags ^= Iterator\FileSystem::FOLLOW_SYMLINKS;
} else {
$this->_flags |= Iterator\FileSystem::FOLLOW_SYMLINKS;
}
return $this;
}
/**
* Include files that match a regex.
* Example:
* $this->name('#\.php$#');
*
* @param string $regex Regex.
* @return \Hoa\File\Finder
*/
public function name($regex)
{
$this->_filters[] = function (\SplFileInfo $current) use ($regex) {
return 0 !== preg_match($regex, $current->getBasename());
};
return $this;
}
/**
* Exclude directories that match a regex.
* Example:
* $this->notIn('#^\.(git|hg)$#');
*
* @param string $regex Regex.
* @return \Hoa\File\Finder
*/
public function notIn($regex)
{
$this->_filters[] = function (\SplFileInfo $current) use ($regex) {
foreach (explode(DS, $current->getPathname()) as $part) {
if (0 !== preg_match($regex, $part)) {
return false;
}
}
return true;
};
return $this;
}
/**
* Include files that respect a certain size.
* The size is a string of the form:
* operator number unit
* where
* • operator could be: <, <=, >, >= or =;
* • number is a positive integer;
* • unit could be: b (default), Kb, Mb, Gb, Tb, Pb, Eb, Zb, Yb.
* Example:
* $this->size('>= 12Kb');
*
* @param string $size Size.
* @return \Hoa\File\Finder
*/
public function size($size)
{
if (0 === preg_match('#^(<|<=|>|>=|=)\s*(\d+)\s*((?:[KMGTPEZY])b)?$#', $size, $matches)) {
return $this;
}
$number = floatval($matches[2]);
$unit = isset($matches[3]) ? $matches[3] : 'b';
$operator = $matches[1];
switch ($unit) {
case 'b':
break;
// kilo
case 'Kb':
$number <<= 10;
break;
// mega.
case 'Mb':
$number <<= 20;
break;
// giga.
case 'Gb':
$number <<= 30;
break;
// tera.
case 'Tb':
$number *= 1099511627776;
break;
// peta.
case 'Pb':
$number *= pow(1024, 5);
break;
// exa.
case 'Eb':
$number *= pow(1024, 6);
break;
// zetta.
case 'Zb':
$number *= pow(1024, 7);
break;
// yota.
case 'Yb':
$number *= pow(1024, 8);
break;
}
$filter = null;
switch ($operator) {
case '<':
$filter = function (\SplFileInfo $current) use ($number) {
return $current->getSize() < $number;
};
break;
case '<=':
$filter = function (\SplFileInfo $current) use ($number) {
return $current->getSize() <= $number;
};
break;
case '>':
$filter = function (\SplFileInfo $current) use ($number) {
return $current->getSize() > $number;
};
break;
case '>=':
$filter = function (\SplFileInfo $current) use ($number) {
return $current->getSize() >= $number;
};
break;
case '=':
$filter = function (\SplFileInfo $current) use ($number) {
return $current->getSize() === $number;
};
break;
}
$this->_filters[] = $filter;
return $this;
}
/**
* Whether we should include dots or not (respectively . and ..).
*
* @param bool $flag Include or not.
* @return \Hoa\File\Finder
*/
public function dots($flag = true)
{
if (true === $flag) {
$this->_flags ^= Iterator\FileSystem::SKIP_DOTS;
} else {
$this->_flags |= Iterator\FileSystem::SKIP_DOTS;
}
return $this;
}
/**
* Include files that are owned by a certain owner.
*
* @param int $owner Owner.
* @return \Hoa\File\Finder
*/
public function owner($owner)
{
$this->_filters[] = function (\SplFileInfo $current) use ($owner) {
return $current->getOwner() === $owner;
};
return $this;
}
/**
* Format date.
* Date can have the following syntax:
* date
* since date
* until date
* If the date does not have the “ago” keyword, it will be added.
* Example: “42 hours” is equivalent to “since 42 hours” which is equivalent
* to “since 42 hours ago”.
*
* @param string $date Date.
* @param int &$operator Operator (-1 for since, 1 for until).
* @return int
*/
protected function formatDate($date, &$operator)
{
$operator = -1;
if (0 === preg_match('#\bago\b#', $date)) {
$date .= ' ago';
}
if (0 !== preg_match('#^(since|until)\b(.+)$#', $date, $matches)) {
$time = strtotime($matches[2]);
if ('until' === $matches[1]) {
$operator = 1;
}
} else {
$time = strtotime($date);
}
return $time;
}
/**
* Include files that have been changed from a certain date.
* Example:
* $this->changed('since 13 days');
*
* @param string $date Date.
* @return \Hoa\File\Finder
*/
public function changed($date)
{
$time = $this->formatDate($date, $operator);
if (-1 === $operator) {
$this->_filters[] = function (\SplFileInfo $current) use ($time) {
return $current->getCTime() >= $time;
};
} else {
$this->_filters[] = function (\SplFileInfo $current) use ($time) {
return $current->getCTime() < $time;
};
}
return $this;
}
/**
* Include files that have been modified from a certain date.
* Example:
* $this->modified('since 13 days');
*
* @param string $date Date.
* @return \Hoa\File\Finder
*/
public function modified($date)
{
$time = $this->formatDate($date, $operator);
if (-1 === $operator) {
$this->_filters[] = function (\SplFileInfo $current) use ($time) {
return $current->getMTime() >= $time;
};
} else {
$this->_filters[] = function (\SplFileInfo $current) use ($time) {
return $current->getMTime() < $time;
};
}
return $this;
}
/**
* Add your own filter.
* The callback will receive 3 arguments: $current, $key and $iterator. It
* must return a boolean: true to include the file, false to exclude it.
* Example:
* // Include files that are readable
* $this->filter(function ($current) {
* return $current->isReadable();
* });
*
* @param callable $callback Callback
* @return \Hoa\File\Finder
*/
public function filter($callback)
{
$this->_filters[] = $callback;
return $this;
}
/**
* Sort result by name.
* If \Collator exists (from ext/intl), the $locale argument will be used
* for its constructor. Else, strcmp() will be used.
* Example:
* $this->sortByName('fr_FR');
*
* @param string $locale Locale.
* @return \Hoa\File\Finder
*/
public function sortByName($locale = 'root')
{
if (true === class_exists('Collator', false)) {
$collator = new \Collator($locale);
$this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) use ($collator) {
return $collator->compare($a->getPathname(), $b->getPathname());
};
} else {
$this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) {
return strcmp($a->getPathname(), $b->getPathname());
};
}
return $this;
}
/**
* Sort result by size.
* Example:
* $this->sortBySize();
*
* @return \Hoa\File\Finder
*/
public function sortBySize()
{
$this->_sorts[] = function (\SplFileInfo $a, \SplFileInfo $b) {
return $a->getSize() < $b->getSize();
};
return $this;
}
/**
* Add your own sort.
* The callback will receive 2 arguments: $a and $b. Please see the uasort()
* function.
* Example:
* // Sort files by their modified time.
* $this->sort(function ($a, $b) {
* return $a->getMTime() < $b->getMTime();
* });
*
* @param callable $callable Callback.
* @return \Hoa\File\Finder
*/
public function sort($callable)
{
$this->_sorts[] = $callable;
return $this;
}
/**
* Child comes first when iterating.
*
* @return \Hoa\File\Finder
*/
public function childFirst()
{
$this->_first = Iterator\Recursive\Iterator::CHILD_FIRST;
return $this;
}
/**
* Get the iterator.
*
* @return \Traversable
*/
public function getIterator()
{
$_iterator = new Iterator\Append();
$types = $this->getTypes();
if (!empty($types)) {
$this->_filters[] = function (\SplFileInfo $current) use ($types) {
return in_array($current->getType(), $types);
};
}
$maxDepth = $this->getMaxDepth();
$splFileInfo = $this->getSplFileInfo();
foreach ($this->getPaths() as $path) {
if (1 == $maxDepth) {
$iterator = new Iterator\IteratorIterator(
new Iterator\Recursive\Directory(
$path,
$this->getFlags(),
$splFileInfo
),
$this->getFirst()
);
} else {
$iterator = new Iterator\Recursive\Iterator(
new Iterator\Recursive\Directory(
$path,
$this->getFlags(),
$splFileInfo
),
$this->getFirst()
);
if (1 < $maxDepth) {
$iterator->setMaxDepth($maxDepth - 1);
}
}
$_iterator->append($iterator);
}
foreach ($this->getFilters() as $filter) {
$_iterator = new Iterator\CallbackFilter(
$_iterator,
$filter
);
}
$sorts = $this->getSorts();
if (empty($sorts)) {
return $_iterator;
}
$array = iterator_to_array($_iterator);
foreach ($sorts as $sort) {
uasort($array, $sort);
}
return new Iterator\Map($array);
}
/**
* Set SplFileInfo classname.
*
* @param string $splFileInfo SplFileInfo classname.
* @return string
*/
public function setSplFileInfo($splFileInfo)
{
$old = $this->_splFileInfo;
$this->_splFileInfo = $splFileInfo;
return $old;
}
/**
* Get SplFileInfo classname.
*
* @return string
*/
public function getSplFileInfo()
{
return $this->_splFileInfo;
}
/**
* Get all paths.
*
* @return array
*/
protected function getPaths()
{
return $this->_paths;
}
/**
* Get max depth.
*
* @return int
*/
public function getMaxDepth()
{
return $this->_maxDepth;
}
/**
* Get types.
*
* @return array
*/
public function getTypes()
{
return $this->_types;
}
/**
* Get filters.
*
* @return array
*/
protected function getFilters()
{
return $this->_filters;
}
/**
* Get sorts.
*
* @return array
*/
protected function getSorts()
{
return $this->_sorts;
}
/**
* Get flags.
*
* @return int
*/
public function getFlags()
{
return $this->_flags;
}
/**
* Get first.
*
* @return int
*/
public function getFirst()
{
return $this->_first;
}
}
+604
Ver Arquivo
@@ -0,0 +1,604 @@
<?php
/**
* Hoa
*
*
* @license
*
* New BSD License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Hoa nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace Hoa\File;
use Hoa\Stream;
/**
* Class \Hoa\File\Generic.
*
* Describe a super-file.
*
* @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
abstract class Generic
extends Stream
implements Stream\IStream\Pathable,
Stream\IStream\Statable,
Stream\IStream\Touchable
{
/**
* Mode.
*
* @var string
*/
protected $_mode = null;
/**
* Get filename component of path.
*
* @return string
*/
public function getBasename()
{
return basename($this->getStreamName());
}
/**
* Get directory name component of path.
*
* @return string
*/
public function getDirname()
{
return dirname($this->getStreamName());
}
/**
* Get size.
*
* @return int
*/
public function getSize()
{
if (false === $this->getStatistic()) {
return false;
}
return filesize($this->getStreamName());
}
/**
* Get informations about a file.
*
* @return array
*/
public function getStatistic()
{
return fstat($this->getStream());
}
/**
* Get last access time of file.
*
* @return int
*/
public function getATime()
{
return fileatime($this->getStreamName());
}
/**
* Get inode change time of file.
*
* @return int
*/
public function getCTime()
{
return filectime($this->getStreamName());
}
/**
* Get file modification time.
*
* @return int
*/
public function getMTime()
{
return filemtime($this->getStreamName());
}
/**
* Get file group.
*
* @return int
*/
public function getGroup()
{
return filegroup($this->getStreamName());
}
/**
* Get file owner.
*
* @return int
*/
public function getOwner()
{
return fileowner($this->getStreamName());
}
/**
* Get file permissions.
*
* @return int
*/
public function getPermissions()
{
return fileperms($this->getStreamName());
}
/**
* Get file permissions as a string.
* Result sould be interpreted like this:
* * s: socket;
* * l: symbolic link;
* * -: regular;
* * b: block special;
* * d: directory;
* * c: character special;
* * p: FIFO pipe;
* * u: unknown.
*
* @return string
*/
public function getReadablePermissions()
{
$p = $this->getPermissions();
if (($p & 0xC000) == 0xC000) {
$out = 's';
} elseif (($p & 0xA000) == 0xA000) {
$out = 'l';
} elseif (($p & 0x8000) == 0x8000) {
$out = '-';
} elseif (($p & 0x6000) == 0x6000) {
$out = 'b';
} elseif (($p & 0x4000) == 0x4000) {
$out = 'd';
} elseif (($p & 0x2000) == 0x2000) {
$out = 'c';
} elseif (($p & 0x1000) == 0x1000) {
$out = 'p';
} else {
$out = 'u';
}
$out .=
(($p & 0x0100) ? 'r' : '-') .
(($p & 0x0080) ? 'w' : '-') .
(($p & 0x0040) ?
(($p & 0x0800) ? 's' : 'x') :
(($p & 0x0800) ? 'S' : '-')) .
(($p & 0x0020) ? 'r' : '-') .
(($p & 0x0010) ? 'w' : '-') .
(($p & 0x0008) ?
(($p & 0x0400) ? 's' : 'x') :
(($p & 0x0400) ? 'S' : '-')) .
(($p & 0x0004) ? 'r' : '-') .
(($p & 0x0002) ? 'w' : '-') .
(($p & 0x0001) ?
(($p & 0x0200) ? 't' : 'x') :
(($p & 0x0200) ? 'T' : '-'));
return $out;
}
/**
* Check if the file is readable.
*
* @return bool
*/
public function isReadable()
{
return is_readable($this->getStreamName());
}
/**
* Check if the file is writable.
*
* @return bool
*/
public function isWritable()
{
return is_writable($this->getStreamName());
}
/**
* Check if the file is executable.
*
* @return bool
*/
public function isExecutable()
{
return is_executable($this->getStreamName());
}
/**
* Clear file status cache.
*
* @return void
*/
public function clearStatisticCache()
{
clearstatcache(true, $this->getStreamName());
return;
}
/**
* Clear all files status cache.
*
* @return void
*/
public static function clearAllStatisticCaches()
{
clearstatcache();
return;
}
/**
* Set access and modification time of file.
*
* @param int $time Time. If equals to -1, time() should be used.
* @param int $atime Access time. If equals to -1, $time should be
* used.
* @return bool
*/
public function touch($time = -1, $atime = -1)
{
if ($time == -1) {
$time = time();
}
if ($atime == -1) {
$atime = $time;
}
return touch($this->getStreamName(), $time, $atime);
}
/**
* Copy file.
* Return the destination file path if succeed, false otherwise.
*
* @param string $to Destination path.
* @param bool $force Force to copy if the file $to already exists.
* Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
* constants.
* @return bool
*/
public function copy($to, $force = Stream\IStream\Touchable::DO_NOT_OVERWRITE)
{
$from = $this->getStreamName();
if ($force === Stream\IStream\Touchable::DO_NOT_OVERWRITE &&
true === file_exists($to)) {
return true;
}
if (null === $this->getStreamContext()) {
return @copy($from, $to);
}
return @copy($from, $to, $this->getStreamContext()->getContext());
}
/**
* Move a file.
*
* @param string $name New name.
* @param bool $force Force to move if the file $name already
* exists.
* Use the \Hoa\Stream\IStream\Touchable::*OVERWRITE
* constants.
* @param bool $mkdir Force to make directory if does not exist.
* Use the \Hoa\Stream\IStream\Touchable::*DIRECTORY
* constants.
* @return bool
*/
public function move(
$name,
$force = Stream\IStream\Touchable::DO_NOT_OVERWRITE,
$mkdir = Stream\IStream\Touchable::DO_NOT_MAKE_DIRECTORY
) {
$from = $this->getStreamName();
if ($force === Stream\IStream\Touchable::DO_NOT_OVERWRITE &&
true === file_exists($name)) {
return false;
}
if (Stream\IStream\Touchable::MAKE_DIRECTORY === $mkdir) {
Directory::create(
dirname($name),
Directory::MODE_CREATE_RECURSIVE
);
}
if (null === $this->getStreamContext()) {
return @rename($from, $name);
}
return @rename($from, $name, $this->getStreamContext()->getContext());
}
/**
* Delete a file.
*
* @return bool
*/
public function delete()
{
if (null === $this->getStreamContext()) {
return @unlink($this->getStreamName());
}
return @unlink(
$this->getStreamName(),
$this->getStreamContext()->getContext()
);
}
/**
* Change file group.
*
* @param mixed $group Group name or number.
* @return bool
*/
public function changeGroup($group)
{
return chgrp($this->getStreamName(), $group);
}
/**
* Change file mode.
*
* @param int $mode Mode (in octal!).
* @return bool
*/
public function changeMode($mode)
{
return chmod($this->getStreamName(), $mode);
}
/**
* Change file owner.
*
* @param mixed $user User.
* @return bool
*/
public function changeOwner($user)
{
return chown($this->getStreamName(), $user);
}
/**
* Change the current umask.
*
* @param int $umask Umask (in octal!). If null, given the current
* umask value.
* @return int
*/
public static function umask($umask = null)
{
if (null === $umask) {
return umask();
}
return umask($umask);
}
/**
* Check if it is a file.
*
* @return bool
*/
public function isFile()
{
return is_file($this->getStreamName());
}
/**
* Check if it is a link.
*
* @return bool
*/
public function isLink()
{
return is_link($this->getStreamName());
}
/**
* Check if it is a directory.
*
* @return bool
*/
public function isDirectory()
{
return is_dir($this->getStreamName());
}
/**
* Check if it is a socket.
*
* @return bool
*/
public function isSocket()
{
return filetype($this->getStreamName()) == 'socket';
}
/**
* Check if it is a FIFO pipe.
*
* @return bool
*/
public function isFIFOPipe()
{
return filetype($this->getStreamName()) == 'fifo';
}
/**
* Check if it is character special file.
*
* @return bool
*/
public function isCharacterSpecial()
{
return filetype($this->getStreamName()) == 'char';
}
/**
* Check if it is block special.
*
* @return bool
*/
public function isBlockSpecial()
{
return filetype($this->getStreamName()) == 'block';
}
/**
* Check if it is an unknown type.
*
* @return bool
*/
public function isUnknown()
{
return filetype($this->getStreamName()) == 'unknown';
}
/**
* Set the open mode.
*
* @param string $mode Open mode. Please, see the child::MODE_*
* constants.
* @return string
*/
protected function setMode($mode)
{
$old = $this->_mode;
$this->_mode = $mode;
return $old;
}
/**
* Get the open mode.
*
* @return string
*/
public function getMode()
{
return $this->_mode;
}
/**
* Get inode.
*
* @return int
*/
public function getINode()
{
return fileinode($this->getStreamName());
}
/**
* Check if the system is case sensitive or not.
*
* @return bool
*/
public static function isCaseSensitive()
{
return !(
file_exists(mb_strtolower(__FILE__)) &&
file_exists(mb_strtoupper(__FILE__))
);
}
/**
* Get a canonicalized absolute pathname.
*
* @return string
*/
public function getRealPath()
{
if (false === $out = realpath($this->getStreamName())) {
return $this->getStreamName();
}
return $out;
}
/**
* Get file extension (if exists).
*
* @return string
*/
public function getExtension()
{
return pathinfo(
$this->getStreamName(),
PATHINFO_EXTENSION
);
}
/**
* Get filename without extension.
*
* @return string
*/
public function getFilename()
{
$file = basename($this->getStreamName());
if (defined('PATHINFO_FILENAME')) {
return pathinfo($file, PATHINFO_FILENAME);
}
if (strstr($file, '.')) {
return substr($file, 0, strrpos($file, '.'));
}
return $file;
}
}

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais