Add vendor files to dist

This commit is contained in:
FreeScout
2022-02-04 23:53:37 -08:00
parent 1bedf8394d
commit 7c663cacf8
105 changed files with 1947 additions and 38908 deletions

View File

@@ -1,41 +0,0 @@
<?php
namespace Axn\Laroute\Routes;
use Illuminate\Routing\Route;
use Lord\Laroute\Routes\Collection as BaseCollection;
class Collection extends BaseCollection
{
/**
* Get the collection of items as JSON **pretty printed**.
*
* @return string
*/
public function toJson($options = 0)
{
$options = JSON_PRETTY_PRINT | $options;
return json_encode($this->toArray(), $options);
}
/**
* Get the route information for a given route.
*
* @param $route \Illuminate\Routing\Route
* @param $filter string
* @param $namespace string
*
* @return array
*/
protected function getRouteInformation(Route $route, $filter, $namespace)
{
$data = parent::getRouteInformation($route, $filter, $namespace);
if (!$data || empty($data['name'])) {
return null;
}
return array_only($data, ['uri', 'name']);
}
}

View File

@@ -1,172 +0,0 @@
<?php namespace Barryvdh\TranslationManager;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Barryvdh\TranslationManager\Models\Translation;
use Illuminate\Support\Collection;
class Controller extends BaseController
{
/** @var \Barryvdh\TranslationManager\Manager */
protected $manager;
public function __construct(Manager $manager)
{
$this->manager = $manager;
}
public function getIndex($group = null)
{
$locales = $this->manager->getLocales();
$groups = Translation::groupBy('group');
$excludedGroups = $this->manager->getConfig('exclude_groups');
if($excludedGroups){
$groups->whereNotIn('group', $excludedGroups);
}
$groups = $groups->select('group')->orderBy('group')->get()->pluck('group', 'group');
if ($groups instanceof Collection) {
$groups = $groups->all();
}
$groups = [''=>'Choose a group'] + $groups;
$numChanged = Translation::where('group', $group)->where('status', Translation::STATUS_CHANGED)->count();
$allTranslations = Translation::where('group', $group)->orderBy('key', 'asc')->get();
$numTranslations = count($allTranslations);
$translations = [];
foreach($allTranslations as $translation){
$translations[$translation->key][$translation->locale] = $translation;
}
return view('translation-manager::index')
->with('translations', $translations)
->with('locales', $locales)
->with('groups', $groups)
->with('group', $group)
->with('numTranslations', $numTranslations)
->with('numChanged', $numChanged)
->with('editUrl', action('\Barryvdh\TranslationManager\Controller@postEdit', [$group]))
->with('deleteEnabled', $this->manager->getConfig('delete_enabled'));
}
public function getView($group = null)
{
return $this->getIndex($group);
}
protected function loadLocales()
{
//Set the default locale as the first one.
$locales = Translation::groupBy('locale')
->select('locale')
->get()
->pluck('locale');
if ($locales instanceof Collection) {
$locales = $locales->all();
}
$locales = array_merge([config('app.locale')], $locales);
return array_unique($locales);
}
public function postAdd($group = null)
{
$keys = explode("\n", request()->get('keys'));
foreach($keys as $key){
$key = trim($key);
if($group && $key){
$this->manager->missingKey('*', $group, $key);
}
}
return redirect()->back();
}
public function postEdit($group = null)
{
if(!in_array($group, $this->manager->getConfig('exclude_groups'))) {
$name = request()->get('name');
$value = request()->get('value');
list($locale, $key) = explode('|', $name, 2);
$translation = Translation::firstOrNew([
'locale' => $locale,
'group' => $group,
'key' => $key,
]);
$translation->value = (string) $value ?: null;
$translation->status = Translation::STATUS_CHANGED;
$translation->save();
return array('status' => 'ok');
}
}
public function postDelete($group = null, $key)
{
if(!in_array($group, $this->manager->getConfig('exclude_groups')) && $this->manager->getConfig('delete_enabled')) {
Translation::where('group', $group)->where('key', $key)->delete();
return ['status' => 'ok'];
}
}
public function postImport(Request $request)
{
$replace = $request->get('replace', false);
$counter = $this->manager->importTranslations($replace);
return ['status' => 'ok', 'counter' => $counter];
}
public function postFind()
{
$numFound = $this->manager->findTranslations();
return ['status' => 'ok', 'counter' => (int) $numFound];
}
public function postPublish($group = null)
{
$json = false;
if($group === '_json'){
$json = true;
}
$this->manager->exportTranslations($group, $json);
return ['status' => 'ok'];
}
public function postAddGroup(Request $request)
{
$group = str_replace(".", '', $request->input('new-group'));
if ($group)
{
return redirect()->action('\Barryvdh\TranslationManager\Controller@getView',$group);
}
else
{
return redirect()->back();
}
}
public function postAddLocale(Request $request)
{
$locales = $this->manager->getLocales();
$newLocale = str_replace([], '-', trim($request->input('new-locale')));
if (!$newLocale || in_array($newLocale, $locales)) {
return redirect()->back();
}
$this->manager->addLocale($newLocale);
return redirect()->back();
}
public function postRemoveLocale(Request $request)
{
foreach ($request->input('remove-locale', []) as $locale => $val) {
$this->manager->removeLocale($locale);
}
return redirect()->back();
}
}

View File

@@ -1,428 +0,0 @@
<?php
namespace Barryvdh\TranslationManager;
use Barryvdh\TranslationManager\Events\TranslationsExportedEvent;
use Barryvdh\TranslationManager\Models\Translation;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
class Manager
{
const JSON_GROUP = '_json';
/** @var \Illuminate\Contracts\Foundation\Application */
protected $app;
/** @var \Illuminate\Filesystem\Filesystem */
protected $files;
/** @var \Illuminate\Contracts\Events\Dispatcher */
protected $events;
protected $config;
protected $locales;
protected $ignoreLocales;
protected $ignoreFilePath;
public function __construct( Application $app, Filesystem $files, Dispatcher $events )
{
$this->app = $app;
$this->files = $files;
$this->events = $events;
$this->config = $app[ 'config' ][ 'translation-manager' ];
$this->ignoreFilePath = storage_path( '.ignore_locales' );
$this->locales = [];
$this->ignoreLocales = $this->getIgnoredLocales();
}
protected function getIgnoredLocales()
{
if ( !$this->files->exists( $this->ignoreFilePath ) ) {
return [];
}
$result = json_decode( $this->files->get( $this->ignoreFilePath ) );
return ( $result && is_array( $result ) ) ? $result : [];
}
public function importTranslations( $replace = false, $base = null )
{
$counter = 0;
//allows for vendor lang files to be properly recorded through recursion.
$vendor = true;
if ( $base == null ) {
$base = $this->app[ 'path.lang' ];
$vendor = false;
}
foreach ( $this->files->directories( $base ) as $langPath ) {
$locale = basename( $langPath );
//import langfiles for each vendor
if ( $locale == 'vendor' ) {
foreach ( $this->files->directories( $langPath ) as $vendor ) {
$counter += $this->importTranslations( $replace, $vendor );
}
continue;
}
$vendorName = $this->files->name( $this->files->dirname( $langPath ) );
foreach ( $this->files->allfiles( $langPath ) as $file ) {
$info = pathinfo( $file );
$group = $info[ 'filename' ];
if ( in_array( $group, $this->config[ 'exclude_groups' ] ) ) {
continue;
}
$subLangPath = str_replace( $langPath . DIRECTORY_SEPARATOR, '', $info[ 'dirname' ] );
$subLangPath = str_replace( DIRECTORY_SEPARATOR, '/', $subLangPath );
$langPath = str_replace( DIRECTORY_SEPARATOR, '/', $langPath );
if ( $subLangPath != $langPath ) {
$group = $subLangPath . '/' . $group;
}
if ( !$vendor ) {
$translations = \Lang::getLoader()->load( $locale, $group );
} else {
$translations = include( $file );
$group = "vendor/" . $vendorName;
}
if ( $translations && is_array( $translations ) ) {
foreach ( array_dot( $translations ) as $key => $value ) {
$importedTranslation = $this->importTranslation( $key, $value, $locale, $group, $replace );
$counter += $importedTranslation ? 1 : 0;
}
}
}
}
foreach ( $this->files->files( $this->app[ 'path.lang' ] ) as $jsonTranslationFile ) {
if ( strpos( $jsonTranslationFile, '.json' ) === false ) {
continue;
}
$locale = basename( $jsonTranslationFile, '.json' );
$group = self::JSON_GROUP;
$translations =
\Lang::getLoader()->load( $locale, '*', '*' ); // Retrieves JSON entries of the given locale only
if ( $translations && is_array( $translations ) ) {
foreach ( $translations as $key => $value ) {
$importedTranslation = $this->importTranslation( $key, $value, $locale, $group, $replace );
$counter += $importedTranslation ? 1 : 0;
}
}
}
return $counter;
}
public function importTranslation( $key, $value, $locale, $group, $replace = false )
{
// process only string values
if ( is_array( $value ) ) {
return false;
}
$value = (string) $value;
$translation = Translation::firstOrNew( [
'locale' => $locale,
'group' => $group,
'key' => $key,
] );
// Check if the database is different then the files
$newStatus = $translation->value === $value ? Translation::STATUS_SAVED : Translation::STATUS_CHANGED;
if ( $newStatus !== (int) $translation->status ) {
$translation->status = $newStatus;
}
// Only replace when empty, or explicitly told so
if ( $replace || !$translation->value ) {
$translation->value = $value;
}
$translation->save();
return true;
}
public function findTranslations( $path = null )
{
$path = $path ?: base_path();
$groupKeys = [];
$stringKeys = [];
$functions = $this->config[ 'trans_functions' ];
$groupPattern = // See http://regexr.com/392hu
"[^\w|>]" . // Must not have an alphanum or _ or > before real method
'(' . implode( '|', $functions ) . ')' . // Must start with one of the functions
"\(" . // Match opening parenthesis
"[\'\"]" . // Match " or '
'(' . // Start a new group to match:
'[a-zA-Z0-9_-]+' . // Must start with group
"([.|\/](?! )[^\1)]+)+" . // Be followed by one or more items/keys
')' . // Close group
"[\'\"]" . // Closing quote
"[\),]"; // Close parentheses or new parameter
$stringPattern =
"[^\w|>]" . // Must not have an alphanum or _ or > before real method
'(' . implode( '|', $functions ) . ')' . // Must start with one of the functions
"\(" . // Match opening parenthesis
"(?P<quote>['\"])" . // Match " or ' and store in {quote}
"(?P<string>(?:\\\k{quote}|(?!\k{quote}).)*)" . // Match any string that can be {quote} escaped
"\k{quote}" . // Match " or ' previously matched
"[\),]"; // Close parentheses or new parameter
// Find all PHP + Twig files in the app folder, except for storage
$finder = new Finder();
$finder->in( $path )->exclude( 'storage' )->name( '*.php' )->name( '*.twig' )->name( '*.vue' )->files();
/** @var \Symfony\Component\Finder\SplFileInfo $file */
foreach ( $finder as $file ) {
// Search the current file for the pattern
if ( preg_match_all( "/$groupPattern/siU", $file->getContents(), $matches ) ) {
// Get all matches
foreach ( $matches[ 2 ] as $key ) {
$groupKeys[] = $key;
}
}
if ( preg_match_all( "/$stringPattern/siU", $file->getContents(), $matches ) ) {
foreach ( $matches[ 'string' ] as $key ) {
if ( preg_match( "/(^[a-zA-Z0-9_-]+([.][^\1)\ ]+)+$)/siU", $key, $groupMatches ) ) {
// group{.group}.key format, already in $groupKeys but also matched here
// do nothing, it has to be treated as a group
continue;
}
//TODO: This can probably be done in the regex, but I couldn't do it.
//skip keys which contain namespacing characters, unless they also contain a
//space, which makes it JSON.
if ( !( str_contains( $key, '::' ) && str_contains( $key, '.' ) )
|| str_contains( $key, ' ' ) ) {
$stringKeys[] = $key;
}
}
}
}
// Remove duplicates
$groupKeys = array_unique( $groupKeys );
$stringKeys = array_unique( $stringKeys );
// Add the translations to the database, if not existing.
foreach ( $groupKeys as $key ) {
// Split the group and item
list( $group, $item ) = explode( '.', $key, 2 );
$this->missingKey( '', $group, $item );
}
foreach ( $stringKeys as $key ) {
$group = self::JSON_GROUP;
$item = $key;
$this->missingKey( '', $group, $item );
}
// Return the number of found translations
return count( $groupKeys + $stringKeys );
}
public function missingKey( $namespace, $group, $key )
{
if ( !in_array( $group, $this->config[ 'exclude_groups' ] ) ) {
Translation::firstOrCreate( [
'locale' => $this->app[ 'config' ][ 'app.locale' ],
'group' => $group,
'key' => $key,
] );
}
}
public function exportTranslations( $group = null, $json = false )
{
$basePath = $this->app[ 'path.lang' ];
if ( !is_null( $group ) && !$json ) {
if ( !in_array( $group, $this->config[ 'exclude_groups' ] ) ) {
$vendor = false;
if ( $group == '*' ) {
return $this->exportAllTranslations();
} else {
if ( starts_with( $group, "vendor" ) ) {
$vendor = true;
}
}
$tree = $this->makeTree( Translation::ofTranslatedGroup( $group )
->orderByGroupKeys( array_get( $this->config, 'sort_keys', false ) )
->get() );
foreach ( $tree as $locale => $groups ) {
if ( isset( $groups[ $group ] ) ) {
$translations = $groups[ $group ];
$path = $this->app[ 'path.lang' ];
$locale_path = $locale . DIRECTORY_SEPARATOR . $group;
if ( $vendor ) {
$path = $basePath . '/' . $group . '/' . $locale;
$locale_path = str_after( $group, "/" );
}
$subfolders = explode( DIRECTORY_SEPARATOR, $locale_path );
array_pop( $subfolders );
$subfolder_level = '';
foreach ( $subfolders as $subfolder ) {
$subfolder_level = $subfolder_level . $subfolder . DIRECTORY_SEPARATOR;
$temp_path = rtrim( $path . DIRECTORY_SEPARATOR . $subfolder_level, DIRECTORY_SEPARATOR );
if ( !is_dir( $temp_path ) ) {
mkdir( $temp_path, 0777, true );
}
}
$path = $path . DIRECTORY_SEPARATOR . $locale . DIRECTORY_SEPARATOR . $group . '.php';
$output = "<?php\n\nreturn " . var_export( $translations, true ) . ";" . \PHP_EOL;
$this->files->put( $path, $output );
}
}
Translation::ofTranslatedGroup( $group )->update( [ 'status' => Translation::STATUS_SAVED ] );
}
}
if ( $json ) {
$tree = $this->makeTree( Translation::ofTranslatedGroup( self::JSON_GROUP )
->orderByGroupKeys( array_get( $this->config, 'sort_keys', false ) )
->get(), true );
foreach ( $tree as $locale => $groups ) {
if ( isset( $groups[ self::JSON_GROUP ] ) ) {
$translations = $groups[ self::JSON_GROUP ];
$path = $this->app[ 'path.lang' ] . '/' . $locale . '.json';
$output = json_encode( $translations, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE );
$this->files->put( $path, $output );
}
}
Translation::ofTranslatedGroup( self::JSON_GROUP )->update( [ 'status' => Translation::STATUS_SAVED ] );
}
$this->events->dispatch( new TranslationsExportedEvent() );
}
public function exportAllTranslations()
{
$groups = Translation::whereNotNull( 'value' )->selectDistinctGroup()->get( 'group' );
foreach ( $groups as $group ) {
if ( $group->group == self::JSON_GROUP ) {
$this->exportTranslations( null, true );
} else {
$this->exportTranslations( $group->group );
}
}
$this->events->dispatch( new TranslationsExportedEvent() );
}
protected function makeTree( $translations, $json = false )
{
$array = [];
foreach ( $translations as $translation ) {
if ( $json ) {
$this->jsonSet( $array[ $translation->locale ][ $translation->group ], $translation->key,
$translation->value );
} else {
array_set( $array[ $translation->locale ][ $translation->group ], $translation->key,
$translation->value );
}
}
return $array;
}
public function jsonSet( &$array, $key, $value )
{
if ( is_null( $key ) ) {
return $array = $value;
}
$array[ $key ] = $value;
return $array;
}
public function cleanTranslations()
{
Translation::whereNull( 'value' )->delete();
}
public function truncateTranslations()
{
Translation::truncate();
}
public function getLocales()
{
if ( empty( $this->locales ) ) {
$locales = array_merge( [ config( 'app.locale' ) ],
Translation::groupBy( 'locale' )->pluck( 'locale' )->toArray() );
foreach ( $this->files->directories( $this->app->langPath() ) as $localeDir ) {
if ( ( $name = $this->files->name( $localeDir ) ) != 'vendor' ) {
$locales[] = $name;
}
}
$this->locales = array_unique( $locales );
sort( $this->locales );
}
return array_diff( $this->locales, $this->ignoreLocales );
}
public function addLocale( $locale )
{
$localeDir = $this->app->langPath() . '/' . $locale;
$this->ignoreLocales = array_diff( $this->ignoreLocales, [ $locale ] );
$this->saveIgnoredLocales();
$this->ignoreLocales = $this->getIgnoredLocales();
if ( !$this->files->exists( $localeDir ) || !$this->files->isDirectory( $localeDir ) ) {
return $this->files->makeDirectory( $localeDir );
}
return true;
}
protected function saveIgnoredLocales()
{
return $this->files->put( $this->ignoreFilePath, json_encode( $this->ignoreLocales ) );
}
public function removeLocale( $locale )
{
if ( !$locale ) {
return false;
}
$this->ignoreLocales = array_merge( $this->ignoreLocales, [ $locale ] );
$this->saveIgnoredLocales();
$this->ignoreLocales = $this->getIgnoredLocales();
Translation::where( 'locale', $locale )->delete();
}
public function getConfig( $key = null )
{
if ( $key == null ) {
return $this->config;
} else {
return $this->config[ $key ];
}
}
}

View File

@@ -1 +0,0 @@
../doctrine/dbal/bin/doctrine-dbal

117
vendor/bin/doctrine-dbal vendored Executable file
View File

@@ -0,0 +1,117 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../doctrine/dbal/bin/doctrine-dbal)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/doctrine/dbal/bin/doctrine-dbal');
exit(0);
}
}
include __DIR__ . '/..'.'/doctrine/dbal/bin/doctrine-dbal';

View File

@@ -1 +0,0 @@
../nikic/php-parser/bin/php-parse

117
vendor/bin/php-parse vendored Executable file
View File

@@ -0,0 +1,117 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
exit(0);
}
}
include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';

1
vendor/bin/psysh vendored
View File

@@ -1 +0,0 @@
../psy/psysh/bin/psysh

117
vendor/bin/psysh vendored Executable file
View File

@@ -0,0 +1,117 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../psy/psysh/bin/psysh)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/psy/psysh/bin/psysh');
exit(0);
}
}
include __DIR__ . '/..'.'/psy/psysh/bin/psysh';

View File

@@ -1,189 +0,0 @@
<?php
namespace Chumper\Zipper\Repositories;
use Exception;
use ZipArchive;
class ZipRepository implements RepositoryInterface
{
private $archive;
/**
* Construct with a given path
*
* @param $filePath
* @param bool $create
* @param $archive
*
* @throws \Exception
*
* @return ZipRepository
*/
public function __construct($filePath, $create = false, $archive = null)
{
//Check if ZipArchive is available
if (!class_exists('ZipArchive')) {
throw new Exception('Error: Your PHP version is not compiled with zip support');
}
$this->archive = $archive ? $archive : new ZipArchive();
$res = $this->archive->open($filePath, ($create ? ZipArchive::CREATE : null));
if ($res !== true) {
throw new Exception("Error: Failed to open $filePath! Error: ".$this->getErrorMessage($res));
}
}
/**
* Add a file to the opened Archive
*
* @param $pathToFile
* @param $pathInArchive
*/
public function addFile($pathToFile, $pathInArchive)
{
$this->archive->addFile($pathToFile, $pathInArchive);
}
/**
* Add an empty directory
*
* @param $dirName
*/
public function addEmptyDir($dirName)
{
$this->archive->addEmptyDir($dirName);
}
/**
* Add a file to the opened Archive using its contents
*
* @param $name
* @param $content
*/
public function addFromString($name, $content)
{
$this->archive->addFromString($name, $content);
}
/**
* Remove a file permanently from the Archive
*
* @param $pathInArchive
*/
public function removeFile($pathInArchive)
{
$this->archive->deleteName($pathInArchive);
}
/**
* Get the content of a file
*
* @param $pathInArchive
*
* @return string
*/
public function getFileContent($pathInArchive)
{
return $this->archive->getFromName($pathInArchive);
}
/**
* Get the stream of a file
*
* @param $pathInArchive
*
* @return mixed
*/
public function getFileStream($pathInArchive)
{
return $this->archive->getStream($pathInArchive);
}
/**
* Will loop over every item in the archive and will execute the callback on them
* Will provide the filename for every item
*
* @param $callback
*/
public function each($callback)
{
for ($i = 0; $i < $this->archive->numFiles; ++$i) {
//skip if folder
$stats = $this->archive->statIndex($i);
if ($stats['size'] === 0 && $stats['crc'] === 0) {
continue;
}
call_user_func_array($callback, [
'file' => $this->archive->getNameIndex($i),
]);
}
}
/**
* Checks whether the file is in the archive
*
* @param $fileInArchive
*
* @return bool
*/
public function fileExists($fileInArchive)
{
return $this->archive->locateName($fileInArchive) !== false;
}
/**
* Sets the password to be used for decompressing
* function named usePassword for clarity
*
* @param $password
*
* @return bool
*/
public function usePassword($password)
{
return $this->archive->setPassword($password);
}
/**
* Returns the status of the archive as a string
*
* @return string
*/
public function getStatus()
{
return $this->archive->getStatusString();
}
/**
* Closes the archive and saves it
*/
public function close()
{
@$this->archive->close();
}
private function getErrorMessage($resultCode)
{
switch ($resultCode) {
case ZipArchive::ER_EXISTS:
return 'ZipArchive::ER_EXISTS - File already exists.';
case ZipArchive::ER_INCONS:
return 'ZipArchive::ER_INCONS - Zip archive inconsistent.';
case ZipArchive::ER_MEMORY:
return 'ZipArchive::ER_MEMORY - Malloc failure.';
case ZipArchive::ER_NOENT:
return 'ZipArchive::ER_NOENT - No such file.';
case ZipArchive::ER_NOZIP:
return 'ZipArchive::ER_NOZIP - Not a zip archive.';
case ZipArchive::ER_OPEN:
return 'ZipArchive::ER_OPEN - Can\'t open file.';
case ZipArchive::ER_READ:
return 'ZipArchive::ER_READ - Read error.';
case ZipArchive::ER_SEEK:
return 'ZipArchive::ER_SEEK - Seek error.';
default:
return "An unknown error [$resultCode] has occurred.";
}
}
}

View File

@@ -1,262 +0,0 @@
<?php
namespace Codedge\Updater\SourceRepositoryTypes;
use File;
use Storage;
use GuzzleHttp\Client;
use Symfony\Component\Finder\Finder;
use Codedge\Updater\Events\UpdateFailed;
use Codedge\Updater\AbstractRepositoryType;
use Codedge\Updater\Events\UpdateAvailable;
use Codedge\Updater\Events\UpdateSucceeded;
use Codedge\Updater\Contracts\SourceRepositoryTypeContract;
/**
* Github.php.
*
* @author Holger Lösken <holger.loesken@codedge.de>
* @copyright See LICENSE file that was distributed with this source code.
*/
class GithubRepositoryType extends AbstractRepositoryType implements SourceRepositoryTypeContract
{
const GITHUB_API_URL = 'https://api.github.com';
const NEW_VERSION_FILE = 'self-updater-new-version';
/**
* @var Client
*/
protected $client;
/**
* Github constructor.
*
* @param Client $client
* @param array $config
*/
public function __construct(Client $client, array $config)
{
$this->client = $client;
$this->config = $config;
$this->config['version_installed'] = config('self-update.version_installed');
$this->config['exclude_folders'] = config('self-update.exclude_folders');
}
/**
* Check repository if a newer version than the installed one is available.
*
* @param string $currentVersion
*
* @throws \InvalidArgumentException
* @throws \Exception
*
* @return bool
*/
public function isNewVersionAvailable($currentVersion = '')
{
$version = $currentVersion ?: $this->getVersionInstalled();
if (! $version) {
throw new \InvalidArgumentException('No currently installed version specified.');
}
if (version_compare($version, $this->getVersionAvailable(), '<')) {
if (! $this->versionFileExists()) {
$this->setVersionFile($this->getVersionAvailable());
event(new UpdateAvailable($this->getVersionAvailable()));
}
return true;
}
return false;
}
/**
* Fetches the latest version. If you do not want the latest version, specify one and pass it.
*
* @param string $version
*
* @throws \Exception
*
* @return mixed
*/
public function fetch($version = '')
{
$response = $this->getRepositoryReleases();
$releaseCollection = collect(\GuzzleHttp\json_decode($response->getBody()));
if ($releaseCollection->isEmpty()) {
throw new \Exception('Cannot find a release to update. Please check the repository you\'re pulling from');
}
$release = $releaseCollection->first();
$storagePath = $this->config['download_path'];
if (! File::exists($storagePath)) {
File::makeDirectory($storagePath, 493, true, true);
}
if (! empty($version)) {
$release = $releaseCollection->where('name', $version)->first();
}
$storageFilename = "{$release->name}.zip";
if (! $this->isSourceAlreadyFetched($release->name)) {
$storageFile = $storagePath.DIRECTORY_SEPARATOR.$storageFilename;
$this->downloadRelease($this->client, $release->zipball_url, $storageFile);
$this->unzipArchive($storageFile, $storagePath);
$this->createReleaseFolder($storagePath, $release->name);
}
}
/**
* Perform the actual update process.
*
* @param string $version
*
* @return bool
*/
public function update($version = '')
{
$this->setPathToUpdate(base_path(), $this->config['exclude_folders']);
if ($this->hasCorrectPermissionForUpdate()) {
if (! empty($version)) {
$sourcePath = $this->config['download_path'].DIRECTORY_SEPARATOR.$version;
} else {
$sourcePath = File::directories($this->config['download_path'])[0];
}
// Move all directories first
collect((new Finder())->in($sourcePath)->exclude($this->config['exclude_folders'])->directories()->sort(function ($a, $b) {
return strlen($b->getRealpath()) - strlen($a->getRealpath());
}))->each(function ($directory) { /** @var \SplFileInfo $directory */
if (count(array_intersect(File::directories(
$directory->getRealPath()), $this->config['exclude_folders']) == 0)
) {
File::copyDirectory(
$directory->getRealPath(),
base_path($directory->getRelativePath()).'/'.$directory->getBasename()
);
}
File::deleteDirectory($directory->getRealPath());
});
// Now move all the files left in the main directory
collect(File::allFiles($sourcePath, true))->each(function ($file) { /* @var \SplFileInfo $file */
File::copy($file->getRealPath(), base_path($file->getFilename()));
});
File::deleteDirectory($sourcePath);
$this->deleteVersionFile();
event(new UpdateSucceeded($version));
return true;
}
event(new UpdateFailed($this));
return false;
}
/**
* Get the version that is currenly installed.
* Example: 1.1.0 or v1.1.0 or "1.1.0 version".
*
* @param string $prepend
* @param string $append
*
* @return string
*/
public function getVersionInstalled($prepend = '', $append = '')
{
return $prepend.$this->config['version_installed'].$append;
}
/**
* Get the latest version that has been published in a certain repository.
* Example: 2.6.5 or v2.6.5.
*
* @param string $prepend Prepend a string to the latest version
* @param string $append Append a string to the latest version
*
* @return string
*/
public function getVersionAvailable($prepend = '', $append = '')
{
if ($this->versionFileExists()) {
$version = $prepend.$this->getVersionFile().$append;
} else {
$response = $this->getRepositoryReleases();
$releaseCollection = collect(\GuzzleHttp\json_decode($response->getBody()));
$version = $prepend.$releaseCollection->first()->name.$append;
}
return $version;
}
/**
* Get all releases for a specific repository.
*
* @throws \Exception
*
* @return mixed|\Psr\Http\Message\ResponseInterface
*/
protected function getRepositoryReleases()
{
if (empty($this->config['repository_vendor']) || empty($this->config['repository_name'])) {
throw new \Exception('No repository specified. Please enter a valid Github repository owner and name in your config.');
}
return $this->client->request(
'GET',
self::GITHUB_API_URL.'/repos/'.$this->config['repository_vendor'].'/'.$this->config['repository_name'].'/tags'
);
}
/**
* Check if the file with the new version already exists.
*
* @return bool
*/
protected function versionFileExists()
{
return Storage::exists(static::NEW_VERSION_FILE);
}
/**
* Write the version file.
*
* @param $content
*
* @return bool
*/
protected function setVersionFile($content)
{
return Storage::put(static::NEW_VERSION_FILE, $content);
}
/**
* Get the content of the version file.
*
* @return string
*/
protected function getVersionFile()
{
return Storage::get(static::NEW_VERSION_FILE);
}
/**
* Delete the version file.
*
* @return bool
*/
protected function deleteVersionFile()
{
return Storage::delete(static::NEW_VERSION_FILE);
}
}

View File

@@ -42,30 +42,75 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -75,28 +120,47 @@ class ClassLoader
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
@@ -111,9 +175,11 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
@@ -156,11 +222,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@@ -204,8 +272,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@@ -220,10 +290,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -243,6 +315,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -265,6 +339,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -285,6 +361,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@@ -305,6 +383,8 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
@@ -324,6 +404,8 @@ class ClassLoader
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
@@ -338,7 +420,7 @@ class ClassLoader
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@@ -347,6 +429,8 @@ class ClassLoader
return true;
}
return null;
}
/**
@@ -401,6 +485,11 @@ class ClassLoader
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -472,8 +561,27 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}
try {
include $file;
} catch (\Exception $e) {
$msg = $e->getMessage();
if (strstr($msg, 'No such file or directory')) {
if (strstr($msg, '/vendor/composer/../../overrides/')) {
$new_file = str_replace('/vendor/composer/../../overrides/', '/vendor/composer/../', $file);
} else {
$new_file = str_replace('/vendor/composer/../', '/vendor/composer/../../overrides/', $file);
}
include $new_file;
} else {
throw $e;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -146,23 +146,23 @@ return array(
'App\\User' => $baseDir . '/app/User.php',
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'Axn\\Laroute\\Routes\\Collection' => $baseDir . '/overrides/Axn/Laroute/Routes/Collection.php',
'Axn\\Laroute\\Routes\\Collection' => $baseDir . '/overrides/axn/laravel-laroute/src/Routes/Collection.php',
'Axn\\Laroute\\ServiceProvider' => $vendorDir . '/axn/laravel-laroute/src/ServiceProvider.php',
'Barryvdh\\Debugbar\\DataFormatter\\QueryFormatter' => $baseDir . '/compat/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php',
'Barryvdh\\Debugbar\\JavascriptRenderer' => $baseDir . '/compat/barryvdh/laravel-debugbar/src/JavascriptRenderer.php',
'Barryvdh\\Debugbar\\DataFormatter\\QueryFormatter' => $baseDir . '/overrides/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php',
'Barryvdh\\Debugbar\\JavascriptRenderer' => $baseDir . '/overrides/barryvdh/laravel-debugbar/src/JavascriptRenderer.php',
'Barryvdh\\TranslationManager\\Console\\CleanCommand' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Console/CleanCommand.php',
'Barryvdh\\TranslationManager\\Console\\ExportCommand' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Console/ExportCommand.php',
'Barryvdh\\TranslationManager\\Console\\FindCommand' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Console/FindCommand.php',
'Barryvdh\\TranslationManager\\Console\\ImportCommand' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Console/ImportCommand.php',
'Barryvdh\\TranslationManager\\Console\\ResetCommand' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Console/ResetCommand.php',
'Barryvdh\\TranslationManager\\Controller' => $baseDir . '/overrides/Barryvdh/TranslationManager/Controller.php',
'Barryvdh\\TranslationManager\\Controller' => $baseDir . '/overrides/barryvdh/laravel-translation-manager/src/Controller.php',
'Barryvdh\\TranslationManager\\Events\\TranslationsExportedEvent' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Events/TranslationsExportedEvent.php',
'Barryvdh\\TranslationManager\\Manager' => $baseDir . '/overrides/Barryvdh/TranslationManager/Manager.php',
'Barryvdh\\TranslationManager\\Manager' => $baseDir . '/overrides/barryvdh/laravel-translation-manager/src/Manager.php',
'Barryvdh\\TranslationManager\\ManagerServiceProvider' => $vendorDir . '/barryvdh/laravel-translation-manager/src/ManagerServiceProvider.php',
'Barryvdh\\TranslationManager\\Models\\Translation' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Models/Translation.php',
'Barryvdh\\TranslationManager\\TranslationServiceProvider' => $vendorDir . '/barryvdh/laravel-translation-manager/src/TranslationServiceProvider.php',
'Barryvdh\\TranslationManager\\Translator' => $vendorDir . '/barryvdh/laravel-translation-manager/src/Translator.php',
'Carbon\\Carbon' => $baseDir . '/compat/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\Carbon' => $baseDir . '/overrides/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\CarbonPeriod' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonPeriod.php',
'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
@@ -170,7 +170,7 @@ return array(
'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php',
'Chumper\\Zipper\\Facades\\Zipper' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/Facades/Zipper.php',
'Chumper\\Zipper\\Repositories\\RepositoryInterface' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/Repositories/RepositoryInterface.php',
'Chumper\\Zipper\\Repositories\\ZipRepository' => $baseDir . '/overrides/Chumper/Zipper/Repositories/ZipRepository.php',
'Chumper\\Zipper\\Repositories\\ZipRepository' => $baseDir . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories/ZipRepository.php',
'Chumper\\Zipper\\Zipper' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/Zipper.php',
'Chumper\\Zipper\\ZipperServiceProvider' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/ZipperServiceProvider.php',
'Codedge\\Updater\\AbstractRepositoryType' => $vendorDir . '/codedge/laravel-selfupdater/src/AbstractRepositoryType.php',
@@ -184,7 +184,7 @@ return array(
'Codedge\\Updater\\Listeners\\SendUpdateAvailableNotification' => $vendorDir . '/codedge/laravel-selfupdater/src/Listeners/SendUpdateAvailableNotification.php',
'Codedge\\Updater\\Listeners\\SendUpdateSucceededNotification' => $vendorDir . '/codedge/laravel-selfupdater/src/Listeners/SendUpdateSucceededNotification.php',
'Codedge\\Updater\\SourceRepository' => $vendorDir . '/codedge/laravel-selfupdater/src/SourceRepository.php',
'Codedge\\Updater\\SourceRepositoryTypes\\GithubRepositoryType' => $baseDir . '/overrides/Codedge/Updater/SourceRepositoryTypes/GithubRepositoryType.php',
'Codedge\\Updater\\SourceRepositoryTypes\\GithubRepositoryType' => $baseDir . '/overrides/codedge/laravel-selfupdater/src/SourceRepositoryTypes/GithubRepositoryType.php',
'Codedge\\Updater\\UpdaterFacade' => $vendorDir . '/codedge/laravel-selfupdater/src/UpdaterFacade.php',
'Codedge\\Updater\\UpdaterManager' => $vendorDir . '/codedge/laravel-selfupdater/src/UpdaterManager.php',
'Codedge\\Updater\\UpdaterServiceProvider' => $vendorDir . '/codedge/laravel-selfupdater/src/UpdaterServiceProvider.php',
@@ -259,7 +259,7 @@ return array(
'CssWhitesmithsFormatter' => $vendorDir . '/natxet/cssmin/src/CssMin.php',
'CustomersTableSeeder' => $baseDir . '/database/seeds/CustomersTableSeeder.php',
'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php',
'DebugBar\\DebugBar' => $baseDir . '/compat/maximebf/debugbar/src/DebugBar/DebugBar.php',
'DebugBar\\DebugBar' => $baseDir . '/overrides/maximebf/debugbar/src/DebugBar/DebugBar.php',
'Devfactory\\Minify\\Contracts\\MinifyInterface' => $vendorDir . '/devfactory/minify/src/Contracts/MinifyInterface.php',
'Devfactory\\Minify\\Exceptions\\CannotRemoveFileException' => $vendorDir . '/devfactory/minify/src/Exceptions/CannotRemoveFileException.php',
'Devfactory\\Minify\\Exceptions\\CannotSaveFileException' => $vendorDir . '/devfactory/minify/src/Exceptions/CannotSaveFileException.php',
@@ -270,7 +270,7 @@ return array(
'Devfactory\\Minify\\Facades\\MinifyFacade' => $vendorDir . '/devfactory/minify/src/Facades/MinifyFacade.php',
'Devfactory\\Minify\\Minify' => $vendorDir . '/devfactory/minify/src/Minify.php',
'Devfactory\\Minify\\MinifyServiceProvider' => $vendorDir . '/devfactory/minify/src/MinifyServiceProvider.php',
'Devfactory\\Minify\\Providers\\BaseProvider' => $baseDir . '/compat/devfactory/minify/src/Providers/BaseProvider.php',
'Devfactory\\Minify\\Providers\\BaseProvider' => $baseDir . '/overrides/devfactory/minify/src/Providers/BaseProvider.php',
'Devfactory\\Minify\\Providers\\JavaScript' => $vendorDir . '/devfactory/minify/src/Providers/JavaScript.php',
'Devfactory\\Minify\\Providers\\StyleSheet' => $vendorDir . '/devfactory/minify/src/Providers/StyleSheet.php',
'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
@@ -373,19 +373,19 @@ return array(
'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php',
'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Statement.php',
'Doctrine\\DBAL\\Driver\\PDOConnection' => $baseDir . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php',
'Doctrine\\DBAL\\Driver\\PDOConnection' => $baseDir . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php',
'Doctrine\\DBAL\\Driver\\PDOException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOException.php',
'Doctrine\\DBAL\\Driver\\PDOIbm\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOOracle\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOQueryImplementation' => $baseDir . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php',
'Doctrine\\DBAL\\Driver\\PDOQueryImplementation' => $baseDir . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php',
'Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php',
'Doctrine\\DBAL\\Driver\\PDOStatement' => $baseDir . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php',
'Doctrine\\DBAL\\Driver\\PDOStatementImplementations' => $baseDir . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php',
'Doctrine\\DBAL\\Driver\\PDOStatement' => $baseDir . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php',
'Doctrine\\DBAL\\Driver\\PDOStatementImplementations' => $baseDir . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php',
'Doctrine\\DBAL\\Driver\\PDO\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Connection.php',
'Doctrine\\DBAL\\Driver\\PDO\\Exception' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php',
'Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/MySQL/Driver.php',
@@ -617,7 +617,7 @@ return array(
'Dotenv\\Exception\\InvalidFileException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php',
'Dotenv\\Exception\\InvalidPathException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php',
'Dotenv\\Exception\\ValidationException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ValidationException.php',
'Dotenv\\Loader' => $baseDir . '/compat/vlucas/phpdotenv/src/Loader.php',
'Dotenv\\Loader' => $baseDir . '/overrides/vlucas/phpdotenv/src/Loader.php',
'Dotenv\\Validator' => $vendorDir . '/vlucas/phpdotenv/src/Validator.php',
'Egulias\\EmailValidator\\EmailLexer' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailLexer.php',
'Egulias\\EmailValidator\\EmailParser' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailParser.php',
@@ -685,9 +685,9 @@ return array(
'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',
'Fideloper\\Proxy\\TrustProxies' => $vendorDir . '/fideloper/proxy/src/TrustProxies.php',
'Fideloper\\Proxy\\TrustedProxyServiceProvider' => $vendorDir . '/fideloper/proxy/src/TrustedProxyServiceProvider.php',
'GuzzleHttp\\Client' => $baseDir . '/compat/guzzlehttp/guzzle/src/Client.php',
'GuzzleHttp\\Client' => $baseDir . '/overrides/guzzlehttp/guzzle/src/Client.php',
'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php',
'GuzzleHttp\\Cookie\\CookieJar' => $baseDir . '/compat/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
'GuzzleHttp\\Cookie\\CookieJar' => $baseDir . '/overrides/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
@@ -800,7 +800,7 @@ return array(
'HTMLPurifier_AttrDef_URI' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php',
'HTMLPurifier_AttrDef_URI_Email' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php',
'HTMLPurifier_AttrDef_URI_Email_SimpleCheck' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php',
'HTMLPurifier_AttrDef_URI_Host' => $baseDir . '/overrides/HTMLPurifier/HTMLPurifier/AttrDef/URI/Host.php',
'HTMLPurifier_AttrDef_URI_Host' => $baseDir . '/overrides/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php',
'HTMLPurifier_AttrDef_URI_IPv4' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php',
'HTMLPurifier_AttrDef_URI_IPv6' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php',
'HTMLPurifier_AttrTransform' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php',
@@ -987,20 +987,7 @@ return array(
'HTMLPurifier_VarParser_Flexible' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php',
'HTMLPurifier_VarParser_Native' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Html2Text\\BasicTest' => $vendorDir . '/html2text/html2text/test/BasicTest.php',
'Html2Text\\BlockquoteTest' => $vendorDir . '/html2text/html2text/test/BlockquoteTest.php',
'Html2Text\\ConstructorTest' => $vendorDir . '/html2text/html2text/test/ConstructorTest.php',
'Html2Text\\DefinitionListTest' => $vendorDir . '/html2text/html2text/test/DefinitionListTest.php',
'Html2Text\\Html2Text' => $vendorDir . '/html2text/html2text/src/Html2Text.php',
'Html2Text\\HtmlCharsTest' => $vendorDir . '/html2text/html2text/test/HtmlCharsTest.php',
'Html2Text\\ImageTest' => $vendorDir . '/html2text/html2text/test/ImageTest.php',
'Html2Text\\LinkTest' => $vendorDir . '/html2text/html2text/test/LinkTest.php',
'Html2Text\\ListTest' => $vendorDir . '/html2text/html2text/test/ListTest.php',
'Html2Text\\PreTest' => $vendorDir . '/html2text/html2text/test/PreTest.php',
'Html2Text\\PrintTest' => $vendorDir . '/html2text/html2text/test/PrintTest.php',
'Html2Text\\SearchReplaceTest' => $vendorDir . '/html2text/html2text/test/SearchReplaceTest.php',
'Html2Text\\SpanTest' => $vendorDir . '/html2text/html2text/test/SpanTest.php',
'Html2Text\\TableTest' => $vendorDir . '/html2text/html2text/test/TableTest.php',
'Illuminate\\Auth\\Access\\AuthorizationException' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php',
'Illuminate\\Auth\\Access\\Gate' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php',
'Illuminate\\Auth\\Access\\HandlesAuthorization' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php',
@@ -1022,7 +1009,7 @@ return array(
'Illuminate\\Auth\\Events\\Logout' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Logout.php',
'Illuminate\\Auth\\Events\\PasswordReset' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/PasswordReset.php',
'Illuminate\\Auth\\Events\\Registered' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Registered.php',
'Illuminate\\Auth\\Events\\Validated' => $baseDir . '/overrides/Illuminate/Auth/Events/Validated.php',
'Illuminate\\Auth\\Events\\Validated' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Auth/Events/Validated.php',
'Illuminate\\Auth\\GenericUser' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/GenericUser.php',
'Illuminate\\Auth\\GuardHelpers' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/GuardHelpers.php',
'Illuminate\\Auth\\Middleware\\Authenticate' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php',
@@ -1037,14 +1024,14 @@ return array(
'Illuminate\\Auth\\Passwords\\TokenRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php',
'Illuminate\\Auth\\Recaller' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Recaller.php',
'Illuminate\\Auth\\RequestGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/RequestGuard.php',
'Illuminate\\Auth\\SessionGuard' => $baseDir . '/overrides/Illuminate/Auth/SessionGuard.php',
'Illuminate\\Auth\\SessionGuard' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Auth/SessionGuard.php',
'Illuminate\\Auth\\TokenGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/TokenGuard.php',
'Illuminate\\Broadcasting\\BroadcastController' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php',
'Illuminate\\Broadcasting\\BroadcastEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php',
'Illuminate\\Broadcasting\\BroadcastException' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php',
'Illuminate\\Broadcasting\\BroadcastManager' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php',
'Illuminate\\Broadcasting\\BroadcastServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php',
'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => $baseDir . '/overrides/Illuminate/Broadcasting/Broadcasters/Broadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\NullBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php',
@@ -1063,7 +1050,7 @@ return array(
'Illuminate\\Cache\\CacheManager' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheManager.php',
'Illuminate\\Cache\\CacheServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php',
'Illuminate\\Cache\\Console\\CacheTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php',
'Illuminate\\Cache\\Console\\ClearCommand' => $baseDir . '/compat/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php',
'Illuminate\\Cache\\Console\\ClearCommand' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php',
'Illuminate\\Cache\\Console\\ForgetCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php',
'Illuminate\\Cache\\DatabaseStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/DatabaseStore.php',
'Illuminate\\Cache\\Events\\CacheEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php',
@@ -1081,7 +1068,7 @@ return array(
'Illuminate\\Cache\\RedisLock' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisLock.php',
'Illuminate\\Cache\\RedisStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisStore.php',
'Illuminate\\Cache\\RedisTaggedCache' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php',
'Illuminate\\Cache\\Repository' => $baseDir . '/compat/laravel/framework/src/Illuminate/Cache/Repository.php',
'Illuminate\\Cache\\Repository' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Cache/Repository.php',
'Illuminate\\Cache\\RetrievesMultipleKeys' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php',
'Illuminate\\Cache\\TagSet' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TagSet.php',
'Illuminate\\Cache\\TaggableStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php',
@@ -1106,8 +1093,8 @@ return array(
'Illuminate\\Console\\Scheduling\\Schedule' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php',
'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php',
'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php',
'Illuminate\\Container\\BoundMethod' => $baseDir . '/overrides/Illuminate/Container/BoundMethod.php',
'Illuminate\\Container\\Container' => $baseDir . '/overrides/Illuminate/Container/Container.php',
'Illuminate\\Container\\BoundMethod' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Container/BoundMethod.php',
'Illuminate\\Container\\Container' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Container/Container.php',
'Illuminate\\Container\\ContextualBindingBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php',
'Illuminate\\Container\\EntryNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Container/EntryNotFoundException.php',
'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php',
@@ -1242,11 +1229,11 @@ return array(
'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php',
'Illuminate\\Database\\Eloquent\\Factory' => $baseDir . '/compat/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\Factory' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\FactoryBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php',
'Illuminate\\Database\\Eloquent\\JsonEncodingException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php',
'Illuminate\\Database\\Eloquent\\MassAssignmentException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php',
'Illuminate\\Database\\Eloquent\\Model' => $baseDir . '/compat/laravel/framework/src/Illuminate/Database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\Model' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php',
'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php',
'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php',
@@ -1404,8 +1391,8 @@ return array(
'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php',
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
'Illuminate\\Foundation\\Inspiring' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php',
'Illuminate\\Foundation\\PackageManifest' => $baseDir . '/overrides/Illuminate/Foundation/PackageManifest.php',
'Illuminate\\Foundation\\ProviderRepository' => $baseDir . '/overrides/Illuminate/Foundation/ProviderRepository.php',
'Illuminate\\Foundation\\PackageManifest' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/PackageManifest.php',
'Illuminate\\Foundation\\ProviderRepository' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php',
'Illuminate\\Foundation\\Providers\\ArtisanServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php',
'Illuminate\\Foundation\\Providers\\ComposerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php',
'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php',
@@ -1449,7 +1436,7 @@ return array(
'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php',
'Illuminate\\Http\\Middleware\\FrameGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php',
'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php',
'Illuminate\\Http\\Request' => $baseDir . '/compat/laravel/framework/src/Illuminate/Http/Request.php',
'Illuminate\\Http\\Request' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Http/Request.php',
'Illuminate\\Http\\Resources\\CollectsResources' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php',
'Illuminate\\Http\\Resources\\ConditionallyLoadsAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php',
'Illuminate\\Http\\Resources\\DelegatesToResource' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php',
@@ -1479,7 +1466,7 @@ return array(
'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php',
'Illuminate\\Mail\\PendingMail' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/PendingMail.php',
'Illuminate\\Mail\\SendQueuedMailable' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php',
'Illuminate\\Mail\\TransportManager' => $baseDir . '/overrides/Illuminate/Mail/TransportManager.php',
'Illuminate\\Mail\\TransportManager' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php',
'Illuminate\\Mail\\Transport\\ArrayTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php',
'Illuminate\\Mail\\Transport\\LogTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php',
'Illuminate\\Mail\\Transport\\MailgunTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php',
@@ -1517,10 +1504,10 @@ return array(
'Illuminate\\Notifications\\NotificationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php',
'Illuminate\\Notifications\\RoutesNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php',
'Illuminate\\Notifications\\SendQueuedNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php',
'Illuminate\\Pagination\\AbstractPaginator' => $baseDir . '/compat/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php',
'Illuminate\\Pagination\\LengthAwarePaginator' => $baseDir . '/compat/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php',
'Illuminate\\Pagination\\AbstractPaginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php',
'Illuminate\\Pagination\\LengthAwarePaginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php',
'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php',
'Illuminate\\Pagination\\Paginator' => $baseDir . '/compat/laravel/framework/src/Illuminate/Pagination/Paginator.php',
'Illuminate\\Pagination\\Paginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/Paginator.php',
'Illuminate\\Pagination\\UrlWindow' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php',
'Illuminate\\Pipeline\\Hub' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Hub.php',
'Illuminate\\Pipeline\\Pipeline' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php',
@@ -1597,7 +1584,7 @@ return array(
'Illuminate\\Routing\\Console\\ControllerMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php',
'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php',
'Illuminate\\Routing\\Contracts\\ControllerDispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Contracts/ControllerDispatcher.php',
'Illuminate\\Routing\\Controller' => $baseDir . '/overrides/Illuminate/Routing/Controller.php',
'Illuminate\\Routing\\Controller' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/Controller.php',
'Illuminate\\Routing\\ControllerDispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php',
'Illuminate\\Routing\\ControllerMiddlewareOptions' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php',
'Illuminate\\Routing\\Events\\RouteMatched' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php',
@@ -1621,18 +1608,18 @@ return array(
'Illuminate\\Routing\\Route' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Route.php',
'Illuminate\\Routing\\RouteAction' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteAction.php',
'Illuminate\\Routing\\RouteBinding' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteBinding.php',
'Illuminate\\Routing\\RouteCollection' => $baseDir . '/overrides/Illuminate/Routing/RouteCollection.php',
'Illuminate\\Routing\\RouteCollection' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/RouteCollection.php',
'Illuminate\\Routing\\RouteCompiler' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteCompiler.php',
'Illuminate\\Routing\\RouteDependencyResolverTrait' => $baseDir . '/overrides/Illuminate/Routing/RouteDependencyResolverTrait.php',
'Illuminate\\Routing\\RouteDependencyResolverTrait' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php',
'Illuminate\\Routing\\RouteGroup' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteGroup.php',
'Illuminate\\Routing\\RouteParameterBinder' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php',
'Illuminate\\Routing\\RouteRegistrar' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php',
'Illuminate\\Routing\\RouteSignatureParameters' => $baseDir . '/overrides/Illuminate/Routing/RouteSignatureParameters.php',
'Illuminate\\Routing\\RouteSignatureParameters' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php',
'Illuminate\\Routing\\RouteUrlGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php',
'Illuminate\\Routing\\Router' => $baseDir . '/overrides/Illuminate/Routing/Router.php',
'Illuminate\\Routing\\Router' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/Router.php',
'Illuminate\\Routing\\RoutingServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php',
'Illuminate\\Routing\\SortedMiddleware' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php',
'Illuminate\\Routing\\UrlGenerator' => $baseDir . '/overrides/Illuminate/Routing/UrlGenerator.php',
'Illuminate\\Routing\\UrlGenerator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Routing/UrlGenerator.php',
'Illuminate\\Routing\\ViewController' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ViewController.php',
'Illuminate\\Session\\CacheBasedSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php',
'Illuminate\\Session\\Console\\SessionTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php',
@@ -1640,7 +1627,7 @@ return array(
'Illuminate\\Session\\DatabaseSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php',
'Illuminate\\Session\\EncryptedStore' => $vendorDir . '/laravel/framework/src/Illuminate/Session/EncryptedStore.php',
'Illuminate\\Session\\ExistenceAwareInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php',
'Illuminate\\Session\\FileSessionHandler' => $baseDir . '/compat/laravel/framework/src/Illuminate/Session/FileSessionHandler.php',
'Illuminate\\Session\\FileSessionHandler' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Session/FileSessionHandler.php',
'Illuminate\\Session\\Middleware\\AuthenticateSession' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php',
'Illuminate\\Session\\Middleware\\StartSession' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php',
'Illuminate\\Session\\NullSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/NullSessionHandler.php',
@@ -1650,8 +1637,8 @@ return array(
'Illuminate\\Session\\TokenMismatchException' => $vendorDir . '/laravel/framework/src/Illuminate/Session/TokenMismatchException.php',
'Illuminate\\Support\\AggregateServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php',
'Illuminate\\Support\\Arr' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Arr.php',
'Illuminate\\Support\\Carbon' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/Carbon.php',
'Illuminate\\Support\\Collection' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/Collection.php',
'Illuminate\\Support\\Carbon' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/Carbon.php',
'Illuminate\\Support\\Collection' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/Collection.php',
'Illuminate\\Support\\Composer' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Composer.php',
'Illuminate\\Support\\Debug\\Dumper' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Debug/Dumper.php',
'Illuminate\\Support\\Debug\\HtmlDumper' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php',
@@ -1689,19 +1676,19 @@ return array(
'Illuminate\\Support\\Facades\\URL' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/URL.php',
'Illuminate\\Support\\Facades\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Validator.php',
'Illuminate\\Support\\Facades\\View' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/View.php',
'Illuminate\\Support\\Fluent' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/Fluent.php',
'Illuminate\\Support\\Fluent' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/Fluent.php',
'Illuminate\\Support\\HigherOrderCollectionProxy' => $vendorDir . '/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php',
'Illuminate\\Support\\HigherOrderTapProxy' => $vendorDir . '/laravel/framework/src/Illuminate/Support/HigherOrderTapProxy.php',
'Illuminate\\Support\\HtmlString' => $vendorDir . '/laravel/framework/src/Illuminate/Support/HtmlString.php',
'Illuminate\\Support\\InteractsWithTime' => $vendorDir . '/laravel/framework/src/Illuminate/Support/InteractsWithTime.php',
'Illuminate\\Support\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Manager.php',
'Illuminate\\Support\\MessageBag' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/MessageBag.php',
'Illuminate\\Support\\MessageBag' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/MessageBag.php',
'Illuminate\\Support\\NamespacedItemResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php',
'Illuminate\\Support\\Optional' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/Optional.php',
'Illuminate\\Support\\Optional' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/Optional.php',
'Illuminate\\Support\\Pluralizer' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Pluralizer.php',
'Illuminate\\Support\\ProcessUtils' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ProcessUtils.php',
'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php',
'Illuminate\\Support\\Str' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/Str.php',
'Illuminate\\Support\\Str' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/Str.php',
'Illuminate\\Support\\Testing\\Fakes\\BusFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php',
'Illuminate\\Support\\Testing\\Fakes\\EventFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php',
'Illuminate\\Support\\Testing\\Fakes\\MailFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php',
@@ -1710,7 +1697,7 @@ return array(
'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php',
'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php',
'Illuminate\\Support\\Traits\\Macroable' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/Macroable.php',
'Illuminate\\Support\\ViewErrorBag' => $baseDir . '/compat/laravel/framework/src/Illuminate/Support/ViewErrorBag.php',
'Illuminate\\Support\\ViewErrorBag' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Support/ViewErrorBag.php',
'Illuminate\\Translation\\ArrayLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/ArrayLoader.php',
'Illuminate\\Translation\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/FileLoader.php',
'Illuminate\\Translation\\MessageSelector' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/MessageSelector.php',
@@ -1719,7 +1706,7 @@ return array(
'Illuminate\\Validation\\ClosureValidationRule' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ClosureValidationRule.php',
'Illuminate\\Validation\\Concerns\\FormatsMessages' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php',
'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php',
'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => $baseDir . '/overrides/Illuminate/Validation/Concerns/ValidatesAttributes.php',
'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php',
'Illuminate\\Validation\\DatabasePresenceVerifier' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php',
'Illuminate\\Validation\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Factory.php',
'Illuminate\\Validation\\PresenceVerifierInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php',
@@ -1767,7 +1754,7 @@ return array(
'Illuminate\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/View/Factory.php',
'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php',
'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => $vendorDir . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php',
'Illuminate\\View\\View' => $baseDir . '/compat/laravel/framework/src/Illuminate/View/View.php',
'Illuminate\\View\\View' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/View.php',
'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php',
'Illuminate\\View\\ViewName' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewName.php',
'Illuminate\\View\\ViewServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php',
@@ -1835,7 +1822,7 @@ return array(
'Lord\\Laroute\\Generators\\GeneratorInterface' => $vendorDir . '/lord/laroute/src/Generators/GeneratorInterface.php',
'Lord\\Laroute\\Generators\\TemplateGenerator' => $vendorDir . '/lord/laroute/src/Generators/TemplateGenerator.php',
'Lord\\Laroute\\LarouteServiceProvider' => $vendorDir . '/lord/laroute/src/LarouteServiceProvider.php',
'Lord\\Laroute\\Routes\\Collection' => $baseDir . '/overrides/Lord/Laroute/Routes/Collection.php',
'Lord\\Laroute\\Routes\\Collection' => $baseDir . '/overrides/lord/laroute/src/Routes/Collection.php',
'Lord\\Laroute\\Routes\\Exceptions\\ZeroRoutesException' => $vendorDir . '/lord/laroute/src/Routes/Exceptions/ZeroRoutesException.php',
'MailboxesTableSeeder' => $baseDir . '/database/seeds/MailboxesTableSeeder.php',
'Mews\\Purifier\\Facades\\Purifier' => $vendorDir . '/mews/purifier/src/Facades/Purifier.php',
@@ -1994,7 +1981,7 @@ return array(
'Nwidart\\Modules\\Generators\\FileGenerator' => $vendorDir . '/nwidart/laravel-modules/src/Generators/FileGenerator.php',
'Nwidart\\Modules\\Generators\\Generator' => $vendorDir . '/nwidart/laravel-modules/src/Generators/Generator.php',
'Nwidart\\Modules\\Generators\\ModuleGenerator' => $vendorDir . '/nwidart/laravel-modules/src/Generators/ModuleGenerator.php',
'Nwidart\\Modules\\Json' => $baseDir . '/overrides/Nwidart/Modules/Json.php',
'Nwidart\\Modules\\Json' => $baseDir . '/overrides/nwidart/laravel-modules/src/Json.php',
'Nwidart\\Modules\\LaravelModulesServiceProvider' => $vendorDir . '/nwidart/laravel-modules/src/LaravelModulesServiceProvider.php',
'Nwidart\\Modules\\Laravel\\Module' => $vendorDir . '/nwidart/laravel-modules/src/Laravel/Module.php',
'Nwidart\\Modules\\Laravel\\Repository' => $vendorDir . '/nwidart/laravel-modules/src/Laravel/Repository.php',
@@ -2002,7 +1989,7 @@ return array(
'Nwidart\\Modules\\Lumen\\Module' => $vendorDir . '/nwidart/laravel-modules/src/Lumen/Module.php',
'Nwidart\\Modules\\Lumen\\Repository' => $vendorDir . '/nwidart/laravel-modules/src/Lumen/Repository.php',
'Nwidart\\Modules\\Migrations\\Migrator' => $vendorDir . '/nwidart/laravel-modules/src/Migrations/Migrator.php',
'Nwidart\\Modules\\Module' => $baseDir . '/overrides/Nwidart/Modules/Module.php',
'Nwidart\\Modules\\Module' => $baseDir . '/overrides/nwidart/laravel-modules/src/Module.php',
'Nwidart\\Modules\\ModulesServiceProvider' => $vendorDir . '/nwidart/laravel-modules/src/ModulesServiceProvider.php',
'Nwidart\\Modules\\Process\\Installer' => $vendorDir . '/nwidart/laravel-modules/src/Process/Installer.php',
'Nwidart\\Modules\\Process\\Runner' => $vendorDir . '/nwidart/laravel-modules/src/Process/Runner.php',
@@ -2014,7 +2001,7 @@ return array(
'Nwidart\\Modules\\Publishing\\LangPublisher' => $vendorDir . '/nwidart/laravel-modules/src/Publishing/LangPublisher.php',
'Nwidart\\Modules\\Publishing\\MigrationPublisher' => $vendorDir . '/nwidart/laravel-modules/src/Publishing/MigrationPublisher.php',
'Nwidart\\Modules\\Publishing\\Publisher' => $vendorDir . '/nwidart/laravel-modules/src/Publishing/Publisher.php',
'Nwidart\\Modules\\Repository' => $baseDir . '/overrides/Nwidart/Modules/Repository.php',
'Nwidart\\Modules\\Repository' => $baseDir . '/overrides/nwidart/laravel-modules/src/Repository.php',
'Nwidart\\Modules\\Routing\\Controller' => $vendorDir . '/nwidart/laravel-modules/src/Routing/Controller.php',
'Nwidart\\Modules\\Support\\Config\\GenerateConfigReader' => $vendorDir . '/nwidart/laravel-modules/src/Support/Config/GenerateConfigReader.php',
'Nwidart\\Modules\\Support\\Config\\GeneratorPath' => $vendorDir . '/nwidart/laravel-modules/src/Support/Config/GeneratorPath.php',
@@ -2412,24 +2399,24 @@ return array(
'Psy\\VersionUpdater\\IntervalChecker' => $vendorDir . '/psy/psysh/src/VersionUpdater/IntervalChecker.php',
'Psy\\VersionUpdater\\NoopChecker' => $vendorDir . '/psy/psysh/src/VersionUpdater/NoopChecker.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\DatabaseController' => $vendorDir . '/rachidlaasri/laravel-installer/src/Controllers/DatabaseController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\EnvironmentController' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Controllers/EnvironmentController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\FinalController' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Controllers/FinalController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\EnvironmentController' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Controllers/EnvironmentController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\FinalController' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Controllers/FinalController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\PermissionsController' => $vendorDir . '/rachidlaasri/laravel-installer/src/Controllers/PermissionsController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\RequirementsController' => $vendorDir . '/rachidlaasri/laravel-installer/src/Controllers/RequirementsController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\UpdateController' => $vendorDir . '/rachidlaasri/laravel-installer/src/Controllers/UpdateController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\WelcomeController' => $vendorDir . '/rachidlaasri/laravel-installer/src/Controllers/WelcomeController.php',
'RachidLaasri\\LaravelInstaller\\Events\\EnvironmentSaved' => $vendorDir . '/rachidlaasri/laravel-installer/src/Events/EnvironmentSaved.php',
'RachidLaasri\\LaravelInstaller\\Events\\LaravelInstallerFinished' => $vendorDir . '/rachidlaasri/laravel-installer/src/Events/LaravelInstallerFinished.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\DatabaseManager' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/DatabaseManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\EnvironmentManager' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/EnvironmentManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\FinalInstallManager' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/FinalInstallManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\InstalledFileManager' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/InstalledFileManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\DatabaseManager' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/DatabaseManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\EnvironmentManager' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/EnvironmentManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\FinalInstallManager' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/FinalInstallManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\InstalledFileManager' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/InstalledFileManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\MigrationsHelper' => $vendorDir . '/rachidlaasri/laravel-installer/src/Helpers/MigrationsHelper.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\PermissionsChecker' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/PermissionsChecker.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\RequirementsChecker' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers/RequirementsChecker.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canInstall' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Middleware/canInstall.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\PermissionsChecker' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/PermissionsChecker.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\RequirementsChecker' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers/RequirementsChecker.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canInstall' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Middleware/canInstall.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canUpdate' => $vendorDir . '/rachidlaasri/laravel-installer/src/Middleware/canUpdate.php',
'RachidLaasri\\LaravelInstaller\\Providers\\LaravelInstallerServiceProvider' => $baseDir . '/overrides/RachidLaasri/LaravelInstaller/Providers/LaravelInstallerServiceProvider.php',
'RachidLaasri\\LaravelInstaller\\Providers\\LaravelInstallerServiceProvider' => $baseDir . '/overrides/rachidlaasri/laravel-installer/src/Providers/LaravelInstallerServiceProvider.php',
'Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php',
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
@@ -2472,12 +2459,12 @@ return array(
'Ramsey\\Uuid\\Provider\\TimeProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/TimeProviderInterface.php',
'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php',
'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php',
'Ramsey\\Uuid\\Uuid' => $baseDir . '/compat/ramsey/uuid/src/Uuid.php',
'Ramsey\\Uuid\\Uuid' => $baseDir . '/overrides/ramsey/uuid/src/Uuid.php',
'Ramsey\\Uuid\\UuidFactory' => $vendorDir . '/ramsey/uuid/src/UuidFactory.php',
'Ramsey\\Uuid\\UuidFactoryInterface' => $vendorDir . '/ramsey/uuid/src/UuidFactoryInterface.php',
'Ramsey\\Uuid\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/UuidInterface.php',
'Rap2hpoutre\\LaravelLogViewer\\BaseController' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => $baseDir . '/compat/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => $baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php',
'Rap2hpoutre\\LaravelLogViewer\\Level' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Level.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
@@ -2498,13 +2485,13 @@ return array(
'Spatie\\String\\Exceptions\\UnknownFunctionException' => $vendorDir . '/spatie/string/src/Exceptions/UnknownFunctionException.php',
'Spatie\\String\\Exceptions\\UnsetOffsetException' => $vendorDir . '/spatie/string/src/Exceptions/UnsetOffsetException.php',
'Spatie\\String\\Integrations\\Underscore' => $vendorDir . '/spatie/string/src/Integrations/Underscore.php',
'Spatie\\String\\Str' => $baseDir . '/compat/spatie/string/src/Str.php',
'Swift_MailTransport' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/MailTransport.php',
'Swift_Transport_EsmtpTransport' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php',
'Swift_Transport_Esmtp_AuthHandler' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php',
'Swift_Transport_MailInvoker' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/Transport/MailInvoker.php',
'Swift_Transport_MailTransport' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/Transport/MailTransport.php',
'Swift_Transport_SimpleMailInvoker' => $baseDir . '/overrides/Swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php',
'Spatie\\String\\Str' => $baseDir . '/overrides/spatie/string/src/Str.php',
'Swift_MailTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php',
'Swift_Transport_EsmtpTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php',
'Swift_Transport_Esmtp_AuthHandler' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php',
'Swift_Transport_MailInvoker' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php',
'Swift_Transport_MailTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php',
'Swift_Transport_SimpleMailInvoker' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php',
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
@@ -2520,7 +2507,7 @@ return array(
'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php',
'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Descriptor/JsonDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $baseDir . '/compat/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $baseDir . '/overrides/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php',
'Symfony\\Component\\Console\\EventListener\\ErrorListener' => $vendorDir . '/symfony/console/EventListener/ErrorListener.php',
'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php',
@@ -2542,9 +2529,9 @@ return array(
'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php',
'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => $baseDir . '/compat/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => $baseDir . '/overrides/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php',
'Symfony\\Component\\Console\\Helper\\HelperSet' => $baseDir . '/compat/symfony/console/Helper/HelperSet.php',
'Symfony\\Component\\Console\\Helper\\HelperSet' => $baseDir . '/overrides/symfony/console/Helper/HelperSet.php',
'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php',
'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php',
'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php',
@@ -2634,7 +2621,7 @@ return array(
'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Debug.php',
'Symfony\\Component\\Debug\\DebugClassLoader' => $vendorDir . '/symfony/debug/DebugClassLoader.php',
'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/ErrorHandler.php',
'Symfony\\Component\\Debug\\ExceptionHandler' => $baseDir . '/overrides/Symfony/Component/Debug/ExceptionHandler.php',
'Symfony\\Component\\Debug\\ExceptionHandler' => $baseDir . '/overrides/symfony/debug/ExceptionHandler.php',
'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Exception/ClassNotFoundException.php',
'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Exception/ContextErrorException.php',
'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Exception/FatalErrorException.php',
@@ -2664,23 +2651,23 @@ return array(
'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php',
'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php',
'Symfony\\Component\\Finder\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/finder/Exception/ExceptionInterface.php',
'Symfony\\Component\\Finder\\Finder' => $baseDir . '/compat/symfony/finder/Finder.php',
'Symfony\\Component\\Finder\\Finder' => $baseDir . '/overrides/symfony/finder/Finder.php',
'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php',
'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/DateRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/DepthRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/FileTypeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/DateRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/DepthRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/FileTypeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/FilenameFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/FilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/FilenameFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/FilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $baseDir . '/compat/symfony/finder/Iterator/PathFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $baseDir . '/compat/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $baseDir . '/overrides/symfony/finder/Iterator/PathFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $baseDir . '/overrides/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $baseDir . '/compat/symfony/finder/Iterator/SortableIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $baseDir . '/overrides/symfony/finder/Iterator/SortableIterator.php',
'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/AcceptHeader.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $baseDir . '/overrides/symfony/http-foundation/AcceptHeader.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php',
'Symfony\\Component\\HttpFoundation\\ApacheRequest' => $vendorDir . '/symfony/http-foundation/ApacheRequest.php',
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php',
@@ -2689,7 +2676,7 @@ return array(
'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => $vendorDir . '/symfony/http-foundation/Exception/RequestExceptionInterface.php',
'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => $vendorDir . '/symfony/http-foundation/Exception/SuspiciousOperationException.php',
'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => $vendorDir . '/symfony/http-foundation/ExpressionRequestMatcher.php',
'Symfony\\Component\\HttpFoundation\\FileBag' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/FileBag.php',
'Symfony\\Component\\HttpFoundation\\FileBag' => $baseDir . '/overrides/symfony/http-foundation/FileBag.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/File/Exception/AccessDeniedException.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileException.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileNotFoundException.php',
@@ -2705,17 +2692,17 @@ return array(
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php',
'Symfony\\Component\\HttpFoundation\\File\\Stream' => $vendorDir . '/symfony/http-foundation/File/Stream.php',
'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/File/UploadedFile.php',
'Symfony\\Component\\HttpFoundation\\HeaderBag' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/HeaderBag.php',
'Symfony\\Component\\HttpFoundation\\HeaderBag' => $baseDir . '/overrides/symfony/http-foundation/HeaderBag.php',
'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/IpUtils.php',
'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/JsonResponse.php',
'Symfony\\Component\\HttpFoundation\\ParameterBag' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/ParameterBag.php',
'Symfony\\Component\\HttpFoundation\\ParameterBag' => $baseDir . '/overrides/symfony/http-foundation/ParameterBag.php',
'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/RedirectResponse.php',
'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Request.php',
'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/RequestMatcher.php',
'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/RequestMatcherInterface.php',
'Symfony\\Component\\HttpFoundation\\RequestStack' => $vendorDir . '/symfony/http-foundation/RequestStack.php',
'Symfony\\Component\\HttpFoundation\\Response' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/Response.php',
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $baseDir . '/overrides/Symfony/Component/HttpFoundation/ResponseHeaderBag.php',
'Symfony\\Component\\HttpFoundation\\Response' => $baseDir . '/overrides/symfony/http-foundation/Response.php',
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $baseDir . '/overrides/symfony/http-foundation/ResponseHeaderBag.php',
'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/ServerBag.php',
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBag.php',
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php',
@@ -2837,7 +2824,7 @@ return array(
'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Exception/GoneHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $baseDir . '/compat/symfony/http-kernel/Exception/HttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/HttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Exception/HttpExceptionInterface.php',
'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php',
@@ -2896,11 +2883,11 @@ return array(
'Symfony\\Component\\Process\\Pipes\\PipesInterface' => $vendorDir . '/symfony/process/Pipes/PipesInterface.php',
'Symfony\\Component\\Process\\Pipes\\UnixPipes' => $vendorDir . '/symfony/process/Pipes/UnixPipes.php',
'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => $vendorDir . '/symfony/process/Pipes/WindowsPipes.php',
'Symfony\\Component\\Process\\Process' => $baseDir . '/compat/symfony/process/Process.php',
'Symfony\\Component\\Process\\Process' => $baseDir . '/overrides/symfony/process/Process.php',
'Symfony\\Component\\Process\\ProcessBuilder' => $vendorDir . '/symfony/process/ProcessBuilder.php',
'Symfony\\Component\\Process\\ProcessUtils' => $vendorDir . '/symfony/process/ProcessUtils.php',
'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Annotation/Route.php',
'Symfony\\Component\\Routing\\CompiledRoute' => $baseDir . '/compat/symfony/routing/CompiledRoute.php',
'Symfony\\Component\\Routing\\CompiledRoute' => $baseDir . '/overrides/symfony/routing/CompiledRoute.php',
'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => $vendorDir . '/symfony/routing/DependencyInjection/RoutingResolverPass.php',
'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/routing/Exception/ExceptionInterface.php',
'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => $vendorDir . '/symfony/routing/Exception/InvalidParameterException.php',
@@ -2946,7 +2933,7 @@ return array(
'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/UrlMatcherInterface.php',
'Symfony\\Component\\Routing\\RequestContext' => $vendorDir . '/symfony/routing/RequestContext.php',
'Symfony\\Component\\Routing\\RequestContextAwareInterface' => $vendorDir . '/symfony/routing/RequestContextAwareInterface.php',
'Symfony\\Component\\Routing\\Route' => $baseDir . '/compat/symfony/routing/Route.php',
'Symfony\\Component\\Routing\\Route' => $baseDir . '/overrides/symfony/routing/Route.php',
'Symfony\\Component\\Routing\\RouteCollection' => $vendorDir . '/symfony/routing/RouteCollection.php',
'Symfony\\Component\\Routing\\RouteCollectionBuilder' => $vendorDir . '/symfony/routing/RouteCollectionBuilder.php',
'Symfony\\Component\\Routing\\RouteCompiler' => $vendorDir . '/symfony/routing/RouteCompiler.php',
@@ -3048,9 +3035,9 @@ return array(
'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php',
'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php',
'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php',
'Symfony\\Component\\VarDumper\\Cloner\\Data' => $baseDir . '/compat/symfony/var-dumper/Cloner/Data.php',
'Symfony\\Component\\VarDumper\\Cloner\\Data' => $baseDir . '/overrides/symfony/var-dumper/Cloner/Data.php',
'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php',
'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $baseDir . '/compat/symfony/var-dumper/Cloner/Stub.php',
'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $baseDir . '/overrides/symfony/var-dumper/Cloner/Stub.php',
'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php',
'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php',
'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php',
@@ -3068,20 +3055,16 @@ return array(
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
'TorMorten\\Eventy\\Action' => $baseDir . '/overrides/TorMorten/Eventy/Action.php',
'TorMorten\\Eventy\\Action' => $baseDir . '/overrides/tormjens/eventy/src/Action.php',
'TorMorten\\Eventy\\Event' => $vendorDir . '/tormjens/eventy/src/Event.php',
'TorMorten\\Eventy\\EventBladeServiceProvider' => $vendorDir . '/tormjens/eventy/src/EventBladeServiceProvider.php',
'TorMorten\\Eventy\\EventServiceProvider' => $vendorDir . '/tormjens/eventy/src/EventServiceProvider.php',
'TorMorten\\Eventy\\Events' => $vendorDir . '/tormjens/eventy/src/Events.php',
'TorMorten\\Eventy\\Facades\\Events' => $vendorDir . '/tormjens/eventy/src/Facades/Events.php',
'TorMorten\\Eventy\\Filter' => $baseDir . '/overrides/TorMorten/Eventy/Filter.php',
'TorMorten\\Eventy\\Filter' => $baseDir . '/overrides/tormjens/eventy/src/Filter.php',
'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
'Underscore\\Dispatch' => $vendorDir . '/anahkiasen/underscore-php/src/Dispatch.php',
'Underscore\\DispatchTest' => $vendorDir . '/anahkiasen/underscore-php/tests/DispatchTest.php',
'Underscore\\Dummies\\DummyClass' => $vendorDir . '/anahkiasen/underscore-php/tests/Dummies/DummyClass.php',
'Underscore\\Dummies\\DummyDefault' => $vendorDir . '/anahkiasen/underscore-php/tests/Dummies/DummyDefault.php',
'Underscore\\Method' => $vendorDir . '/anahkiasen/underscore-php/src/Method.php',
'Underscore\\MethodTest' => $vendorDir . '/anahkiasen/underscore-php/tests/MethodTest.php',
'Underscore\\Methods\\ArraysMethods' => $vendorDir . '/anahkiasen/underscore-php/src/Methods/ArraysMethods.php',
'Underscore\\Methods\\CollectionMethods' => $vendorDir . '/anahkiasen/underscore-php/src/Methods/CollectionMethods.php',
'Underscore\\Methods\\FunctionsMethods' => $vendorDir . '/anahkiasen/underscore-php/src/Methods/FunctionsMethods.php',
@@ -3089,26 +3072,18 @@ return array(
'Underscore\\Methods\\ObjectMethods' => $vendorDir . '/anahkiasen/underscore-php/src/Methods/ObjectMethods.php',
'Underscore\\Methods\\StringsMethods' => $vendorDir . '/anahkiasen/underscore-php/src/Methods/StringsMethods.php',
'Underscore\\Parse' => $vendorDir . '/anahkiasen/underscore-php/src/Parse.php',
'Underscore\\ParseTest' => $vendorDir . '/anahkiasen/underscore-php/tests/ParseTest.php',
'Underscore\\Traits\\Repository' => $vendorDir . '/anahkiasen/underscore-php/src/Traits/Repository.php',
'Underscore\\Types\\Arrays' => $vendorDir . '/anahkiasen/underscore-php/src/Types/Arrays.php',
'Underscore\\Types\\ArraysTest' => $vendorDir . '/anahkiasen/underscore-php/tests/Types/ArraysTest.php',
'Underscore\\Types\\Functions' => $vendorDir . '/anahkiasen/underscore-php/src/Types/Functions.php',
'Underscore\\Types\\FunctionsTest' => $vendorDir . '/anahkiasen/underscore-php/tests/Types/FunctionsTest.php',
'Underscore\\Types\\Number' => $vendorDir . '/anahkiasen/underscore-php/src/Types/Number.php',
'Underscore\\Types\\NumberTest' => $vendorDir . '/anahkiasen/underscore-php/tests/Types/NumberTest.php',
'Underscore\\Types\\Object' => $vendorDir . '/anahkiasen/underscore-php/src/Types/Object.php',
'Underscore\\Types\\ObjectTest' => $vendorDir . '/anahkiasen/underscore-php/tests/Types/ObjectTest.php',
'Underscore\\Types\\StringTest' => $vendorDir . '/anahkiasen/underscore-php/tests/Types/StringTest.php',
'Underscore\\Types\\Strings' => $vendorDir . '/anahkiasen/underscore-php/src/Types/Strings.php',
'Underscore\\Underscore' => $vendorDir . '/anahkiasen/underscore-php/src/Underscore.php',
'Underscore\\UnderscoreTest' => $vendorDir . '/anahkiasen/underscore-php/tests/UnderscoreTest.php',
'Underscore\\UnderscoreTestCase' => $vendorDir . '/anahkiasen/underscore-php/tests/UnderscoreTestCase.php',
'UsersTableSeeder' => $baseDir . '/database/seeds/UsersTableSeeder.php',
'Watson\\Rememberable\\Query\\Builder' => $vendorDir . '/watson/rememberable/src/Query/Builder.php',
'Watson\\Rememberable\\Rememberable' => $vendorDir . '/watson/rememberable/src/Rememberable.php',
'Webklex\\IMAP\\Attachment' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Attachment.php',
'Webklex\\IMAP\\Client' => $baseDir . '/overrides/Webklex/IMAP/Client.php',
'Webklex\\IMAP\\Client' => $baseDir . '/overrides/webklex/laravel-imap/src/IMAP/Client.php',
'Webklex\\IMAP\\ClientManager' => $vendorDir . '/webklex/laravel-imap/src/IMAP/ClientManager.php',
'Webklex\\IMAP\\EncodingAliases' => $vendorDir . '/webklex/laravel-imap/src/IMAP/EncodingAliases.php',
'Webklex\\IMAP\\Exceptions\\ConnectionFailedException' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Exceptions/ConnectionFailedException.php',
@@ -3118,7 +3093,7 @@ return array(
'Webklex\\IMAP\\Exceptions\\MethodNotFoundException' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Exceptions/MethodNotFoundException.php',
'Webklex\\IMAP\\Facades\\Client' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Facades/Client.php',
'Webklex\\IMAP\\Folder' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Folder.php',
'Webklex\\IMAP\\Message' => $baseDir . '/overrides/Webklex/IMAP/Message.php',
'Webklex\\IMAP\\Message' => $baseDir . '/overrides/webklex/laravel-imap/src/IMAP/Message.php',
'Webklex\\IMAP\\Providers\\LaravelServiceProvider' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Providers/LaravelServiceProvider.php',
'Webklex\\IMAP\\Query\\Query' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Query/Query.php',
'Webklex\\IMAP\\Query\\WhereQuery' => $vendorDir . '/webklex/laravel-imap/src/IMAP/Query/WhereQuery.php',

View File

@@ -12,16 +12,16 @@ return array(
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'e91d0dc994644828154ae2387ede1ca8' => $vendorDir . '/spatie/string/src/string_functions.php',
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
'e91d0dc994644828154ae2387ede1ca8' => $vendorDir . '/spatie/string/src/string_functions.php',
'cb61d74ad51d00867155534456b38b23' => $vendorDir . '/mews/purifier/src/helpers.php',
'9f394da3192a168c4633675768d80428' => $vendorDir . '/nwidart/laravel-modules/src/helpers.php',
'72b1e3f4a2af9b30b3f137b3ec2057fc' => $vendorDir . '/spatie/laravel-activitylog/src/helpers.php',
'd7354eb4c8441fbf08eec280b61c7c73' => $vendorDir . '/rachidlaasri/laravel-installer/src/Helpers/functions.php',
'72b1e3f4a2af9b30b3f137b3ec2057fc' => $vendorDir . '/spatie/laravel-activitylog/src/helpers.php',
);

View File

@@ -6,11 +6,11 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Swift_' => array($baseDir . '/overrides/Swiftmailer/lib/classes'),
'Swift_' => array($baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes'),
'Rap2hpoutre\\LaravelLogViewer\\' => array($vendorDir . '/rap2hpoutre/laravel-log-viewer/src'),
'Parsedown' => array($vendorDir . '/erusev/parsedown'),
'JShrink' => array($vendorDir . '/tedivm/jshrink/src'),
'HTMLPurifier_' => array($baseDir . '/overrides/HTMLPurifier'),
'HTMLPurifier_' => array($baseDir . '/overrides/ezyang/htmlpurifier/library'),
'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'),
);

View File

@@ -7,38 +7,38 @@ $baseDir = dirname($vendorDir);
return array(
'XdgBaseDir\\' => array($vendorDir . '/dnoegel/php-xdg-base-dir/src'),
'Webklex\\IMAP\\' => array($baseDir . '/overrides/Webklex/IMAP', $vendorDir . '/webklex/laravel-imap/src/IMAP'),
'Webklex\\IMAP\\' => array($baseDir . '/overrides/webklex/laravel-imap/src/IMAP', $vendorDir . '/webklex/laravel-imap/src/IMAP'),
'Watson\\Rememberable\\' => array($vendorDir . '/watson/rememberable/src'),
'Underscore\\' => array($vendorDir . '/anahkiasen/underscore-php/src', $vendorDir . '/anahkiasen/underscore-php/tests'),
'TorMorten\\Eventy\\' => array($baseDir . '/overrides/TorMorten/Eventy', $vendorDir . '/tormjens/eventy/src'),
'TorMorten\\Eventy\\' => array($baseDir . '/overrides/tormjens/eventy/src', $vendorDir . '/tormjens/eventy/src'),
'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'),
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Component\\VarDumper\\Cloner\\' => array($baseDir . '/compat/symfony/var-dumper/Cloner'),
'Symfony\\Component\\VarDumper\\Cloner\\' => array($baseDir . '/overrides/symfony/var-dumper/Cloner'),
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
'Symfony\\Component\\Routing\\' => array($baseDir . '/compat/symfony/routing', $vendorDir . '/symfony/routing'),
'Symfony\\Component\\Process\\' => array($baseDir . '/compat/symfony/process', $vendorDir . '/symfony/process'),
'Symfony\\Component\\HttpKernel\\Exception\\' => array($baseDir . '/compat/symfony/http-kernel/Exception'),
'Symfony\\Component\\Routing\\' => array($baseDir . '/overrides/symfony/routing', $vendorDir . '/symfony/routing'),
'Symfony\\Component\\Process\\' => array($baseDir . '/overrides/symfony/process', $vendorDir . '/symfony/process'),
'Symfony\\Component\\HttpKernel\\Exception\\' => array($baseDir . '/overrides/symfony/http-kernel/Exception'),
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
'Symfony\\Component\\HttpFoundation\\' => array($baseDir . '/overrides/Symfony/Component/HttpFoundation', $vendorDir . '/symfony/http-foundation'),
'Symfony\\Component\\Finder\\Iterator\\' => array($baseDir . '/compat/symfony/finder/Iterator'),
'Symfony\\Component\\Finder\\' => array($baseDir . '/compat/symfony/finder', $vendorDir . '/symfony/finder'),
'Symfony\\Component\\HttpFoundation\\' => array($baseDir . '/overrides/symfony/http-foundation', $vendorDir . '/symfony/http-foundation'),
'Symfony\\Component\\Finder\\Iterator\\' => array($baseDir . '/overrides/symfony/finder/Iterator'),
'Symfony\\Component\\Finder\\' => array($baseDir . '/overrides/symfony/finder', $vendorDir . '/symfony/finder'),
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\Debug\\' => array($baseDir . '/overrides/Symfony/Component/Debug', $vendorDir . '/symfony/debug'),
'Symfony\\Component\\Debug\\' => array($baseDir . '/overrides/symfony/debug', $vendorDir . '/symfony/debug'),
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
'Symfony\\Component\\Console\\Helper\\' => array($baseDir . '/compat/symfony/console/Helper'),
'Symfony\\Component\\Console\\Descriptor\\' => array($baseDir . '/compat/symfony/console/Descriptor'),
'Symfony\\Component\\Console\\Helper\\' => array($baseDir . '/overrides/symfony/console/Helper'),
'Symfony\\Component\\Console\\Descriptor\\' => array($baseDir . '/overrides/symfony/console/Descriptor'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Spatie\\String\\' => array($baseDir . '/compat/spatie/string/src', $vendorDir . '/spatie/string/src'),
'Spatie\\String\\' => array($baseDir . '/overrides/spatie/string/src', $vendorDir . '/spatie/string/src'),
'Spatie\\Activitylog\\' => array($vendorDir . '/spatie/laravel-activitylog/src'),
'Rap2hpoutre\\LaravelLogViewer\\' => array($baseDir . '/compat/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer'),
'Ramsey\\Uuid\\' => array($baseDir . '/compat/ramsey/uuid/src', $vendorDir . '/ramsey/uuid/src'),
'RachidLaasri\\LaravelInstaller\\Providers\\' => array($baseDir . '/overrides/RachidLaasri/LaravelInstaller/Providers'),
'RachidLaasri\\LaravelInstaller\\Middleware\\' => array($baseDir . '/overrides/RachidLaasri/LaravelInstaller/Middleware'),
'RachidLaasri\\LaravelInstaller\\Helpers\\' => array($baseDir . '/overrides/RachidLaasri/LaravelInstaller/Helpers'),
'RachidLaasri\\LaravelInstaller\\Controllers\\' => array($baseDir . '/overrides/RachidLaasri/LaravelInstaller/Controllers'),
'Rap2hpoutre\\LaravelLogViewer\\' => array($baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer'),
'Ramsey\\Uuid\\' => array($baseDir . '/overrides/ramsey/uuid/src', $vendorDir . '/ramsey/uuid/src'),
'RachidLaasri\\LaravelInstaller\\Providers\\' => array($baseDir . '/overrides/rachidlaasri/laravel-installer/src/Providers'),
'RachidLaasri\\LaravelInstaller\\Middleware\\' => array($baseDir . '/overrides/rachidlaasri/laravel-installer/src/Middleware'),
'RachidLaasri\\LaravelInstaller\\Helpers\\' => array($baseDir . '/overrides/rachidlaasri/laravel-installer/src/Helpers'),
'RachidLaasri\\LaravelInstaller\\Controllers\\' => array($baseDir . '/overrides/rachidlaasri/laravel-installer/src/Controllers'),
'RachidLaasri\\LaravelInstaller\\' => array($vendorDir . '/rachidlaasri/laravel-installer/src'),
'Psy\\' => array($vendorDir . '/psy/psysh/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
@@ -47,59 +47,59 @@ return array(
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'Patchwork\\' => array($vendorDir . '/patchwork/utf8/src/Patchwork'),
'Nwidart\\Modules\\' => array($baseDir . '/overrides/Nwidart/Modules', $vendorDir . '/nwidart/laravel-modules/src'),
'Nwidart\\Modules\\' => array($baseDir . '/overrides/nwidart/laravel-modules/src', $vendorDir . '/nwidart/laravel-modules/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'Modules\\' => array($baseDir . '/Modules'),
'Mews\\Purifier\\' => array($vendorDir . '/mews/purifier/src'),
'Lord\\Laroute\\Routes\\' => array($baseDir . '/overrides/Lord/Laroute/Routes'),
'Lord\\Laroute\\Routes\\' => array($baseDir . '/overrides/lord/laroute/src/Routes'),
'Lord\\Laroute\\' => array($vendorDir . '/lord/laroute/src'),
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'),
'Javoscript\\MacroableModels\\' => array($vendorDir . '/javoscript/laravel-macroable-models/src'),
'JakubOnderka\\PhpConsoleHighlighter\\' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'),
'JakubOnderka\\PhpConsoleColor\\' => array($vendorDir . '/jakub-onderka/php-console-color/src'),
'Illuminate\\View\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/View'),
'Illuminate\\Validation\\Concerns\\' => array($baseDir . '/overrides/Illuminate/Validation/Concerns'),
'Illuminate\\Support\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Support'),
'Illuminate\\Session\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Session'),
'Illuminate\\Routing\\' => array($baseDir . '/overrides/Illuminate/Routing'),
'Illuminate\\Pagination\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Pagination'),
'Illuminate\\Mail\\' => array($baseDir . '/overrides/Illuminate/Mail'),
'Illuminate\\Http\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Http'),
'Illuminate\\Foundation\\' => array($baseDir . '/overrides/Illuminate/Foundation'),
'Illuminate\\Database\\Eloquent\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Database/Eloquent'),
'Illuminate\\Container\\' => array($baseDir . '/overrides/Illuminate/Container'),
'Illuminate\\Cache\\Console\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Cache/Console'),
'Illuminate\\Cache\\' => array($baseDir . '/compat/laravel/framework/src/Illuminate/Cache'),
'Illuminate\\Broadcasting\\Broadcasters\\' => array($baseDir . '/overrides/Illuminate/Broadcasting/Broadcasters'),
'Illuminate\\Auth\\' => array($baseDir . '/overrides/Illuminate/Auth'),
'Illuminate\\View\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/View'),
'Illuminate\\Validation\\Concerns\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns'),
'Illuminate\\Support\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Support'),
'Illuminate\\Session\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Session'),
'Illuminate\\Routing\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Routing'),
'Illuminate\\Pagination\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination'),
'Illuminate\\Mail\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Mail'),
'Illuminate\\Http\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Http'),
'Illuminate\\Foundation\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation'),
'Illuminate\\Database\\Eloquent\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent'),
'Illuminate\\Container\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Container'),
'Illuminate\\Cache\\Console\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cache/Console'),
'Illuminate\\Cache\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cache'),
'Illuminate\\Broadcasting\\Broadcasters\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters'),
'Illuminate\\Auth\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Auth'),
'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'),
'Html2Text\\' => array($vendorDir . '/html2text/html2text/src', $vendorDir . '/html2text/html2text/test'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\Cookie\\' => array($baseDir . '/compat/guzzlehttp/guzzle/src/Cookie'),
'GuzzleHttp\\' => array($baseDir . '/compat/guzzlehttp/guzzle/src', $vendorDir . '/guzzlehttp/guzzle/src'),
'GuzzleHttp\\Cookie\\' => array($baseDir . '/overrides/guzzlehttp/guzzle/src/Cookie'),
'GuzzleHttp\\' => array($baseDir . '/overrides/guzzlehttp/guzzle/src', $vendorDir . '/guzzlehttp/guzzle/src'),
'Fideloper\\Proxy\\' => array($vendorDir . '/fideloper/proxy/src'),
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'),
'Dotenv\\' => array($baseDir . '/compat/vlucas/phpdotenv/src', $vendorDir . '/vlucas/phpdotenv/src'),
'Doctrine\\DBAL\\Driver\\' => array($baseDir . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver'),
'Dotenv\\' => array($baseDir . '/overrides/vlucas/phpdotenv/src', $vendorDir . '/vlucas/phpdotenv/src'),
'Doctrine\\DBAL\\Driver\\' => array($baseDir . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver'),
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL'),
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'),
'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/lib/Doctrine/Common'),
'Devfactory\\Minify\\Providers\\' => array($baseDir . '/compat/devfactory/minify/src/Providers'),
'Devfactory\\Minify\\Providers\\' => array($baseDir . '/overrides/devfactory/minify/src/Providers'),
'Devfactory\\Minify\\' => array($vendorDir . '/devfactory/minify/src'),
'DebugBar\\' => array($baseDir . '/compat/maximebf/debugbar/src/DebugBar'),
'DebugBar\\' => array($baseDir . '/overrides/maximebf/debugbar/src/DebugBar'),
'Cron\\' => array($vendorDir . '/mtdowling/cron-expression/src/Cron'),
'Codedge\\Updater\\SourceRepositoryTypes\\' => array($baseDir . '/overrides/Codedge/Updater/SourceRepositoryTypes'),
'Codedge\\Updater\\SourceRepositoryTypes\\' => array($baseDir . '/overrides/codedge/laravel-selfupdater/src/SourceRepositoryTypes'),
'Codedge\\Updater\\' => array($vendorDir . '/codedge/laravel-selfupdater/src'),
'Chumper\\Zipper\\Repositories\\' => array($baseDir . '/overrides/Chumper/Zipper/Repositories'),
'Chumper\\Zipper\\Repositories\\' => array($baseDir . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories'),
'Chumper\\Zipper\\' => array($vendorDir . '/chumper/zipper/src/Chumper/Zipper'),
'Carbon\\' => array($baseDir . '/compat/nesbot/carbon/src/Carbon'),
'Barryvdh\\TranslationManager\\' => array($baseDir . '/overrides/Barryvdh/TranslationManager', $vendorDir . '/barryvdh/laravel-translation-manager/src'),
'Barryvdh\\Debugbar\\DataFormatter\\' => array($baseDir . '/compat/barryvdh/laravel-debugbar/src/DataFormatter'),
'Barryvdh\\Debugbar\\' => array($baseDir . '/compat/barryvdh/laravel-debugbar/src'),
'Axn\\Laroute\\Routes\\' => array($baseDir . '/overrides/Axn/Laroute/Routes'),
'Carbon\\' => array($baseDir . '/overrides/nesbot/carbon/src/Carbon'),
'Barryvdh\\TranslationManager\\' => array($baseDir . '/overrides/barryvdh/laravel-translation-manager/src', $vendorDir . '/barryvdh/laravel-translation-manager/src'),
'Barryvdh\\Debugbar\\DataFormatter\\' => array($baseDir . '/overrides/barryvdh/laravel-debugbar/src/DataFormatter'),
'Barryvdh\\Debugbar\\' => array($baseDir . '/overrides/barryvdh/laravel-debugbar/src'),
'Axn\\Laroute\\Routes\\' => array($baseDir . '/overrides/axn/laravel-laroute/src/Routes'),
'Axn\\Laroute\\' => array($vendorDir . '/axn/laravel-laroute/src'),
'App\\' => array($baseDir . '/app'),
'' => array($vendorDir . '/nesbot/carbon/src'),

View File

@@ -63,11 +63,16 @@ class ComposerAutoloaderInitbf8dc242a640d7c740f283f226d0bdb4
}
}
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequirebf8dc242a640d7c740f283f226d0bdb4($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

View File

@@ -13,18 +13,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
'58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'e91d0dc994644828154ae2387ede1ca8' => __DIR__ . '/..' . '/spatie/string/src/string_functions.php',
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
'e91d0dc994644828154ae2387ede1ca8' => __DIR__ . '/..' . '/spatie/string/src/string_functions.php',
'cb61d74ad51d00867155534456b38b23' => __DIR__ . '/..' . '/mews/purifier/src/helpers.php',
'9f394da3192a168c4633675768d80428' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/helpers.php',
'72b1e3f4a2af9b30b3f137b3ec2057fc' => __DIR__ . '/..' . '/spatie/laravel-activitylog/src/helpers.php',
'd7354eb4c8441fbf08eec280b61c7c73' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Helpers/functions.php',
'72b1e3f4a2af9b30b3f137b3ec2057fc' => __DIR__ . '/..' . '/spatie/laravel-activitylog/src/helpers.php',
);
public static $prefixLengthsPsr4 = array (
@@ -193,7 +193,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Webklex\\IMAP\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Webklex/IMAP',
0 => __DIR__ . '/../..' . '/overrides/webklex/laravel-imap/src/IMAP',
1 => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP',
),
'Watson\\Rememberable\\' =>
@@ -207,7 +207,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'TorMorten\\Eventy\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/TorMorten/Eventy',
0 => __DIR__ . '/../..' . '/overrides/tormjens/eventy/src',
1 => __DIR__ . '/..' . '/tormjens/eventy/src',
),
'TijsVerkoyen\\CssToInlineStyles\\' =>
@@ -228,7 +228,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Symfony\\Component\\VarDumper\\Cloner\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/var-dumper/Cloner',
0 => __DIR__ . '/../..' . '/overrides/symfony/var-dumper/Cloner',
),
'Symfony\\Component\\VarDumper\\' =>
array (
@@ -240,17 +240,17 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Symfony\\Component\\Routing\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/routing',
0 => __DIR__ . '/../..' . '/overrides/symfony/routing',
1 => __DIR__ . '/..' . '/symfony/routing',
),
'Symfony\\Component\\Process\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/process',
0 => __DIR__ . '/../..' . '/overrides/symfony/process',
1 => __DIR__ . '/..' . '/symfony/process',
),
'Symfony\\Component\\HttpKernel\\Exception\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/http-kernel/Exception',
0 => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception',
),
'Symfony\\Component\\HttpKernel\\' =>
array (
@@ -258,16 +258,16 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Symfony\\Component\\HttpFoundation\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation',
0 => __DIR__ . '/../..' . '/overrides/symfony/http-foundation',
1 => __DIR__ . '/..' . '/symfony/http-foundation',
),
'Symfony\\Component\\Finder\\Iterator\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator',
0 => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator',
),
'Symfony\\Component\\Finder\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/finder',
0 => __DIR__ . '/../..' . '/overrides/symfony/finder',
1 => __DIR__ . '/..' . '/symfony/finder',
),
'Symfony\\Component\\EventDispatcher\\' =>
@@ -276,7 +276,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Symfony\\Component\\Debug\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Symfony/Component/Debug',
0 => __DIR__ . '/../..' . '/overrides/symfony/debug',
1 => __DIR__ . '/..' . '/symfony/debug',
),
'Symfony\\Component\\CssSelector\\' =>
@@ -285,11 +285,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Symfony\\Component\\Console\\Helper\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/console/Helper',
0 => __DIR__ . '/../..' . '/overrides/symfony/console/Helper',
),
'Symfony\\Component\\Console\\Descriptor\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/symfony/console/Descriptor',
0 => __DIR__ . '/../..' . '/overrides/symfony/console/Descriptor',
),
'Symfony\\Component\\Console\\' =>
array (
@@ -297,7 +297,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Spatie\\String\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/spatie/string/src',
0 => __DIR__ . '/../..' . '/overrides/spatie/string/src',
1 => __DIR__ . '/..' . '/spatie/string/src',
),
'Spatie\\Activitylog\\' =>
@@ -306,28 +306,28 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Rap2hpoutre\\LaravelLogViewer\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer',
0 => __DIR__ . '/../..' . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer',
),
'Ramsey\\Uuid\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/ramsey/uuid/src',
0 => __DIR__ . '/../..' . '/overrides/ramsey/uuid/src',
1 => __DIR__ . '/..' . '/ramsey/uuid/src',
),
'RachidLaasri\\LaravelInstaller\\Providers\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Providers',
0 => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Providers',
),
'RachidLaasri\\LaravelInstaller\\Middleware\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Middleware',
0 => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Middleware',
),
'RachidLaasri\\LaravelInstaller\\Helpers\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers',
0 => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers',
),
'RachidLaasri\\LaravelInstaller\\Controllers\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Controllers',
0 => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Controllers',
),
'RachidLaasri\\LaravelInstaller\\' =>
array (
@@ -363,7 +363,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Nwidart\\Modules\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Nwidart/Modules',
0 => __DIR__ . '/../..' . '/overrides/nwidart/laravel-modules/src',
1 => __DIR__ . '/..' . '/nwidart/laravel-modules/src',
),
'Monolog\\' =>
@@ -380,7 +380,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Lord\\Laroute\\Routes\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Lord/Laroute/Routes',
0 => __DIR__ . '/../..' . '/overrides/lord/laroute/src/Routes',
),
'Lord\\Laroute\\' =>
array (
@@ -408,63 +408,63 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Illuminate\\View\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/View',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View',
),
'Illuminate\\Validation\\Concerns\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Validation/Concerns',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns',
),
'Illuminate\\Support\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support',
),
'Illuminate\\Session\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Session',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Session',
),
'Illuminate\\Routing\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Routing',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing',
),
'Illuminate\\Pagination\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Pagination',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination',
),
'Illuminate\\Mail\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Mail',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Mail',
),
'Illuminate\\Http\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Http',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http',
),
'Illuminate\\Foundation\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Foundation',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation',
),
'Illuminate\\Database\\Eloquent\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Database/Eloquent',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent',
),
'Illuminate\\Container\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Container',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Container',
),
'Illuminate\\Cache\\Console\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Cache/Console',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cache/Console',
),
'Illuminate\\Cache\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Cache',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cache',
),
'Illuminate\\Broadcasting\\Broadcasters\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Broadcasting/Broadcasters',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters',
),
'Illuminate\\Auth\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Illuminate/Auth',
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth',
),
'Illuminate\\' =>
array (
@@ -485,11 +485,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'GuzzleHttp\\Cookie\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/guzzlehttp/guzzle/src/Cookie',
0 => __DIR__ . '/../..' . '/overrides/guzzlehttp/guzzle/src/Cookie',
),
'GuzzleHttp\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/guzzlehttp/guzzle/src',
0 => __DIR__ . '/../..' . '/overrides/guzzlehttp/guzzle/src',
1 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
),
'Fideloper\\Proxy\\' =>
@@ -502,12 +502,12 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Dotenv\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/vlucas/phpdotenv/src',
0 => __DIR__ . '/../..' . '/overrides/vlucas/phpdotenv/src',
1 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
),
'Doctrine\\DBAL\\Driver\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver',
0 => __DIR__ . '/../..' . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver',
),
'Doctrine\\DBAL\\' =>
array (
@@ -527,7 +527,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Devfactory\\Minify\\Providers\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/devfactory/minify/src/Providers',
0 => __DIR__ . '/../..' . '/overrides/devfactory/minify/src/Providers',
),
'Devfactory\\Minify\\' =>
array (
@@ -535,7 +535,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'DebugBar\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/maximebf/debugbar/src/DebugBar',
0 => __DIR__ . '/../..' . '/overrides/maximebf/debugbar/src/DebugBar',
),
'Cron\\' =>
array (
@@ -543,7 +543,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Codedge\\Updater\\SourceRepositoryTypes\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Codedge/Updater/SourceRepositoryTypes',
0 => __DIR__ . '/../..' . '/overrides/codedge/laravel-selfupdater/src/SourceRepositoryTypes',
),
'Codedge\\Updater\\' =>
array (
@@ -551,7 +551,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Chumper\\Zipper\\Repositories\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Chumper/Zipper/Repositories',
0 => __DIR__ . '/../..' . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories',
),
'Chumper\\Zipper\\' =>
array (
@@ -559,24 +559,24 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
),
'Carbon\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/nesbot/carbon/src/Carbon',
0 => __DIR__ . '/../..' . '/overrides/nesbot/carbon/src/Carbon',
),
'Barryvdh\\TranslationManager\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Barryvdh/TranslationManager',
0 => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-translation-manager/src',
1 => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src',
),
'Barryvdh\\Debugbar\\DataFormatter\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/barryvdh/laravel-debugbar/src/DataFormatter',
0 => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-debugbar/src/DataFormatter',
),
'Barryvdh\\Debugbar\\' =>
array (
0 => __DIR__ . '/../..' . '/compat/barryvdh/laravel-debugbar/src',
0 => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-debugbar/src',
),
'Axn\\Laroute\\Routes\\' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Axn/Laroute/Routes',
0 => __DIR__ . '/../..' . '/overrides/axn/laravel-laroute/src/Routes',
),
'Axn\\Laroute\\' =>
array (
@@ -597,7 +597,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
array (
'Swift_' =>
array (
0 => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes',
0 => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes',
),
),
'R' =>
@@ -625,7 +625,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
array (
'HTMLPurifier_' =>
array (
0 => __DIR__ . '/../..' . '/overrides/HTMLPurifier',
0 => __DIR__ . '/../..' . '/overrides/ezyang/htmlpurifier/library',
),
'HTMLPurifier' =>
array (
@@ -782,23 +782,23 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'Axn\\Laroute\\Routes\\Collection' => __DIR__ . '/../..' . '/overrides/Axn/Laroute/Routes/Collection.php',
'Axn\\Laroute\\Routes\\Collection' => __DIR__ . '/../..' . '/overrides/axn/laravel-laroute/src/Routes/Collection.php',
'Axn\\Laroute\\ServiceProvider' => __DIR__ . '/..' . '/axn/laravel-laroute/src/ServiceProvider.php',
'Barryvdh\\Debugbar\\DataFormatter\\QueryFormatter' => __DIR__ . '/../..' . '/compat/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php',
'Barryvdh\\Debugbar\\JavascriptRenderer' => __DIR__ . '/../..' . '/compat/barryvdh/laravel-debugbar/src/JavascriptRenderer.php',
'Barryvdh\\Debugbar\\DataFormatter\\QueryFormatter' => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-debugbar/src/DataFormatter/QueryFormatter.php',
'Barryvdh\\Debugbar\\JavascriptRenderer' => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-debugbar/src/JavascriptRenderer.php',
'Barryvdh\\TranslationManager\\Console\\CleanCommand' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Console/CleanCommand.php',
'Barryvdh\\TranslationManager\\Console\\ExportCommand' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Console/ExportCommand.php',
'Barryvdh\\TranslationManager\\Console\\FindCommand' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Console/FindCommand.php',
'Barryvdh\\TranslationManager\\Console\\ImportCommand' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Console/ImportCommand.php',
'Barryvdh\\TranslationManager\\Console\\ResetCommand' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Console/ResetCommand.php',
'Barryvdh\\TranslationManager\\Controller' => __DIR__ . '/../..' . '/overrides/Barryvdh/TranslationManager/Controller.php',
'Barryvdh\\TranslationManager\\Controller' => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-translation-manager/src/Controller.php',
'Barryvdh\\TranslationManager\\Events\\TranslationsExportedEvent' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Events/TranslationsExportedEvent.php',
'Barryvdh\\TranslationManager\\Manager' => __DIR__ . '/../..' . '/overrides/Barryvdh/TranslationManager/Manager.php',
'Barryvdh\\TranslationManager\\Manager' => __DIR__ . '/../..' . '/overrides/barryvdh/laravel-translation-manager/src/Manager.php',
'Barryvdh\\TranslationManager\\ManagerServiceProvider' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/ManagerServiceProvider.php',
'Barryvdh\\TranslationManager\\Models\\Translation' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Models/Translation.php',
'Barryvdh\\TranslationManager\\TranslationServiceProvider' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/TranslationServiceProvider.php',
'Barryvdh\\TranslationManager\\Translator' => __DIR__ . '/..' . '/barryvdh/laravel-translation-manager/src/Translator.php',
'Carbon\\Carbon' => __DIR__ . '/../..' . '/compat/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\Carbon' => __DIR__ . '/../..' . '/overrides/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\CarbonPeriod' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonPeriod.php',
'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
@@ -806,7 +806,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php',
'Chumper\\Zipper\\Facades\\Zipper' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/Facades/Zipper.php',
'Chumper\\Zipper\\Repositories\\RepositoryInterface' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/Repositories/RepositoryInterface.php',
'Chumper\\Zipper\\Repositories\\ZipRepository' => __DIR__ . '/../..' . '/overrides/Chumper/Zipper/Repositories/ZipRepository.php',
'Chumper\\Zipper\\Repositories\\ZipRepository' => __DIR__ . '/../..' . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories/ZipRepository.php',
'Chumper\\Zipper\\Zipper' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/Zipper.php',
'Chumper\\Zipper\\ZipperServiceProvider' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/ZipperServiceProvider.php',
'Codedge\\Updater\\AbstractRepositoryType' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/AbstractRepositoryType.php',
@@ -820,7 +820,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Codedge\\Updater\\Listeners\\SendUpdateAvailableNotification' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/Listeners/SendUpdateAvailableNotification.php',
'Codedge\\Updater\\Listeners\\SendUpdateSucceededNotification' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/Listeners/SendUpdateSucceededNotification.php',
'Codedge\\Updater\\SourceRepository' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/SourceRepository.php',
'Codedge\\Updater\\SourceRepositoryTypes\\GithubRepositoryType' => __DIR__ . '/../..' . '/overrides/Codedge/Updater/SourceRepositoryTypes/GithubRepositoryType.php',
'Codedge\\Updater\\SourceRepositoryTypes\\GithubRepositoryType' => __DIR__ . '/../..' . '/overrides/codedge/laravel-selfupdater/src/SourceRepositoryTypes/GithubRepositoryType.php',
'Codedge\\Updater\\UpdaterFacade' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/UpdaterFacade.php',
'Codedge\\Updater\\UpdaterManager' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/UpdaterManager.php',
'Codedge\\Updater\\UpdaterServiceProvider' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/UpdaterServiceProvider.php',
@@ -895,7 +895,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'CssWhitesmithsFormatter' => __DIR__ . '/..' . '/natxet/cssmin/src/CssMin.php',
'CustomersTableSeeder' => __DIR__ . '/../..' . '/database/seeds/CustomersTableSeeder.php',
'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php',
'DebugBar\\DebugBar' => __DIR__ . '/../..' . '/compat/maximebf/debugbar/src/DebugBar/DebugBar.php',
'DebugBar\\DebugBar' => __DIR__ . '/../..' . '/overrides/maximebf/debugbar/src/DebugBar/DebugBar.php',
'Devfactory\\Minify\\Contracts\\MinifyInterface' => __DIR__ . '/..' . '/devfactory/minify/src/Contracts/MinifyInterface.php',
'Devfactory\\Minify\\Exceptions\\CannotRemoveFileException' => __DIR__ . '/..' . '/devfactory/minify/src/Exceptions/CannotRemoveFileException.php',
'Devfactory\\Minify\\Exceptions\\CannotSaveFileException' => __DIR__ . '/..' . '/devfactory/minify/src/Exceptions/CannotSaveFileException.php',
@@ -906,7 +906,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Devfactory\\Minify\\Facades\\MinifyFacade' => __DIR__ . '/..' . '/devfactory/minify/src/Facades/MinifyFacade.php',
'Devfactory\\Minify\\Minify' => __DIR__ . '/..' . '/devfactory/minify/src/Minify.php',
'Devfactory\\Minify\\MinifyServiceProvider' => __DIR__ . '/..' . '/devfactory/minify/src/MinifyServiceProvider.php',
'Devfactory\\Minify\\Providers\\BaseProvider' => __DIR__ . '/../..' . '/compat/devfactory/minify/src/Providers/BaseProvider.php',
'Devfactory\\Minify\\Providers\\BaseProvider' => __DIR__ . '/../..' . '/overrides/devfactory/minify/src/Providers/BaseProvider.php',
'Devfactory\\Minify\\Providers\\JavaScript' => __DIR__ . '/..' . '/devfactory/minify/src/Providers/JavaScript.php',
'Devfactory\\Minify\\Providers\\StyleSheet' => __DIR__ . '/..' . '/devfactory/minify/src/Providers/StyleSheet.php',
'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
@@ -1009,19 +1009,19 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php',
'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Statement.php',
'Doctrine\\DBAL\\Driver\\PDOConnection' => __DIR__ . '/../..' . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php',
'Doctrine\\DBAL\\Driver\\PDOConnection' => __DIR__ . '/../..' . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php',
'Doctrine\\DBAL\\Driver\\PDOException' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOException.php',
'Doctrine\\DBAL\\Driver\\PDOIbm\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOOracle\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOQueryImplementation' => __DIR__ . '/../..' . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php',
'Doctrine\\DBAL\\Driver\\PDOQueryImplementation' => __DIR__ . '/../..' . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php',
'Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php',
'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Statement.php',
'Doctrine\\DBAL\\Driver\\PDOStatement' => __DIR__ . '/../..' . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php',
'Doctrine\\DBAL\\Driver\\PDOStatementImplementations' => __DIR__ . '/../..' . '/compat/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php',
'Doctrine\\DBAL\\Driver\\PDOStatement' => __DIR__ . '/../..' . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php',
'Doctrine\\DBAL\\Driver\\PDOStatementImplementations' => __DIR__ . '/../..' . '/overrides/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatementImplementations.php',
'Doctrine\\DBAL\\Driver\\PDO\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Connection.php',
'Doctrine\\DBAL\\Driver\\PDO\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php',
'Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/MySQL/Driver.php',
@@ -1253,7 +1253,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Dotenv\\Exception\\InvalidFileException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php',
'Dotenv\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php',
'Dotenv\\Exception\\ValidationException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ValidationException.php',
'Dotenv\\Loader' => __DIR__ . '/../..' . '/compat/vlucas/phpdotenv/src/Loader.php',
'Dotenv\\Loader' => __DIR__ . '/../..' . '/overrides/vlucas/phpdotenv/src/Loader.php',
'Dotenv\\Validator' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Validator.php',
'Egulias\\EmailValidator\\EmailLexer' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailLexer.php',
'Egulias\\EmailValidator\\EmailParser' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailParser.php',
@@ -1321,9 +1321,9 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',
'Fideloper\\Proxy\\TrustProxies' => __DIR__ . '/..' . '/fideloper/proxy/src/TrustProxies.php',
'Fideloper\\Proxy\\TrustedProxyServiceProvider' => __DIR__ . '/..' . '/fideloper/proxy/src/TrustedProxyServiceProvider.php',
'GuzzleHttp\\Client' => __DIR__ . '/../..' . '/compat/guzzlehttp/guzzle/src/Client.php',
'GuzzleHttp\\Client' => __DIR__ . '/../..' . '/overrides/guzzlehttp/guzzle/src/Client.php',
'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php',
'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/../..' . '/compat/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/../..' . '/overrides/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
@@ -1436,7 +1436,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'HTMLPurifier_AttrDef_URI' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php',
'HTMLPurifier_AttrDef_URI_Email' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php',
'HTMLPurifier_AttrDef_URI_Email_SimpleCheck' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php',
'HTMLPurifier_AttrDef_URI_Host' => __DIR__ . '/../..' . '/overrides/HTMLPurifier/HTMLPurifier/AttrDef/URI/Host.php',
'HTMLPurifier_AttrDef_URI_Host' => __DIR__ . '/../..' . '/overrides/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php',
'HTMLPurifier_AttrDef_URI_IPv4' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php',
'HTMLPurifier_AttrDef_URI_IPv6' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php',
'HTMLPurifier_AttrTransform' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php',
@@ -1623,20 +1623,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'HTMLPurifier_VarParser_Flexible' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php',
'HTMLPurifier_VarParser_Native' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Html2Text\\BasicTest' => __DIR__ . '/..' . '/html2text/html2text/test/BasicTest.php',
'Html2Text\\BlockquoteTest' => __DIR__ . '/..' . '/html2text/html2text/test/BlockquoteTest.php',
'Html2Text\\ConstructorTest' => __DIR__ . '/..' . '/html2text/html2text/test/ConstructorTest.php',
'Html2Text\\DefinitionListTest' => __DIR__ . '/..' . '/html2text/html2text/test/DefinitionListTest.php',
'Html2Text\\Html2Text' => __DIR__ . '/..' . '/html2text/html2text/src/Html2Text.php',
'Html2Text\\HtmlCharsTest' => __DIR__ . '/..' . '/html2text/html2text/test/HtmlCharsTest.php',
'Html2Text\\ImageTest' => __DIR__ . '/..' . '/html2text/html2text/test/ImageTest.php',
'Html2Text\\LinkTest' => __DIR__ . '/..' . '/html2text/html2text/test/LinkTest.php',
'Html2Text\\ListTest' => __DIR__ . '/..' . '/html2text/html2text/test/ListTest.php',
'Html2Text\\PreTest' => __DIR__ . '/..' . '/html2text/html2text/test/PreTest.php',
'Html2Text\\PrintTest' => __DIR__ . '/..' . '/html2text/html2text/test/PrintTest.php',
'Html2Text\\SearchReplaceTest' => __DIR__ . '/..' . '/html2text/html2text/test/SearchReplaceTest.php',
'Html2Text\\SpanTest' => __DIR__ . '/..' . '/html2text/html2text/test/SpanTest.php',
'Html2Text\\TableTest' => __DIR__ . '/..' . '/html2text/html2text/test/TableTest.php',
'Illuminate\\Auth\\Access\\AuthorizationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php',
'Illuminate\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php',
'Illuminate\\Auth\\Access\\HandlesAuthorization' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php',
@@ -1658,7 +1645,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Auth\\Events\\Logout' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Logout.php',
'Illuminate\\Auth\\Events\\PasswordReset' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/PasswordReset.php',
'Illuminate\\Auth\\Events\\Registered' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Registered.php',
'Illuminate\\Auth\\Events\\Validated' => __DIR__ . '/../..' . '/overrides/Illuminate/Auth/Events/Validated.php',
'Illuminate\\Auth\\Events\\Validated' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth/Events/Validated.php',
'Illuminate\\Auth\\GenericUser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/GenericUser.php',
'Illuminate\\Auth\\GuardHelpers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/GuardHelpers.php',
'Illuminate\\Auth\\Middleware\\Authenticate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php',
@@ -1673,14 +1660,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Auth\\Passwords\\TokenRepositoryInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php',
'Illuminate\\Auth\\Recaller' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Recaller.php',
'Illuminate\\Auth\\RequestGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/RequestGuard.php',
'Illuminate\\Auth\\SessionGuard' => __DIR__ . '/../..' . '/overrides/Illuminate/Auth/SessionGuard.php',
'Illuminate\\Auth\\SessionGuard' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth/SessionGuard.php',
'Illuminate\\Auth\\TokenGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/TokenGuard.php',
'Illuminate\\Broadcasting\\BroadcastController' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php',
'Illuminate\\Broadcasting\\BroadcastEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php',
'Illuminate\\Broadcasting\\BroadcastException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php',
'Illuminate\\Broadcasting\\BroadcastManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php',
'Illuminate\\Broadcasting\\BroadcastServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php',
'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => __DIR__ . '/../..' . '/overrides/Illuminate/Broadcasting/Broadcasters/Broadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\NullBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php',
'Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php',
@@ -1699,7 +1686,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Cache\\CacheManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/CacheManager.php',
'Illuminate\\Cache\\CacheServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php',
'Illuminate\\Cache\\Console\\CacheTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php',
'Illuminate\\Cache\\Console\\ClearCommand' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php',
'Illuminate\\Cache\\Console\\ClearCommand' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php',
'Illuminate\\Cache\\Console\\ForgetCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php',
'Illuminate\\Cache\\DatabaseStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/DatabaseStore.php',
'Illuminate\\Cache\\Events\\CacheEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php',
@@ -1717,7 +1704,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Cache\\RedisLock' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RedisLock.php',
'Illuminate\\Cache\\RedisStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RedisStore.php',
'Illuminate\\Cache\\RedisTaggedCache' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php',
'Illuminate\\Cache\\Repository' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Cache/Repository.php',
'Illuminate\\Cache\\Repository' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cache/Repository.php',
'Illuminate\\Cache\\RetrievesMultipleKeys' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php',
'Illuminate\\Cache\\TagSet' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TagSet.php',
'Illuminate\\Cache\\TaggableStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php',
@@ -1742,8 +1729,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Console\\Scheduling\\Schedule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php',
'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php',
'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php',
'Illuminate\\Container\\BoundMethod' => __DIR__ . '/../..' . '/overrides/Illuminate/Container/BoundMethod.php',
'Illuminate\\Container\\Container' => __DIR__ . '/../..' . '/overrides/Illuminate/Container/Container.php',
'Illuminate\\Container\\BoundMethod' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Container/BoundMethod.php',
'Illuminate\\Container\\Container' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Container/Container.php',
'Illuminate\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php',
'Illuminate\\Container\\EntryNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Container/EntryNotFoundException.php',
'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php',
@@ -1878,11 +1865,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php',
'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php',
'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php',
'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php',
'Illuminate\\Database\\Eloquent\\FactoryBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php',
'Illuminate\\Database\\Eloquent\\JsonEncodingException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php',
'Illuminate\\Database\\Eloquent\\MassAssignmentException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php',
'Illuminate\\Database\\Eloquent\\Model' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\Model' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Model.php',
'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php',
'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php',
'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php',
@@ -2040,8 +2027,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php',
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
'Illuminate\\Foundation\\Inspiring' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php',
'Illuminate\\Foundation\\PackageManifest' => __DIR__ . '/../..' . '/overrides/Illuminate/Foundation/PackageManifest.php',
'Illuminate\\Foundation\\ProviderRepository' => __DIR__ . '/../..' . '/overrides/Illuminate/Foundation/ProviderRepository.php',
'Illuminate\\Foundation\\PackageManifest' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/PackageManifest.php',
'Illuminate\\Foundation\\ProviderRepository' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php',
'Illuminate\\Foundation\\Providers\\ArtisanServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php',
'Illuminate\\Foundation\\Providers\\ComposerServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php',
'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php',
@@ -2085,7 +2072,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php',
'Illuminate\\Http\\Middleware\\FrameGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php',
'Illuminate\\Http\\RedirectResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php',
'Illuminate\\Http\\Request' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Http/Request.php',
'Illuminate\\Http\\Request' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http/Request.php',
'Illuminate\\Http\\Resources\\CollectsResources' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php',
'Illuminate\\Http\\Resources\\ConditionallyLoadsAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php',
'Illuminate\\Http\\Resources\\DelegatesToResource' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php',
@@ -2115,7 +2102,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Mail\\Message' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Message.php',
'Illuminate\\Mail\\PendingMail' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/PendingMail.php',
'Illuminate\\Mail\\SendQueuedMailable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php',
'Illuminate\\Mail\\TransportManager' => __DIR__ . '/../..' . '/overrides/Illuminate/Mail/TransportManager.php',
'Illuminate\\Mail\\TransportManager' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php',
'Illuminate\\Mail\\Transport\\ArrayTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php',
'Illuminate\\Mail\\Transport\\LogTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php',
'Illuminate\\Mail\\Transport\\MailgunTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php',
@@ -2153,10 +2140,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Notifications\\NotificationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php',
'Illuminate\\Notifications\\RoutesNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php',
'Illuminate\\Notifications\\SendQueuedNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php',
'Illuminate\\Pagination\\AbstractPaginator' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php',
'Illuminate\\Pagination\\LengthAwarePaginator' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php',
'Illuminate\\Pagination\\AbstractPaginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php',
'Illuminate\\Pagination\\LengthAwarePaginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php',
'Illuminate\\Pagination\\PaginationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php',
'Illuminate\\Pagination\\Paginator' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Pagination/Paginator.php',
'Illuminate\\Pagination\\Paginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/Paginator.php',
'Illuminate\\Pagination\\UrlWindow' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php',
'Illuminate\\Pipeline\\Hub' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Hub.php',
'Illuminate\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php',
@@ -2233,7 +2220,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Routing\\Console\\ControllerMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php',
'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php',
'Illuminate\\Routing\\Contracts\\ControllerDispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Contracts/ControllerDispatcher.php',
'Illuminate\\Routing\\Controller' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/Controller.php',
'Illuminate\\Routing\\Controller' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/Controller.php',
'Illuminate\\Routing\\ControllerDispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php',
'Illuminate\\Routing\\ControllerMiddlewareOptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php',
'Illuminate\\Routing\\Events\\RouteMatched' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php',
@@ -2257,18 +2244,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Routing\\Route' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Route.php',
'Illuminate\\Routing\\RouteAction' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteAction.php',
'Illuminate\\Routing\\RouteBinding' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteBinding.php',
'Illuminate\\Routing\\RouteCollection' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/RouteCollection.php',
'Illuminate\\Routing\\RouteCollection' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/RouteCollection.php',
'Illuminate\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteCompiler.php',
'Illuminate\\Routing\\RouteDependencyResolverTrait' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/RouteDependencyResolverTrait.php',
'Illuminate\\Routing\\RouteDependencyResolverTrait' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php',
'Illuminate\\Routing\\RouteGroup' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteGroup.php',
'Illuminate\\Routing\\RouteParameterBinder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php',
'Illuminate\\Routing\\RouteRegistrar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php',
'Illuminate\\Routing\\RouteSignatureParameters' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/RouteSignatureParameters.php',
'Illuminate\\Routing\\RouteSignatureParameters' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php',
'Illuminate\\Routing\\RouteUrlGenerator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php',
'Illuminate\\Routing\\Router' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/Router.php',
'Illuminate\\Routing\\Router' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/Router.php',
'Illuminate\\Routing\\RoutingServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php',
'Illuminate\\Routing\\SortedMiddleware' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php',
'Illuminate\\Routing\\UrlGenerator' => __DIR__ . '/../..' . '/overrides/Illuminate/Routing/UrlGenerator.php',
'Illuminate\\Routing\\UrlGenerator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing/UrlGenerator.php',
'Illuminate\\Routing\\ViewController' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ViewController.php',
'Illuminate\\Session\\CacheBasedSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php',
'Illuminate\\Session\\Console\\SessionTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php',
@@ -2276,7 +2263,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Session\\DatabaseSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php',
'Illuminate\\Session\\EncryptedStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/EncryptedStore.php',
'Illuminate\\Session\\ExistenceAwareInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php',
'Illuminate\\Session\\FileSessionHandler' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Session/FileSessionHandler.php',
'Illuminate\\Session\\FileSessionHandler' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Session/FileSessionHandler.php',
'Illuminate\\Session\\Middleware\\AuthenticateSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php',
'Illuminate\\Session\\Middleware\\StartSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php',
'Illuminate\\Session\\NullSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/NullSessionHandler.php',
@@ -2286,8 +2273,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Session\\TokenMismatchException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/TokenMismatchException.php',
'Illuminate\\Support\\AggregateServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php',
'Illuminate\\Support\\Arr' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Arr.php',
'Illuminate\\Support\\Carbon' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/Carbon.php',
'Illuminate\\Support\\Collection' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/Collection.php',
'Illuminate\\Support\\Carbon' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/Carbon.php',
'Illuminate\\Support\\Collection' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/Collection.php',
'Illuminate\\Support\\Composer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Composer.php',
'Illuminate\\Support\\Debug\\Dumper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Debug/Dumper.php',
'Illuminate\\Support\\Debug\\HtmlDumper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php',
@@ -2325,19 +2312,19 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Support\\Facades\\URL' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/URL.php',
'Illuminate\\Support\\Facades\\Validator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Validator.php',
'Illuminate\\Support\\Facades\\View' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/View.php',
'Illuminate\\Support\\Fluent' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/Fluent.php',
'Illuminate\\Support\\Fluent' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/Fluent.php',
'Illuminate\\Support\\HigherOrderCollectionProxy' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php',
'Illuminate\\Support\\HigherOrderTapProxy' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/HigherOrderTapProxy.php',
'Illuminate\\Support\\HtmlString' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/HtmlString.php',
'Illuminate\\Support\\InteractsWithTime' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/InteractsWithTime.php',
'Illuminate\\Support\\Manager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Manager.php',
'Illuminate\\Support\\MessageBag' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/MessageBag.php',
'Illuminate\\Support\\MessageBag' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/MessageBag.php',
'Illuminate\\Support\\NamespacedItemResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php',
'Illuminate\\Support\\Optional' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/Optional.php',
'Illuminate\\Support\\Optional' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/Optional.php',
'Illuminate\\Support\\Pluralizer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Pluralizer.php',
'Illuminate\\Support\\ProcessUtils' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/ProcessUtils.php',
'Illuminate\\Support\\ServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php',
'Illuminate\\Support\\Str' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/Str.php',
'Illuminate\\Support\\Str' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/Str.php',
'Illuminate\\Support\\Testing\\Fakes\\BusFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php',
'Illuminate\\Support\\Testing\\Fakes\\EventFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php',
'Illuminate\\Support\\Testing\\Fakes\\MailFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php',
@@ -2346,7 +2333,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php',
'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php',
'Illuminate\\Support\\Traits\\Macroable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Traits/Macroable.php',
'Illuminate\\Support\\ViewErrorBag' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/Support/ViewErrorBag.php',
'Illuminate\\Support\\ViewErrorBag' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support/ViewErrorBag.php',
'Illuminate\\Translation\\ArrayLoader' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/ArrayLoader.php',
'Illuminate\\Translation\\FileLoader' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/FileLoader.php',
'Illuminate\\Translation\\MessageSelector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/MessageSelector.php',
@@ -2355,7 +2342,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\Validation\\ClosureValidationRule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ClosureValidationRule.php',
'Illuminate\\Validation\\Concerns\\FormatsMessages' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php',
'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php',
'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => __DIR__ . '/../..' . '/overrides/Illuminate/Validation/Concerns/ValidatesAttributes.php',
'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php',
'Illuminate\\Validation\\DatabasePresenceVerifier' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php',
'Illuminate\\Validation\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Factory.php',
'Illuminate\\Validation\\PresenceVerifierInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php',
@@ -2403,7 +2390,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Illuminate\\View\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Factory.php',
'Illuminate\\View\\FileViewFinder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/FileViewFinder.php',
'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php',
'Illuminate\\View\\View' => __DIR__ . '/../..' . '/compat/laravel/framework/src/Illuminate/View/View.php',
'Illuminate\\View\\View' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/View.php',
'Illuminate\\View\\ViewFinderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php',
'Illuminate\\View\\ViewName' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewName.php',
'Illuminate\\View\\ViewServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php',
@@ -2471,7 +2458,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Lord\\Laroute\\Generators\\GeneratorInterface' => __DIR__ . '/..' . '/lord/laroute/src/Generators/GeneratorInterface.php',
'Lord\\Laroute\\Generators\\TemplateGenerator' => __DIR__ . '/..' . '/lord/laroute/src/Generators/TemplateGenerator.php',
'Lord\\Laroute\\LarouteServiceProvider' => __DIR__ . '/..' . '/lord/laroute/src/LarouteServiceProvider.php',
'Lord\\Laroute\\Routes\\Collection' => __DIR__ . '/../..' . '/overrides/Lord/Laroute/Routes/Collection.php',
'Lord\\Laroute\\Routes\\Collection' => __DIR__ . '/../..' . '/overrides/lord/laroute/src/Routes/Collection.php',
'Lord\\Laroute\\Routes\\Exceptions\\ZeroRoutesException' => __DIR__ . '/..' . '/lord/laroute/src/Routes/Exceptions/ZeroRoutesException.php',
'MailboxesTableSeeder' => __DIR__ . '/../..' . '/database/seeds/MailboxesTableSeeder.php',
'Mews\\Purifier\\Facades\\Purifier' => __DIR__ . '/..' . '/mews/purifier/src/Facades/Purifier.php',
@@ -2630,7 +2617,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Nwidart\\Modules\\Generators\\FileGenerator' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Generators/FileGenerator.php',
'Nwidart\\Modules\\Generators\\Generator' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Generators/Generator.php',
'Nwidart\\Modules\\Generators\\ModuleGenerator' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Generators/ModuleGenerator.php',
'Nwidart\\Modules\\Json' => __DIR__ . '/../..' . '/overrides/Nwidart/Modules/Json.php',
'Nwidart\\Modules\\Json' => __DIR__ . '/../..' . '/overrides/nwidart/laravel-modules/src/Json.php',
'Nwidart\\Modules\\LaravelModulesServiceProvider' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/LaravelModulesServiceProvider.php',
'Nwidart\\Modules\\Laravel\\Module' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Laravel/Module.php',
'Nwidart\\Modules\\Laravel\\Repository' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Laravel/Repository.php',
@@ -2638,7 +2625,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Nwidart\\Modules\\Lumen\\Module' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Lumen/Module.php',
'Nwidart\\Modules\\Lumen\\Repository' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Lumen/Repository.php',
'Nwidart\\Modules\\Migrations\\Migrator' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Migrations/Migrator.php',
'Nwidart\\Modules\\Module' => __DIR__ . '/../..' . '/overrides/Nwidart/Modules/Module.php',
'Nwidart\\Modules\\Module' => __DIR__ . '/../..' . '/overrides/nwidart/laravel-modules/src/Module.php',
'Nwidart\\Modules\\ModulesServiceProvider' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/ModulesServiceProvider.php',
'Nwidart\\Modules\\Process\\Installer' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Process/Installer.php',
'Nwidart\\Modules\\Process\\Runner' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Process/Runner.php',
@@ -2650,7 +2637,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Nwidart\\Modules\\Publishing\\LangPublisher' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Publishing/LangPublisher.php',
'Nwidart\\Modules\\Publishing\\MigrationPublisher' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Publishing/MigrationPublisher.php',
'Nwidart\\Modules\\Publishing\\Publisher' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Publishing/Publisher.php',
'Nwidart\\Modules\\Repository' => __DIR__ . '/../..' . '/overrides/Nwidart/Modules/Repository.php',
'Nwidart\\Modules\\Repository' => __DIR__ . '/../..' . '/overrides/nwidart/laravel-modules/src/Repository.php',
'Nwidart\\Modules\\Routing\\Controller' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Routing/Controller.php',
'Nwidart\\Modules\\Support\\Config\\GenerateConfigReader' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Support/Config/GenerateConfigReader.php',
'Nwidart\\Modules\\Support\\Config\\GeneratorPath' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Support/Config/GeneratorPath.php',
@@ -3048,24 +3035,24 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Psy\\VersionUpdater\\IntervalChecker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/IntervalChecker.php',
'Psy\\VersionUpdater\\NoopChecker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/NoopChecker.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\DatabaseController' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Controllers/DatabaseController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\EnvironmentController' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Controllers/EnvironmentController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\FinalController' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Controllers/FinalController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\EnvironmentController' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Controllers/EnvironmentController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\FinalController' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Controllers/FinalController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\PermissionsController' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Controllers/PermissionsController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\RequirementsController' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Controllers/RequirementsController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\UpdateController' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Controllers/UpdateController.php',
'RachidLaasri\\LaravelInstaller\\Controllers\\WelcomeController' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Controllers/WelcomeController.php',
'RachidLaasri\\LaravelInstaller\\Events\\EnvironmentSaved' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Events/EnvironmentSaved.php',
'RachidLaasri\\LaravelInstaller\\Events\\LaravelInstallerFinished' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Events/LaravelInstallerFinished.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\DatabaseManager' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/DatabaseManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\EnvironmentManager' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/EnvironmentManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\FinalInstallManager' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/FinalInstallManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\InstalledFileManager' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/InstalledFileManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\DatabaseManager' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/DatabaseManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\EnvironmentManager' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/EnvironmentManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\FinalInstallManager' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/FinalInstallManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\InstalledFileManager' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/InstalledFileManager.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\MigrationsHelper' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Helpers/MigrationsHelper.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\PermissionsChecker' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/PermissionsChecker.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\RequirementsChecker' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Helpers/RequirementsChecker.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canInstall' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Middleware/canInstall.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\PermissionsChecker' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/PermissionsChecker.php',
'RachidLaasri\\LaravelInstaller\\Helpers\\RequirementsChecker' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Helpers/RequirementsChecker.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canInstall' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Middleware/canInstall.php',
'RachidLaasri\\LaravelInstaller\\Middleware\\canUpdate' => __DIR__ . '/..' . '/rachidlaasri/laravel-installer/src/Middleware/canUpdate.php',
'RachidLaasri\\LaravelInstaller\\Providers\\LaravelInstallerServiceProvider' => __DIR__ . '/../..' . '/overrides/RachidLaasri/LaravelInstaller/Providers/LaravelInstallerServiceProvider.php',
'RachidLaasri\\LaravelInstaller\\Providers\\LaravelInstallerServiceProvider' => __DIR__ . '/../..' . '/overrides/rachidlaasri/laravel-installer/src/Providers/LaravelInstallerServiceProvider.php',
'Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php',
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
@@ -3108,12 +3095,12 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Ramsey\\Uuid\\Provider\\TimeProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/TimeProviderInterface.php',
'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php',
'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php',
'Ramsey\\Uuid\\Uuid' => __DIR__ . '/../..' . '/compat/ramsey/uuid/src/Uuid.php',
'Ramsey\\Uuid\\Uuid' => __DIR__ . '/../..' . '/overrides/ramsey/uuid/src/Uuid.php',
'Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactory.php',
'Ramsey\\Uuid\\UuidFactoryInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactoryInterface.php',
'Ramsey\\Uuid\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidInterface.php',
'Rap2hpoutre\\LaravelLogViewer\\BaseController' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => __DIR__ . '/../..' . '/compat/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => __DIR__ . '/../..' . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php',
'Rap2hpoutre\\LaravelLogViewer\\Level' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Level.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
@@ -3134,13 +3121,13 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Spatie\\String\\Exceptions\\UnknownFunctionException' => __DIR__ . '/..' . '/spatie/string/src/Exceptions/UnknownFunctionException.php',
'Spatie\\String\\Exceptions\\UnsetOffsetException' => __DIR__ . '/..' . '/spatie/string/src/Exceptions/UnsetOffsetException.php',
'Spatie\\String\\Integrations\\Underscore' => __DIR__ . '/..' . '/spatie/string/src/Integrations/Underscore.php',
'Spatie\\String\\Str' => __DIR__ . '/../..' . '/compat/spatie/string/src/Str.php',
'Swift_MailTransport' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/MailTransport.php',
'Swift_Transport_EsmtpTransport' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php',
'Swift_Transport_Esmtp_AuthHandler' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php',
'Swift_Transport_MailInvoker' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/Transport/MailInvoker.php',
'Swift_Transport_MailTransport' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/Transport/MailTransport.php',
'Swift_Transport_SimpleMailInvoker' => __DIR__ . '/../..' . '/overrides/Swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php',
'Spatie\\String\\Str' => __DIR__ . '/../..' . '/overrides/spatie/string/src/Str.php',
'Swift_MailTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php',
'Swift_Transport_EsmtpTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php',
'Swift_Transport_Esmtp_AuthHandler' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php',
'Swift_Transport_MailInvoker' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php',
'Swift_Transport_MailTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php',
'Swift_Transport_SimpleMailInvoker' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php',
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
@@ -3156,7 +3143,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php',
'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/JsonDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/../..' . '/compat/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/../..' . '/overrides/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php',
'Symfony\\Component\\Console\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/console/EventListener/ErrorListener.php',
'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php',
@@ -3178,9 +3165,9 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php',
'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/../..' . '/compat/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php',
'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/../..' . '/compat/symfony/console/Helper/HelperSet.php',
'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/HelperSet.php',
'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php',
'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php',
'Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php',
@@ -3270,7 +3257,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Debug\\Debug' => __DIR__ . '/..' . '/symfony/debug/Debug.php',
'Symfony\\Component\\Debug\\DebugClassLoader' => __DIR__ . '/..' . '/symfony/debug/DebugClassLoader.php',
'Symfony\\Component\\Debug\\ErrorHandler' => __DIR__ . '/..' . '/symfony/debug/ErrorHandler.php',
'Symfony\\Component\\Debug\\ExceptionHandler' => __DIR__ . '/../..' . '/overrides/Symfony/Component/Debug/ExceptionHandler.php',
'Symfony\\Component\\Debug\\ExceptionHandler' => __DIR__ . '/../..' . '/overrides/symfony/debug/ExceptionHandler.php',
'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/debug/Exception/ClassNotFoundException.php',
'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/ContextErrorException.php',
'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalErrorException.php',
@@ -3300,23 +3287,23 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php',
'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php',
'Symfony\\Component\\Finder\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/finder/Exception/ExceptionInterface.php',
'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/../..' . '/compat/symfony/finder/Finder.php',
'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/../..' . '/overrides/symfony/finder/Finder.php',
'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php',
'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/DateRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/DepthRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/FileTypeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/DateRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/DepthRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/FileTypeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/FilenameFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/FilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/FilenameFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/FilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/PathFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/PathFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/../..' . '/compat/symfony/finder/Iterator/SortableIterator.php',
'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/../..' . '/overrides/symfony/finder/Iterator/SortableIterator.php',
'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/AcceptHeader.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/AcceptHeader.php',
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php',
'Symfony\\Component\\HttpFoundation\\ApacheRequest' => __DIR__ . '/..' . '/symfony/http-foundation/ApacheRequest.php',
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php',
@@ -3325,7 +3312,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/RequestExceptionInterface.php',
'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SuspiciousOperationException.php',
'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/ExpressionRequestMatcher.php',
'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/FileBag.php',
'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/FileBag.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/AccessDeniedException.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileException.php',
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileNotFoundException.php',
@@ -3341,17 +3328,17 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php',
'Symfony\\Component\\HttpFoundation\\File\\Stream' => __DIR__ . '/..' . '/symfony/http-foundation/File/Stream.php',
'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => __DIR__ . '/..' . '/symfony/http-foundation/File/UploadedFile.php',
'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/HeaderBag.php',
'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/HeaderBag.php',
'Symfony\\Component\\HttpFoundation\\IpUtils' => __DIR__ . '/..' . '/symfony/http-foundation/IpUtils.php',
'Symfony\\Component\\HttpFoundation\\JsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/JsonResponse.php',
'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/ParameterBag.php',
'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/ParameterBag.php',
'Symfony\\Component\\HttpFoundation\\RedirectResponse' => __DIR__ . '/..' . '/symfony/http-foundation/RedirectResponse.php',
'Symfony\\Component\\HttpFoundation\\Request' => __DIR__ . '/..' . '/symfony/http-foundation/Request.php',
'Symfony\\Component\\HttpFoundation\\RequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcher.php',
'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcherInterface.php',
'Symfony\\Component\\HttpFoundation\\RequestStack' => __DIR__ . '/..' . '/symfony/http-foundation/RequestStack.php',
'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/Response.php',
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/../..' . '/overrides/Symfony/Component/HttpFoundation/ResponseHeaderBag.php',
'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/Response.php',
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/ResponseHeaderBag.php',
'Symfony\\Component\\HttpFoundation\\ServerBag' => __DIR__ . '/..' . '/symfony/http-foundation/ServerBag.php',
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBag.php',
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php',
@@ -3473,7 +3460,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/GoneHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/../..' . '/compat/symfony/http-kernel/Exception/HttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/HttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpExceptionInterface.php',
'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php',
'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php',
@@ -3532,11 +3519,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Process\\Pipes\\PipesInterface' => __DIR__ . '/..' . '/symfony/process/Pipes/PipesInterface.php',
'Symfony\\Component\\Process\\Pipes\\UnixPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/UnixPipes.php',
'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/WindowsPipes.php',
'Symfony\\Component\\Process\\Process' => __DIR__ . '/../..' . '/compat/symfony/process/Process.php',
'Symfony\\Component\\Process\\Process' => __DIR__ . '/../..' . '/overrides/symfony/process/Process.php',
'Symfony\\Component\\Process\\ProcessBuilder' => __DIR__ . '/..' . '/symfony/process/ProcessBuilder.php',
'Symfony\\Component\\Process\\ProcessUtils' => __DIR__ . '/..' . '/symfony/process/ProcessUtils.php',
'Symfony\\Component\\Routing\\Annotation\\Route' => __DIR__ . '/..' . '/symfony/routing/Annotation/Route.php',
'Symfony\\Component\\Routing\\CompiledRoute' => __DIR__ . '/../..' . '/compat/symfony/routing/CompiledRoute.php',
'Symfony\\Component\\Routing\\CompiledRoute' => __DIR__ . '/../..' . '/overrides/symfony/routing/CompiledRoute.php',
'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => __DIR__ . '/..' . '/symfony/routing/DependencyInjection/RoutingResolverPass.php',
'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/routing/Exception/ExceptionInterface.php',
'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidParameterException.php',
@@ -3582,7 +3569,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcherInterface.php',
'Symfony\\Component\\Routing\\RequestContext' => __DIR__ . '/..' . '/symfony/routing/RequestContext.php',
'Symfony\\Component\\Routing\\RequestContextAwareInterface' => __DIR__ . '/..' . '/symfony/routing/RequestContextAwareInterface.php',
'Symfony\\Component\\Routing\\Route' => __DIR__ . '/../..' . '/compat/symfony/routing/Route.php',
'Symfony\\Component\\Routing\\Route' => __DIR__ . '/../..' . '/overrides/symfony/routing/Route.php',
'Symfony\\Component\\Routing\\RouteCollection' => __DIR__ . '/..' . '/symfony/routing/RouteCollection.php',
'Symfony\\Component\\Routing\\RouteCollectionBuilder' => __DIR__ . '/..' . '/symfony/routing/RouteCollectionBuilder.php',
'Symfony\\Component\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/symfony/routing/RouteCompiler.php',
@@ -3684,9 +3671,9 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php',
'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php',
'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php',
'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/../..' . '/compat/symfony/var-dumper/Cloner/Data.php',
'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/../..' . '/overrides/symfony/var-dumper/Cloner/Data.php',
'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php',
'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/../..' . '/compat/symfony/var-dumper/Cloner/Stub.php',
'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/../..' . '/overrides/symfony/var-dumper/Cloner/Stub.php',
'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php',
'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php',
'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php',
@@ -3704,20 +3691,16 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
'TorMorten\\Eventy\\Action' => __DIR__ . '/../..' . '/overrides/TorMorten/Eventy/Action.php',
'TorMorten\\Eventy\\Action' => __DIR__ . '/../..' . '/overrides/tormjens/eventy/src/Action.php',
'TorMorten\\Eventy\\Event' => __DIR__ . '/..' . '/tormjens/eventy/src/Event.php',
'TorMorten\\Eventy\\EventBladeServiceProvider' => __DIR__ . '/..' . '/tormjens/eventy/src/EventBladeServiceProvider.php',
'TorMorten\\Eventy\\EventServiceProvider' => __DIR__ . '/..' . '/tormjens/eventy/src/EventServiceProvider.php',
'TorMorten\\Eventy\\Events' => __DIR__ . '/..' . '/tormjens/eventy/src/Events.php',
'TorMorten\\Eventy\\Facades\\Events' => __DIR__ . '/..' . '/tormjens/eventy/src/Facades/Events.php',
'TorMorten\\Eventy\\Filter' => __DIR__ . '/../..' . '/overrides/TorMorten/Eventy/Filter.php',
'TorMorten\\Eventy\\Filter' => __DIR__ . '/../..' . '/overrides/tormjens/eventy/src/Filter.php',
'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
'Underscore\\Dispatch' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Dispatch.php',
'Underscore\\DispatchTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/DispatchTest.php',
'Underscore\\Dummies\\DummyClass' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Dummies/DummyClass.php',
'Underscore\\Dummies\\DummyDefault' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Dummies/DummyDefault.php',
'Underscore\\Method' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Method.php',
'Underscore\\MethodTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/MethodTest.php',
'Underscore\\Methods\\ArraysMethods' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Methods/ArraysMethods.php',
'Underscore\\Methods\\CollectionMethods' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Methods/CollectionMethods.php',
'Underscore\\Methods\\FunctionsMethods' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Methods/FunctionsMethods.php',
@@ -3725,26 +3708,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Underscore\\Methods\\ObjectMethods' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Methods/ObjectMethods.php',
'Underscore\\Methods\\StringsMethods' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Methods/StringsMethods.php',
'Underscore\\Parse' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Parse.php',
'Underscore\\ParseTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/ParseTest.php',
'Underscore\\Traits\\Repository' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Traits/Repository.php',
'Underscore\\Types\\Arrays' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Types/Arrays.php',
'Underscore\\Types\\ArraysTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Types/ArraysTest.php',
'Underscore\\Types\\Functions' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Types/Functions.php',
'Underscore\\Types\\FunctionsTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Types/FunctionsTest.php',
'Underscore\\Types\\Number' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Types/Number.php',
'Underscore\\Types\\NumberTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Types/NumberTest.php',
'Underscore\\Types\\Object' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Types/Object.php',
'Underscore\\Types\\ObjectTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Types/ObjectTest.php',
'Underscore\\Types\\StringTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/Types/StringTest.php',
'Underscore\\Types\\Strings' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Types/Strings.php',
'Underscore\\Underscore' => __DIR__ . '/..' . '/anahkiasen/underscore-php/src/Underscore.php',
'Underscore\\UnderscoreTest' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/UnderscoreTest.php',
'Underscore\\UnderscoreTestCase' => __DIR__ . '/..' . '/anahkiasen/underscore-php/tests/UnderscoreTestCase.php',
'UsersTableSeeder' => __DIR__ . '/../..' . '/database/seeds/UsersTableSeeder.php',
'Watson\\Rememberable\\Query\\Builder' => __DIR__ . '/..' . '/watson/rememberable/src/Query/Builder.php',
'Watson\\Rememberable\\Rememberable' => __DIR__ . '/..' . '/watson/rememberable/src/Rememberable.php',
'Webklex\\IMAP\\Attachment' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Attachment.php',
'Webklex\\IMAP\\Client' => __DIR__ . '/../..' . '/overrides/Webklex/IMAP/Client.php',
'Webklex\\IMAP\\Client' => __DIR__ . '/../..' . '/overrides/webklex/laravel-imap/src/IMAP/Client.php',
'Webklex\\IMAP\\ClientManager' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/ClientManager.php',
'Webklex\\IMAP\\EncodingAliases' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/EncodingAliases.php',
'Webklex\\IMAP\\Exceptions\\ConnectionFailedException' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Exceptions/ConnectionFailedException.php',
@@ -3754,7 +3729,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Webklex\\IMAP\\Exceptions\\MethodNotFoundException' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Exceptions/MethodNotFoundException.php',
'Webklex\\IMAP\\Facades\\Client' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Facades/Client.php',
'Webklex\\IMAP\\Folder' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Folder.php',
'Webklex\\IMAP\\Message' => __DIR__ . '/../..' . '/overrides/Webklex/IMAP/Message.php',
'Webklex\\IMAP\\Message' => __DIR__ . '/../..' . '/overrides/webklex/laravel-imap/src/IMAP/Message.php',
'Webklex\\IMAP\\Providers\\LaravelServiceProvider' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Providers/LaravelServiceProvider.php',
'Webklex\\IMAP\\Query\\Query' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Query/Query.php',
'Webklex\\IMAP\\Query\\WhereQuery' => __DIR__ . '/..' . '/webklex/laravel-imap/src/IMAP/Query/WhereQuery.php',

File diff suppressed because it is too large Load Diff

View File

@@ -1,360 +0,0 @@
<?php namespace Devfactory\Minify\Providers;
use Devfactory\Minify\Exceptions\CannotRemoveFileException;
use Devfactory\Minify\Exceptions\CannotSaveFileException;
use Devfactory\Minify\Exceptions\DirNotExistException;
use Devfactory\Minify\Exceptions\DirNotWritableException;
use Devfactory\Minify\Exceptions\FileNotExistException;
use Illuminate\Filesystem\Filesystem;
use Countable;
abstract class BaseProvider implements Countable
{
/**
* @var string
*/
protected $outputDir;
/**
* @var string
*/
protected $appended = '';
/**
* @var string
*/
protected $filename = '';
/**
* @var array
*/
protected $files = array();
/**
* @var array
*/
protected $headers = array();
/**
* @var string
*/
private $publicPath;
/**
* @var Illuminate\Foundation\Filesystem
*/
protected $file;
/**
* @var boolean
*/
private $disable_mtime;
/**
* @var string
*/
private $hash_salt;
/**
* @param null $publicPath
*/
public function __construct($publicPath = null, $config = null, Filesystem $file = null)
{
$this->file = $file ?: new Filesystem;
$this->publicPath = $publicPath ?: $_SERVER['DOCUMENT_ROOT'];
$this->disable_mtime = $config['disable_mtime'] ?: false;
$this->hash_salt = $config['hash_salt'] ?: '';
$value = function($key)
{
return isset($_SERVER[$key]) ? $_SERVER[$key] : '';
};
$this->headers = array(
'User-Agent' => $value('HTTP_USER_AGENT'),
'Accept' => $value('HTTP_ACCEPT'),
'Accept-Language' => $value('HTTP_ACCEPT_LANGUAGE'),
'Accept-Encoding' => 'identity',
'Connection' => 'close',
);
}
/**
* @param $outputDir
* @return bool
*/
public function make($outputDir)
{
$this->outputDir = $this->publicPath . $outputDir;
$this->checkDirectory();
if ($this->checkExistingFiles())
{
return false;
}
$this->removeOldFiles();
$this->appendFiles();
return true;
}
/**
* @param $file
* @return void
* @throws \Devfactory\Minify\Exceptions\FileNotExistException
*/
public function add($file)
{
if (is_array($file))
{
foreach ($file as $value) $this->add($value);
}
else if ($this->checkExternalFile($file))
{
$this->files[] = $file;
}
else {
$file = $this->publicPath . $file;
if (!file_exists($file))
{
throw new FileNotExistException("File '{$file}' does not exist");
}
$this->files[] = $file;
}
}
/**
* @param $baseUrl
* @param $attributes
*
* @return string
*/
public function tags($baseUrl, $attributes)
{
$html = '';
foreach($this->files as $file)
{
$file = $baseUrl . str_replace($this->publicPath, '', $file);
$html .= $this->tag($file, $attributes);
}
return $html;
}
/**
* @return int
*/
public function count()
{
return count($this->files);
}
/**
* @throws \Devfactory\Minify\Exceptions\FileNotExistException
*/
protected function appendFiles()
{
foreach ($this->files as $file) {
if ($this->checkExternalFile($file))
{
if (strpos($file, '//') === 0) $file = 'http:' . $file;
$headers = $this->headers;
foreach ($headers as $key => $value)
{
$headers[$key] = $key . ': ' . $value;
}
$context = stream_context_create(array('http' => array(
'ignore_errors' => true,
'header' => implode("\r\n", $headers),
)));
$http_response_header = array(false);
$contents = file_get_contents($file, false, $context);
if (strpos($http_response_header[0], '200') === false)
{
throw new FileNotExistException("File '{$file}' does not exist");
}
} else {
$contents = file_get_contents($file);
}
$this->appended .= $contents . "\n";
}
}
/**
* @return bool
*/
protected function checkExistingFiles()
{
$this->buildMinifiedFilename();
return file_exists($this->outputDir . $this->filename);
}
/**
* @throws \Devfactory\Minify\Exceptions\DirNotWritableException
* @throws \Devfactory\Minify\Exceptions\DirNotExistException
*/
protected function checkDirectory()
{
if (!file_exists($this->outputDir))
{
// Try to create the directory
if (!$this->file->makeDirectory($this->outputDir, 0775, true)) {
throw new DirNotExistException("Buildpath '{$this->outputDir}' does not exist");
}
}
if (!is_writable($this->outputDir))
{
throw new DirNotWritableException("Buildpath '{$this->outputDir}' is not writable");
}
}
/**
* @param string $file
* @return bool
*/
protected function checkExternalFile($file)
{
return preg_match('/^(https?:)?\/\//', $file);
}
/**
* @return string
*/
protected function buildMinifiedFilename()
{
$this->filename = $this->getHashedFilename() . (($this->disable_mtime) ? '' : $this->countModificationTime()) . static::EXTENSION;
}
/**
* Build an HTML attribute string from an array.
*
* @param array $attributes
* @return string
*/
protected function attributes($attributes)
{
$html = array();
foreach ((array) $attributes as $key => $value)
{
$element = $this->attributeElement($key, $value);
if ( ! is_null($element)) $html[] = $element;
}
$output = count($html) > 0 ? ' '.implode(' ', $html) : '';
return trim($output);
}
/**
* Build a single attribute element.
*
* @param string|integer $key
* @param string|boolean $value
* @return string|null
*/
protected function attributeElement($key, $value)
{
if (is_numeric($key)) $key = $value;
if(is_bool($value))
return $key;
if ( ! is_null($value))
return $key.'="'.htmlentities($value, ENT_QUOTES, 'UTF-8', false).'"';
return null;
}
/**
* @return string
*/
protected function getHashedFilename()
{
$publicPath = $this->publicPath;
return md5(implode('-', array_map(function($file) use ($publicPath) { return str_replace($publicPath, '', $file); }, $this->files)) . $this->hash_salt);
}
/**
* @return int
*/
protected function countModificationTime()
{
$time = 0;
foreach ($this->files as $file)
{
if ($this->checkExternalFile($file))
{
$userAgent = isset($this->headers['User-Agent']) ? $this->headers['User-Agent'] : '';
$time += hexdec(substr(md5($file . $userAgent), 0, 8));
}
else {
$time += filemtime($file);
}
}
return $time;
}
/**
* @throws \Devfactory\Minify\Exceptions\CannotRemoveFileException
*/
protected function removeOldFiles()
{
$pattern = $this->outputDir . $this->getHashedFilename() . '*';
$find = glob($pattern);
if( is_array($find) && count($find) )
{
foreach ($find as $file)
{
if ( ! unlink($file) ) {
throw new CannotRemoveFileException("File '{$file}' cannot be removed");
}
}
}
}
/**
* @param $minified
* @return string
* @throws \Devfactory\Minify\Exceptions\CannotSaveFileException
*/
protected function put($minified)
{
if(file_put_contents($this->outputDir . $this->filename, $minified) === false)
{
throw new CannotSaveFileException("File '{$this->outputDir}{$this->filename}' cannot be saved");
}
return $this->filename;
}
/**
* @return string
*/
public function getAppended()
{
return $this->appended;
}
/**
* @return string
*/
public function getFilename()
{
return $this->filename;
}
}

View File

@@ -1,134 +0,0 @@
<?php
namespace Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\Connection as ConnectionInterface;
use Doctrine\DBAL\Driver\PDO\Exception;
use Doctrine\DBAL\Driver\PDO\Statement;
use Doctrine\DBAL\ParameterType;
use PDO;
use PDOException;
use PDOStatement;
use function assert;
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*
* @deprecated Use {@link Connection} instead
*/
class PDOConnection extends PDO implements ConnectionInterface, ServerInfoAwareConnection
{
use PDOQueryImplementation;
/**
* @internal The connection can be only instantiated by its driver.
*
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param mixed[]|null $options
*
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($sql)
{
try {
$result = parent::exec($sql);
assert($result !== false);
return $result;
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*/
public function getServerVersion()
{
return PDO::getAttribute(PDO::ATTR_SERVER_VERSION);
}
/**
* @param string $sql
* @param array<int, int> $driverOptions
*
* @return PDOStatement
*/
public function prepare($sql, $driverOptions = [])
{
try {
$statement = parent::prepare($sql, $driverOptions);
assert($statement instanceof PDOStatement);
return $statement;
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*/
public function quote($value, $type = ParameterType::STRING)
{
return parent::quote($value, $type);
}
/**
* {@inheritdoc}
*/
public function lastInsertId($name = null)
{
try {
if ($name === null) {
return parent::lastInsertId();
}
return parent::lastInsertId($name);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*/
public function requiresQueryForServerVersion()
{
return false;
}
/**
* @param mixed ...$args
*/
private function doQuery(...$args): PDOStatement
{
try {
$stmt = parent::query(...$args);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
assert($stmt instanceof PDOStatement);
return $stmt;
}
}

View File

@@ -1,39 +0,0 @@
<?php
namespace Doctrine\DBAL\Driver;
use PDOStatement;
use function func_get_args;
use const PHP_VERSION_ID;
if (PHP_VERSION_ID >= 80000) {
/**
* @internal
*/
trait PDOQueryImplementation
{
/**
* @return PDOStatement
*/
public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs)
{
return $this->doQuery($query, $fetchMode, ...$fetchModeArgs);
}
}
} else {
/**
* @internal
*/
trait PDOQueryImplementation
{
/**
* @return PDOStatement
*/
public function query()
{
return $this->doQuery(...func_get_args());
}
}
}

View File

@@ -1,308 +0,0 @@
<?php
namespace Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\PDO\Exception;
use Doctrine\DBAL\Driver\Statement as StatementInterface;
use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType;
use PDO;
use PDOException;
use function array_slice;
use function assert;
use function func_get_args;
use function is_array;
use function sprintf;
use function trigger_error;
use const E_USER_DEPRECATED;
/**
* The PDO implementation of the Statement interface.
* Used by all PDO-based drivers.
*
* @deprecated Use {@link Statement} instead
*/
class PDOStatement extends \PDOStatement implements StatementInterface, Result
{
use PDOStatementImplementations;
private const PARAM_TYPE_MAP = [
ParameterType::NULL => PDO::PARAM_NULL,
ParameterType::INTEGER => PDO::PARAM_INT,
ParameterType::STRING => PDO::PARAM_STR,
ParameterType::ASCII => PDO::PARAM_STR,
ParameterType::BINARY => PDO::PARAM_LOB,
ParameterType::LARGE_OBJECT => PDO::PARAM_LOB,
ParameterType::BOOLEAN => PDO::PARAM_BOOL,
];
private const FETCH_MODE_MAP = [
FetchMode::ASSOCIATIVE => PDO::FETCH_ASSOC,
FetchMode::NUMERIC => PDO::FETCH_NUM,
FetchMode::MIXED => PDO::FETCH_BOTH,
FetchMode::STANDARD_OBJECT => PDO::FETCH_OBJ,
FetchMode::COLUMN => PDO::FETCH_COLUMN,
FetchMode::CUSTOM_OBJECT => PDO::FETCH_CLASS,
];
/**
* Protected constructor.
*
* @internal The statement can be only instantiated by its driver connection.
*/
protected function __construct()
{
}
/**
* {@inheritdoc}
*/
public function bindValue($param, $value, $type = ParameterType::STRING)
{
$type = $this->convertParamType($type);
try {
return parent::bindValue($param, $value, $type);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* @param mixed $param
* @param mixed $variable
* @param int $type
* @param int|null $length
* @param mixed $driverOptions
*
* @return bool
*/
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null)
{
$type = $this->convertParamType($type);
try {
return parent::bindParam($param, $variable, $type, ...array_slice(func_get_args(), 3));
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*
* @deprecated Use free() instead.
*/
public function closeCursor()
{
try {
return parent::closeCursor();
} catch (PDOException $exception) {
// Exceptions not allowed by the interface.
// In case driver implementations do not adhere to the interface, silence exceptions here.
return true;
}
}
/**
* {@inheritdoc}
*/
public function execute($params = null)
{
try {
return parent::execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*
* @deprecated Use fetchNumeric(), fetchAssociative() or fetchOne() instead.
*/
public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{
$args = func_get_args();
if (isset($args[0])) {
$args[0] = $this->convertFetchMode($args[0]);
}
try {
return parent::fetch(...$args);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*
* @deprecated Use fetchOne() instead.
*/
public function fetchColumn($columnIndex = 0)
{
try {
return parent::fetchColumn($columnIndex);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
*/
public function fetchNumeric()
{
return $this->fetch(PDO::FETCH_NUM);
}
/**
* {@inheritdoc}
*/
public function fetchAssociative()
{
return $this->fetch(PDO::FETCH_ASSOC);
}
/**
* {@inheritdoc}
*/
public function fetchOne()
{
return $this->fetch(PDO::FETCH_COLUMN);
}
/**
* {@inheritdoc}
*/
public function fetchAllNumeric(): array
{
return $this->fetchAll(PDO::FETCH_NUM);
}
/**
* {@inheritdoc}
*/
public function fetchAllAssociative(): array
{
return $this->fetchAll(PDO::FETCH_ASSOC);
}
/**
* {@inheritdoc}
*/
public function fetchFirstColumn(): array
{
return $this->fetchAll(PDO::FETCH_COLUMN);
}
public function free(): void
{
parent::closeCursor();
}
/**
* @param mixed ...$args
*/
private function doSetFetchMode(int $fetchMode, ...$args): bool
{
$fetchMode = $this->convertFetchMode($fetchMode);
// This thin wrapper is necessary to shield against the weird signature
// of PDOStatement::setFetchMode(): even if the second and third
// parameters are optional, PHP will not let us remove it from this
// declaration.
$slice = [];
foreach ($args as $arg) {
if ($arg === null) {
break;
}
$slice[] = $arg;
}
try {
return parent::setFetchMode($fetchMode, ...$slice);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* @param mixed ...$args
*
* @return mixed[]
*/
private function doFetchAll(...$args): array
{
if (isset($args[0])) {
$args[0] = $this->convertFetchMode($args[0]);
}
$slice = [];
foreach ($args as $arg) {
if ($arg === null) {
break;
}
$slice[] = $arg;
}
try {
$data = parent::fetchAll(...$slice);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
assert(is_array($data));
return $data;
}
/**
* Converts DBAL parameter type to PDO parameter type
*
* @param int $type Parameter type
*/
private function convertParamType(int $type): int
{
if (! isset(self::PARAM_TYPE_MAP[$type])) {
// TODO: next major: throw an exception
@trigger_error(sprintf(
'Using a PDO parameter type (%d given) is deprecated and will cause an error in Doctrine DBAL 3.0',
$type
), E_USER_DEPRECATED);
return $type;
}
return self::PARAM_TYPE_MAP[$type];
}
/**
* Converts DBAL fetch mode to PDO fetch mode
*
* @param int $fetchMode Fetch mode
*/
private function convertFetchMode(int $fetchMode): int
{
if (! isset(self::FETCH_MODE_MAP[$fetchMode])) {
// TODO: next major: throw an exception
@trigger_error(sprintf(
'Using a PDO fetch mode or their combination (%d given)' .
' is deprecated and will cause an error in Doctrine DBAL 3.0',
$fetchMode
), E_USER_DEPRECATED);
return $fetchMode;
}
return self::FETCH_MODE_MAP[$fetchMode];
}
}

View File

@@ -1,73 +0,0 @@
<?php
namespace Doctrine\DBAL\Driver;
use function func_get_args;
use const PHP_VERSION_ID;
if (PHP_VERSION_ID >= 80000) {
/**
* @internal
*/
trait PDOStatementImplementations
{
/**
* @deprecated Use one of the fetch- or iterate-related methods.
*
* @param int $mode
* @param mixed ...$args
*
* @return bool
*/
public function setFetchMode($mode, ...$args)
{
return $this->doSetFetchMode($mode, ...$args);
}
/**
* @deprecated Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.
*
* @param int|null $mode
* @param mixed ...$args
*
* @return mixed[]
*/
public function fetchAll($mode = null, ...$args)
{
return $this->doFetchAll($mode, ...$args);
}
}
} else {
/**
* @internal
*/
trait PDOStatementImplementations
{
/**
* @deprecated Use one of the fetch- or iterate-related methods.
*
* @param int $fetchMode
* @param mixed $arg2
* @param mixed $arg3
*/
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null): bool
{
return $this->doSetFetchMode(...func_get_args());
}
/**
* @deprecated Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.
*
* @param int|null $fetchMode
* @param mixed $fetchArgument
* @param mixed $ctorArgs
*
* @return mixed[]
*/
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{
return $this->doFetchAll(...func_get_args());
}
}
}

View File

@@ -1,142 +0,0 @@
<?php
/**
* Validates a host according to the IPv4, IPv6 and DNS (future) specifications.
*/
class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef
{
/**
* IPv4 sub-validator.
* @type HTMLPurifier_AttrDef_URI_IPv4
*/
protected $ipv4;
/**
* IPv6 sub-validator.
* @type HTMLPurifier_AttrDef_URI_IPv6
*/
protected $ipv6;
public function __construct()
{
$this->ipv4 = new HTMLPurifier_AttrDef_URI_IPv4();
$this->ipv6 = new HTMLPurifier_AttrDef_URI_IPv6();
}
/**
* @param string $string
* @param HTMLPurifier_Config $config
* @param HTMLPurifier_Context $context
* @return bool|string
*/
public function validate($string, $config, $context)
{
$length = strlen($string);
// empty hostname is OK; it's usually semantically equivalent:
// the default host as defined by a URI scheme is used:
//
// If the URI scheme defines a default for host, then that
// default applies when the host subcomponent is undefined
// or when the registered name is empty (zero length).
if ($string === '') {
return '';
}
if ($length > 1 && $string[0] === '[' && $string[$length - 1] === ']') {
//IPv6
$ip = substr($string, 1, $length - 2);
$valid = $this->ipv6->validate($ip, $config, $context);
if ($valid === false) {
return false;
}
return '[' . $valid . ']';
}
// need to do checks on unusual encodings too
$ipv4 = $this->ipv4->validate($string, $config, $context);
if ($ipv4 !== false) {
return $ipv4;
}
// A regular domain name.
// This doesn't match I18N domain names, but we don't have proper IRI support,
// so force users to insert Punycode.
// There is not a good sense in which underscores should be
// allowed, since it's technically not! (And if you go as
// far to allow everything as specified by the DNS spec...
// well, that's literally everything, modulo some space limits
// for the components and the overall name (which, by the way,
// we are NOT checking!). So we (arbitrarily) decide this:
// let's allow underscores wherever we would have allowed
// hyphens, if they are enabled. This is a pretty good match
// for browser behavior, for example, a large number of browsers
// cannot handle foo_.example.com, but foo_bar.example.com is
// fairly well supported.
$underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : '';
// Based off of RFC 1738, but amended so that
// as per RFC 3696, the top label need only not be all numeric.
// The productions describing this are:
$a = '[a-z]'; // alpha
$an = '[a-z0-9]'; // alphanum
$and = "[a-z0-9-$underscore]"; // alphanum | "-"
// domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum
$domainlabel = "$an(?:$and*$an)?";
// AMENDED as per RFC 3696
// toplabel = alphanum | alphanum *( alphanum | "-" ) alphanum
// side condition: not all numeric
$toplabel = "$an(?:$and*$an)?";
// hostname = *( domainlabel "." ) toplabel [ "." ]
if (preg_match("/^(?:$domainlabel\.)*($toplabel)\.?$/i", $string, $matches)) {
if (!ctype_digit($matches[1])) {
return $string;
}
}
// PHP 5.3 and later support this functionality natively
if (function_exists('idn_to_ascii')) {
if (defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46')) {
$string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$string = idn_to_ascii($string);
}
// If we have Net_IDNA2 support, we can support IRIs by
// punycoding them. (This is the most portable thing to do,
// since otherwise we have to assume browsers support
} elseif ($config->get('Core.EnableIDNA')) {
$idna = new Net_IDNA2(array('encoding' => 'utf8', 'overlong' => false, 'strict' => true));
// we need to encode each period separately
$parts = explode('.', $string);
try {
$new_parts = array();
foreach ($parts as $part) {
$encodable = false;
for ($i = 0, $c = strlen($part); $i < $c; $i++) {
if (ord($part[$i]) > 0x7a) {
$encodable = true;
break;
}
}
if (!$encodable) {
$new_parts[] = $part;
} else {
$new_parts[] = $idna->encode($part);
}
}
$string = implode('.', $new_parts);
} catch (Exception $e) {
// XXX error reporting
}
}
// Try again
if (preg_match("/^($domainlabel\.)*$toplabel\.?$/i", $string)) {
return $string;
}
return false;
}
}
// vim: et sw=4 sts=4

View File

@@ -1,422 +0,0 @@
<?php
namespace GuzzleHttp;
use GuzzleHttp\Cookie\CookieJar;
use GuzzleHttp\Promise;
use GuzzleHttp\Psr7;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* @method ResponseInterface get(string|UriInterface $uri, array $options = [])
* @method ResponseInterface head(string|UriInterface $uri, array $options = [])
* @method ResponseInterface put(string|UriInterface $uri, array $options = [])
* @method ResponseInterface post(string|UriInterface $uri, array $options = [])
* @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
* @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
* @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
*/
class Client implements ClientInterface
{
/** @var array Default request options */
private $config;
/**
* Clients accept an array of constructor parameters.
*
* Here's an example of creating a client using a base_uri and an array of
* default request options to apply to each request:
*
* $client = new Client([
* 'base_uri' => 'http://www.foo.com/1.0/',
* 'timeout' => 0,
* 'allow_redirects' => false,
* 'proxy' => '192.168.16.1:10'
* ]);
*
* Client configuration settings include the following options:
*
* - handler: (callable) Function that transfers HTTP requests over the
* wire. The function is called with a Psr7\Http\Message\RequestInterface
* and array of transfer options, and must return a
* GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
* Psr7\Http\Message\ResponseInterface on success. "handler" is a
* constructor only option that cannot be overridden in per/request
* options. If no handler is provided, a default handler will be created
* that enables all of the request options below by attaching all of the
* default middleware to the handler.
* - base_uri: (string|UriInterface) Base URI of the client that is merged
* into relative URIs. Can be a string or instance of UriInterface.
* - **: any request option
*
* @param array $config Client configuration settings.
*
* @see \GuzzleHttp\RequestOptions for a list of available request options.
*/
public function __construct(array $config = [])
{
if (!isset($config['handler'])) {
$config['handler'] = HandlerStack::create();
} elseif (!is_callable($config['handler'])) {
throw new \InvalidArgumentException('handler must be a callable');
}
// Convert the base_uri to a UriInterface
if (isset($config['base_uri'])) {
$config['base_uri'] = Psr7\uri_for($config['base_uri']);
}
$this->configureDefaults($config);
}
public function __call($method, $args)
{
if (count($args) < 1) {
throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
}
$uri = $args[0];
$opts = isset($args[1]) ? $args[1] : [];
return substr($method, -5) === 'Async'
? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
: $this->request($method, $uri, $opts);
}
public function sendAsync(RequestInterface $request, array $options = [])
{
// Merge the base URI into the request URI if needed.
$options = $this->prepareDefaults($options);
return $this->transfer(
$request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')),
$options
);
}
public function send(RequestInterface $request, array $options = [])
{
$options[RequestOptions::SYNCHRONOUS] = true;
return $this->sendAsync($request, $options)->wait();
}
public function requestAsync($method, $uri = '', array $options = [])
{
$options = $this->prepareDefaults($options);
// Remove request modifying parameter because it can be done up-front.
$headers = isset($options['headers']) ? $options['headers'] : [];
$body = isset($options['body']) ? $options['body'] : null;
$version = isset($options['version']) ? $options['version'] : '1.1';
// Merge the URI into the base URI.
$uri = $this->buildUri($uri, $options);
if (is_array($body)) {
$this->invalidBody();
}
$request = new Psr7\Request($method, $uri, $headers, $body, $version);
// Remove the option so that they are not doubly-applied.
unset($options['headers'], $options['body'], $options['version']);
return $this->transfer($request, $options);
}
public function request($method, $uri = '', array $options = [])
{
$options[RequestOptions::SYNCHRONOUS] = true;
return $this->requestAsync($method, $uri, $options)->wait();
}
public function getConfig($option = null)
{
return $option === null
? $this->config
: (isset($this->config[$option]) ? $this->config[$option] : null);
}
private function buildUri($uri, array $config)
{
// for BC we accept null which would otherwise fail in uri_for
$uri = Psr7\uri_for($uri === null ? '' : $uri);
if (isset($config['base_uri'])) {
$uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
}
return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
}
/**
* Configures the default options for a client.
*
* @param array $config
*/
private function configureDefaults(array $config)
{
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
'verify' => true,
'cookies' => false
];
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
// We can only trust the HTTP_PROXY environment variable in a CLI
// process due to the fact that PHP has no reliable mechanism to
// get environment variables that start with "HTTP_".
if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
$defaults['proxy']['http'] = getenv('HTTP_PROXY');
}
if ($proxy = getenv('HTTPS_PROXY')) {
$defaults['proxy']['https'] = $proxy;
}
if ($noProxy = getenv('NO_PROXY')) {
$cleanedNoProxy = str_replace(' ', '', $noProxy);
$defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
}
$this->config = $config + $defaults;
if (!empty($config['cookies']) && $config['cookies'] === true) {
$this->config['cookies'] = new CookieJar();
}
// Add the default user-agent header.
if (!isset($this->config['headers'])) {
$this->config['headers'] = ['User-Agent' => default_user_agent()];
} else {
// Add the User-Agent header if one was not already set.
foreach (array_keys($this->config['headers']) as $name) {
if (strtolower($name) === 'user-agent') {
return;
}
}
$this->config['headers']['User-Agent'] = default_user_agent();
}
}
/**
* Merges default options into the array.
*
* @param array $options Options to modify by reference
*
* @return array
*/
private function prepareDefaults($options)
{
$defaults = $this->config;
if (!empty($defaults['headers'])) {
// Default headers are only added if they are not present.
$defaults['_conditional'] = $defaults['headers'];
unset($defaults['headers']);
}
// Special handling for headers is required as they are added as
// conditional headers and as headers passed to a request ctor.
if (array_key_exists('headers', $options)) {
// Allows default headers to be unset.
if ($options['headers'] === null) {
$defaults['_conditional'] = null;
unset($options['headers']);
} elseif (!is_array($options['headers'])) {
throw new \InvalidArgumentException('headers must be an array');
}
}
// Shallow merge defaults underneath options.
$result = $options + $defaults;
// Remove null values.
foreach ($result as $k => $v) {
if ($v === null) {
unset($result[$k]);
}
}
return $result;
}
/**
* Transfers the given request and applies request options.
*
* The URI of the request is not modified and the request options are used
* as-is without merging in default options.
*
* @param RequestInterface $request
* @param array $options
*
* @return Promise\PromiseInterface
*/
private function transfer(RequestInterface $request, array $options)
{
// save_to -> sink
if (isset($options['save_to'])) {
$options['sink'] = $options['save_to'];
unset($options['save_to']);
}
// exceptions -> http_errors
if (isset($options['exceptions'])) {
$options['http_errors'] = $options['exceptions'];
unset($options['exceptions']);
}
$request = $this->applyOptions($request, $options);
$handler = $options['handler'];
try {
return Promise\promise_for($handler($request, $options));
} catch (\Exception $e) {
return Promise\rejection_for($e);
}
}
/**
* Applies the array of request options to a request.
*
* @param RequestInterface $request
* @param array $options
*
* @return RequestInterface
*/
private function applyOptions(RequestInterface $request, array &$options)
{
$modify = [
'set_headers' => [],
];
if (isset($options['headers'])) {
$modify['set_headers'] = $options['headers'];
unset($options['headers']);
}
if (isset($options['form_params'])) {
if (isset($options['multipart'])) {
throw new \InvalidArgumentException('You cannot use '
. 'form_params and multipart at the same time. Use the '
. 'form_params option if you want to send application/'
. 'x-www-form-urlencoded requests, and the multipart '
. 'option to send multipart/form-data requests.');
}
$options['body'] = http_build_query($options['form_params'], '', '&');
unset($options['form_params']);
// Ensure that we don't have the header in different case and set the new value.
$options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
$options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
}
if (isset($options['multipart'])) {
$options['body'] = new Psr7\MultipartStream($options['multipart']);
unset($options['multipart']);
}
if (isset($options['json'])) {
$options['body'] = \GuzzleHttp\json_encode($options['json']);
unset($options['json']);
// Ensure that we don't have the header in different case and set the new value.
$options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
$options['_conditional']['Content-Type'] = 'application/json';
}
if (!empty($options['decode_content'])
&& $options['decode_content'] !== true
) {
// Ensure that we don't have the header in different case and set the new value.
$options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
$modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
}
if (isset($options['body'])) {
if (is_array($options['body'])) {
$this->invalidBody();
}
$modify['body'] = Psr7\stream_for($options['body']);
unset($options['body']);
}
if (!empty($options['auth']) && is_array($options['auth'])) {
$value = $options['auth'];
$type = isset($value[2]) ? strtolower($value[2]) : 'basic';
switch ($type) {
case 'basic':
// Ensure that we don't have the header in different case and set the new value.
$modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
$modify['set_headers']['Authorization'] = 'Basic '
. base64_encode("$value[0]:$value[1]");
break;
case 'digest':
// @todo: Do not rely on curl
$options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
$options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
break;
case 'ntlm':
$options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
$options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
break;
}
}
if (isset($options['query'])) {
$value = $options['query'];
if (is_array($value)) {
$value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
}
if (!is_string($value)) {
throw new \InvalidArgumentException('query must be a string or array');
}
$modify['query'] = $value;
unset($options['query']);
}
// Ensure that sink is not an invalid value.
if (isset($options['sink'])) {
// TODO: Add more sink validation?
if (is_bool($options['sink'])) {
throw new \InvalidArgumentException('sink must not be a boolean');
}
}
$request = Psr7\modify_request($request, $modify);
if ($request->getBody() instanceof Psr7\MultipartStream) {
// Use a multipart/form-data POST if a Content-Type is not set.
// Ensure that we don't have the header in different case and set the new value.
$options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
$options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
. $request->getBody()->getBoundary();
}
// Merge in conditional headers if they are not present.
if (isset($options['_conditional'])) {
// Build up the changes so it's in a single clone of the message.
$modify = [];
foreach ($options['_conditional'] as $k => $v) {
if (!$request->hasHeader($k)) {
$modify['set_headers'][$k] = $v;
}
}
$request = Psr7\modify_request($request, $modify);
// Don't pass this internal value along to middleware/handlers.
unset($options['_conditional']);
}
return $request;
}
private function invalidBody()
{
throw new \InvalidArgumentException('Passing in the "body" request '
. 'option as an array to send a POST request has been deprecated. '
. 'Please use the "form_params" request option to send a '
. 'application/x-www-form-urlencoded request, or the "multipart" '
. 'request option to send a multipart/form-data request.');
}
}

View File

@@ -1,314 +0,0 @@
<?php
namespace GuzzleHttp\Cookie;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* Cookie jar that stores cookies as an array
*/
class CookieJar implements CookieJarInterface
{
/** @var SetCookie[] Loaded cookie data */
private $cookies = [];
/** @var bool */
private $strictMode;
/**
* @param bool $strictMode Set to true to throw exceptions when invalid
* cookies are added to the cookie jar.
* @param array $cookieArray Array of SetCookie objects or a hash of
* arrays that can be used with the SetCookie
* constructor
*/
public function __construct($strictMode = false, $cookieArray = [])
{
$this->strictMode = $strictMode;
foreach ($cookieArray as $cookie) {
if (!($cookie instanceof SetCookie)) {
$cookie = new SetCookie($cookie);
}
$this->setCookie($cookie);
}
}
/**
* Create a new Cookie jar from an associative array and domain.
*
* @param array $cookies Cookies to create the jar from
* @param string $domain Domain to set the cookies to
*
* @return self
*/
public static function fromArray(array $cookies, $domain)
{
$cookieJar = new self();
foreach ($cookies as $name => $value) {
$cookieJar->setCookie(new SetCookie([
'Domain' => $domain,
'Name' => $name,
'Value' => $value,
'Discard' => true
]));
}
return $cookieJar;
}
/**
* @deprecated
*/
public static function getCookieValue($value)
{
return $value;
}
/**
* Evaluate if this cookie should be persisted to storage
* that survives between requests.
*
* @param SetCookie $cookie Being evaluated.
* @param bool $allowSessionCookies If we should persist session cookies
* @return bool
*/
public static function shouldPersist(
SetCookie $cookie,
$allowSessionCookies = false
) {
if ($cookie->getExpires() || $allowSessionCookies) {
if (!$cookie->getDiscard()) {
return true;
}
}
return false;
}
/**
* Finds and returns the cookie based on the name
*
* @param string $name cookie name to search for
* @return SetCookie|null cookie that was found or null if not found
*/
public function getCookieByName($name)
{
// don't allow a null name
if ($name === null) {
return null;
}
foreach ($this->cookies as $cookie) {
if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
return $cookie;
}
}
}
public function toArray()
{
return array_map(function (SetCookie $cookie) {
return $cookie->toArray();
}, $this->getIterator()->getArrayCopy());
}
public function clear($domain = null, $path = null, $name = null)
{
if (!$domain) {
$this->cookies = [];
return;
} elseif (!$path) {
$this->cookies = array_filter(
$this->cookies,
function (SetCookie $cookie) use ($path, $domain) {
return !$cookie->matchesDomain($domain);
}
);
} elseif (!$name) {
$this->cookies = array_filter(
$this->cookies,
function (SetCookie $cookie) use ($path, $domain) {
return !($cookie->matchesPath($path) &&
$cookie->matchesDomain($domain));
}
);
} else {
$this->cookies = array_filter(
$this->cookies,
function (SetCookie $cookie) use ($path, $domain, $name) {
return !($cookie->getName() == $name &&
$cookie->matchesPath($path) &&
$cookie->matchesDomain($domain));
}
);
}
}
public function clearSessionCookies()
{
$this->cookies = array_filter(
$this->cookies,
function (SetCookie $cookie) {
return !$cookie->getDiscard() && $cookie->getExpires();
}
);
}
public function setCookie(SetCookie $cookie)
{
// If the name string is empty (but not 0), ignore the set-cookie
// string entirely.
$name = $cookie->getName();
if (!$name && $name !== '0') {
return false;
}
// Only allow cookies with set and valid domain, name, value
$result = $cookie->validate();
if ($result !== true) {
if ($this->strictMode) {
throw new \RuntimeException('Invalid cookie: ' . $result);
} else {
$this->removeCookieIfEmpty($cookie);
return false;
}
}
// Resolve conflicts with previously set cookies
foreach ($this->cookies as $i => $c) {
// Two cookies are identical, when their path, and domain are
// identical.
if ($c->getPath() != $cookie->getPath() ||
$c->getDomain() != $cookie->getDomain() ||
$c->getName() != $cookie->getName()
) {
continue;
}
// The previously set cookie is a discard cookie and this one is
// not so allow the new cookie to be set
if (!$cookie->getDiscard() && $c->getDiscard()) {
unset($this->cookies[$i]);
continue;
}
// If the new cookie's expiration is further into the future, then
// replace the old cookie
if ($cookie->getExpires() > $c->getExpires()) {
unset($this->cookies[$i]);
continue;
}
// If the value has changed, we better change it
if ($cookie->getValue() !== $c->getValue()) {
unset($this->cookies[$i]);
continue;
}
// The cookie exists, so no need to continue
return false;
}
$this->cookies[] = $cookie;
return true;
}
public function count()
{
return count($this->cookies);
}
public function getIterator()
{
return new \ArrayIterator(array_values($this->cookies));
}
public function extractCookies(
RequestInterface $request,
ResponseInterface $response
) {
if ($cookieHeader = $response->getHeader('Set-Cookie')) {
foreach ($cookieHeader as $cookie) {
$sc = SetCookie::fromString($cookie);
if (!$sc->getDomain()) {
$sc->setDomain($request->getUri()->getHost());
}
if (0 !== strpos($sc->getPath(), '/')) {
$sc->setPath($this->getCookiePathFromRequest($request));
}
$this->setCookie($sc);
}
}
}
/**
* Computes cookie path following RFC 6265 section 5.1.4
*
* @link https://tools.ietf.org/html/rfc6265#section-5.1.4
*
* @param RequestInterface $request
* @return string
*/
private function getCookiePathFromRequest(RequestInterface $request)
{
$uriPath = $request->getUri()->getPath();
if ('' === $uriPath) {
return '/';
}
if (0 !== strpos($uriPath, '/')) {
return '/';
}
if ('/' === $uriPath) {
return '/';
}
if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
return '/';
}
return substr($uriPath, 0, $lastSlashPos);
}
public function withCookieHeader(RequestInterface $request)
{
$values = [];
$uri = $request->getUri();
$scheme = $uri->getScheme();
$host = $uri->getHost();
$path = $uri->getPath() ?: '/';
foreach ($this->cookies as $cookie) {
if ($cookie->matchesPath($path) &&
$cookie->matchesDomain($host) &&
!$cookie->isExpired() &&
(!$cookie->getSecure() || $scheme === 'https')
) {
$values[] = $cookie->getName() . '='
. $cookie->getValue();
}
}
return $values
? $request->withHeader('Cookie', implode('; ', $values))
: $request;
}
/**
* If a cookie already exists and the server asks to set it again with a
* null value, the cookie must be deleted.
*
* @param SetCookie $cookie
*/
private function removeCookieIfEmpty(SetCookie $cookie)
{
$cookieValue = $cookie->getValue();
if ($cookieValue === null || $cookieValue === '') {
$this->clear(
$cookie->getDomain(),
$cookie->getPath(),
$cookie->getName()
);
}
}
}

View File

@@ -1,753 +0,0 @@
<?php
namespace Illuminate\Auth;
use RuntimeException;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Session\Session;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Auth\StatefulGuard;
use Symfony\Component\HttpFoundation\Request;
use Illuminate\Contracts\Auth\SupportsBasicAuth;
use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
class SessionGuard implements StatefulGuard, SupportsBasicAuth
{
use GuardHelpers, Macroable;
/**
* The name of the Guard. Typically "session".
*
* Corresponds to guard name in authentication configuration.
*
* @var string
*/
protected $name;
/**
* The user we last attempted to retrieve.
*
* @var \Illuminate\Contracts\Auth\Authenticatable
*/
protected $lastAttempted;
/**
* Indicates if the user was authenticated via a recaller cookie.
*
* @var bool
*/
protected $viaRemember = false;
/**
* The session used by the guard.
*
* @var \Illuminate\Contracts\Session\Session
*/
protected $session;
/**
* The Illuminate cookie creator service.
*
* @var \Illuminate\Contracts\Cookie\QueueingFactory
*/
protected $cookie;
/**
* The request instance.
*
* @var \Symfony\Component\HttpFoundation\Request
*/
protected $request;
/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* Indicates if the logout method has been called.
*
* @var bool
*/
protected $loggedOut = false;
/**
* Indicates if a token user retrieval has been attempted.
*
* @var bool
*/
protected $recallAttempted = false;
/**
* Create a new authentication guard.
*
* @param string $name
* @param \Illuminate\Contracts\Auth\UserProvider $provider
* @param \Illuminate\Contracts\Session\Session $session
* @param \Symfony\Component\HttpFoundation\Request $request
* @return void
*/
public function __construct($name,
UserProvider $provider,
Session $session,
Request $request = null)
{
$this->name = $name;
$this->session = $session;
$this->request = $request;
$this->provider = $provider;
}
/**
* Get the currently authenticated user.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function user()
{
if ($this->loggedOut) {
return;
}
// If we've already retrieved the user for the current request we can just
// return it back immediately. We do not want to fetch the user data on
// every call to this method because that would be tremendously slow.
if (! is_null($this->user)) {
return $this->user;
}
$id = $this->session->get($this->getName());
// First we will try to load the user using the identifier in the session if
// one exists. Otherwise we will check for a "remember me" cookie in this
// request, and if one exists, attempt to retrieve the user using that.
if (! is_null($id)) {
if ($this->user = $this->provider->retrieveById($id)) {
$this->fireAuthenticatedEvent($this->user);
}
}
// If the user is null, but we decrypt a "recaller" cookie we can attempt to
// pull the user data on that cookie which serves as a remember cookie on
// the application. Once we have a user we can return it to the caller.
$recaller = $this->recaller();
if (is_null($this->user) && ! is_null($recaller)) {
$this->user = $this->userFromRecaller($recaller);
if ($this->user) {
$this->updateSession($this->user->getAuthIdentifier());
$this->fireLoginEvent($this->user, true);
}
}
return $this->user;
}
/**
* Pull a user from the repository by its "remember me" cookie token.
*
* @param \Illuminate\Auth\Recaller $recaller
* @return mixed
*/
protected function userFromRecaller($recaller)
{
if (! $recaller->valid() || $this->recallAttempted) {
return;
}
// If the user is null, but we decrypt a "recaller" cookie we can attempt to
// pull the user data on that cookie which serves as a remember cookie on
// the application. Once we have a user we can return it to the caller.
$this->recallAttempted = true;
$this->viaRemember = ! is_null($user = $this->provider->retrieveByToken(
$recaller->id(), $recaller->token()
));
return $user;
}
/**
* Get the decrypted recaller cookie for the request.
*
* @return \Illuminate\Auth\Recaller|null
*/
protected function recaller()
{
if (is_null($this->request)) {
return;
}
if ($recaller = $this->request->cookies->get($this->getRecallerName())) {
return new Recaller($recaller);
}
}
/**
* Get the ID for the currently authenticated user.
*
* @return int|null
*/
public function id()
{
if ($this->loggedOut) {
return;
}
return $this->user()
? $this->user()->getAuthIdentifier()
: $this->session->get($this->getName());
}
/**
* Log a user into the application without sessions or cookies.
*
* @param array $credentials
* @return bool
*/
public function once(array $credentials = [])
{
$this->fireAttemptEvent($credentials);
if ($this->validate($credentials)) {
$this->setUser($this->lastAttempted);
return true;
}
return false;
}
/**
* Log the given user ID into the application without sessions or cookies.
*
* @param mixed $id
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function onceUsingId($id)
{
if (! is_null($user = $this->provider->retrieveById($id))) {
$this->setUser($user);
return $user;
}
return false;
}
/**
* Validate a user's credentials.
*
* @param array $credentials
* @return bool
*/
public function validate(array $credentials = [])
{
$this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials);
return $this->hasValidCredentials($user, $credentials);
}
/**
* Attempt to authenticate using HTTP Basic Auth.
*
* @param string $field
* @param array $extraConditions
* @return \Symfony\Component\HttpFoundation\Response|null
*/
public function basic($field = 'email', $extraConditions = [])
{
if ($this->check()) {
return;
}
// If a username is set on the HTTP basic request, we will return out without
// interrupting the request lifecycle. Otherwise, we'll need to generate a
// request indicating that the given credentials were invalid for login.
if ($this->attemptBasic($this->getRequest(), $field, $extraConditions)) {
return;
}
return $this->failedBasicResponse();
}
/**
* Perform a stateless HTTP Basic login attempt.
*
* @param string $field
* @param array $extraConditions
* @return \Symfony\Component\HttpFoundation\Response|null
*/
public function onceBasic($field = 'email', $extraConditions = [])
{
$credentials = $this->basicCredentials($this->getRequest(), $field);
if (! $this->once(array_merge($credentials, $extraConditions))) {
return $this->failedBasicResponse();
}
}
/**
* Attempt to authenticate using basic authentication.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @param string $field
* @param array $extraConditions
* @return bool
*/
protected function attemptBasic(Request $request, $field, $extraConditions = [])
{
if (! $request->getUser()) {
return false;
}
return $this->attempt(array_merge(
$this->basicCredentials($request, $field), $extraConditions
));
}
/**
* Get the credential array for a HTTP Basic request.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @param string $field
* @return array
*/
protected function basicCredentials(Request $request, $field)
{
return [$field => $request->getUser(), 'password' => $request->getPassword()];
}
/**
* Get the response for basic authentication.
*
* @return void
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
*/
protected function failedBasicResponse()
{
throw new UnauthorizedHttpException('Basic', 'Invalid credentials.');
}
/**
* Attempt to authenticate a user using the given credentials.
*
* @param array $credentials
* @param bool $remember
* @return bool
*/
public function attempt(array $credentials = [], $remember = false)
{
$this->fireAttemptEvent($credentials, $remember);
$this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials);
// If an implementation of UserInterface was returned, we'll ask the provider
// to validate the user against the given credentials, and if they are in
// fact valid we'll log the users into the application and return true.
if ($this->hasValidCredentials($user, $credentials)) {
$this->login($user, $remember);
return true;
}
// If the authentication attempt fails we will fire an event so that the user
// may be notified of any suspicious attempts to access their account from
// an unrecognized user. A developer may listen to this event as needed.
$this->fireFailedEvent($user, $credentials);
return false;
}
/**
* Determine if the user matches the credentials.
*
* @param mixed $user
* @param array $credentials
* @return bool
*/
protected function hasValidCredentials($user, $credentials)
{
return ! is_null($user) && $this->provider->validateCredentials($user, $credentials);
}
/**
* Log the given user ID into the application.
*
* @param mixed $id
* @param bool $remember
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function loginUsingId($id, $remember = false)
{
if (! is_null($user = $this->provider->retrieveById($id))) {
$this->login($user, $remember);
return $user;
}
return false;
}
/**
* Log a user into the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param bool $remember
* @return void
*/
public function login(AuthenticatableContract $user, $remember = false)
{
$this->updateSession($user->getAuthIdentifier());
// If the user should be permanently "remembered" by the application we will
// queue a permanent cookie that contains the encrypted copy of the user
// identifier. We will then decrypt this later to retrieve the users.
if ($remember) {
$this->ensureRememberTokenIsSet($user);
$this->queueRecallerCookie($user);
}
// If we have an event dispatcher instance set we will fire an event so that
// any listeners will hook into the authentication events and run actions
// based on the login and logout events fired from the guard instances.
$this->fireLoginEvent($user, $remember);
$this->setUser($user);
}
/**
* Update the session with the given ID.
*
* @param string $id
* @return void
*/
protected function updateSession($id)
{
$this->session->put($this->getName(), $id);
$this->session->migrate(true);
}
/**
* Create a new "remember me" token for the user if one doesn't already exist.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function ensureRememberTokenIsSet(AuthenticatableContract $user)
{
if (empty($user->getRememberToken())) {
$this->cycleRememberToken($user);
}
}
/**
* Queue the recaller cookie into the cookie jar.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function queueRecallerCookie(AuthenticatableContract $user)
{
$this->getCookieJar()->queue($this->createRecaller(
$user->getAuthIdentifier().'|'.$user->getRememberToken().'|'.$user->getAuthPassword()
));
}
/**
* Create a "remember me" cookie for a given ID.
*
* @param string $value
* @return \Symfony\Component\HttpFoundation\Cookie
*/
protected function createRecaller($value)
{
return $this->getCookieJar()->forever($this->getRecallerName(), $value);
}
/**
* Log the user out of the application.
*
* @return void
*/
public function logout()
{
$user = $this->user();
// If we have an event dispatcher instance, we can fire off the logout event
// so any further processing can be done. This allows the developer to be
// listening for anytime a user signs out of this application manually.
$this->clearUserDataFromStorage();
if (! is_null($this->user)) {
$this->cycleRememberToken($user);
}
if (isset($this->events)) {
$this->events->dispatch(new Events\Logout($user));
}
// Once we have fired the logout event we will clear the users out of memory
// so they are no longer available as the user is no longer considered as
// being signed into this application and should not be available here.
$this->user = null;
$this->loggedOut = true;
}
/**
* Remove the user data from the session and cookies.
*
* @return void
*/
protected function clearUserDataFromStorage()
{
$this->session->remove($this->getName());
if (! is_null($this->recaller())) {
$this->getCookieJar()->queue($this->getCookieJar()
->forget($this->getRecallerName()));
}
}
/**
* Refresh the "remember me" token for the user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function cycleRememberToken(AuthenticatableContract $user)
{
$user->setRememberToken($token = Str::random(60));
$this->provider->updateRememberToken($user, $token);
}
/**
* Register an authentication attempt event listener.
*
* @param mixed $callback
* @return void
*/
public function attempting($callback)
{
if (isset($this->events)) {
$this->events->listen(Events\Attempting::class, $callback);
}
}
/**
* Fire the attempt event with the arguments.
*
* @param array $credentials
* @param bool $remember
* @return void
*/
protected function fireAttemptEvent(array $credentials, $remember = false)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\Attempting(
$credentials, $remember
));
}
}
/**
* Fire the login event if the dispatcher is set.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param bool $remember
* @return void
*/
protected function fireLoginEvent($user, $remember = false)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\Login($user, $remember));
}
}
/**
* Fire the authenticated event if the dispatcher is set.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function fireAuthenticatedEvent($user)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\Authenticated($user));
}
}
/**
* Fire the failed authentication attempt event with the given arguments.
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param array $credentials
* @return void
*/
protected function fireFailedEvent($user, array $credentials)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\Failed($user, $credentials));
}
}
/**
* Get the last user we attempted to authenticate.
*
* @return \Illuminate\Contracts\Auth\Authenticatable
*/
public function getLastAttempted()
{
return $this->lastAttempted;
}
/**
* Get a unique identifier for the auth session value.
*
* @return string
*/
public function getName()
{
return 'login_'.$this->name.'_'.sha1(static::class);
}
/**
* Get the name of the cookie used to store the "recaller".
*
* @return string
*/
public function getRecallerName()
{
return 'remember_'.$this->name.'_'.sha1(static::class);
}
/**
* Determine if the user was authenticated via "remember me" cookie.
*
* @return bool
*/
public function viaRemember()
{
return $this->viaRemember;
}
/**
* Get the cookie creator instance used by the guard.
*
* @return \Illuminate\Contracts\Cookie\QueueingFactory
*
* @throws \RuntimeException
*/
public function getCookieJar()
{
if (! isset($this->cookie)) {
throw new RuntimeException('Cookie jar has not been set.');
}
return $this->cookie;
}
/**
* Set the cookie creator instance used by the guard.
*
* @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie
* @return void
*/
public function setCookieJar(CookieJar $cookie)
{
$this->cookie = $cookie;
}
/**
* Get the event dispatcher instance.
*
* @return \Illuminate\Contracts\Events\Dispatcher
*/
public function getDispatcher()
{
return $this->events;
}
/**
* Set the event dispatcher instance.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function setDispatcher(Dispatcher $events)
{
$this->events = $events;
}
/**
* Get the session store used by the guard.
*
* @return \Illuminate\Contracts\Session\Session
*/
public function getSession()
{
return $this->session;
}
/**
* Return the currently cached user.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public function getUser()
{
return $this->user;
}
/**
* Set the current user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return $this
*/
public function setUser(AuthenticatableContract $user)
{
$this->user = $user;
$this->loggedOut = false;
$this->fireAuthenticatedEvent($user);
return $this;
}
/**
* Get the current request instance.
*
* @return \Symfony\Component\HttpFoundation\Request
*/
public function getRequest()
{
return $this->request ?: Request::createFromGlobals();
}
/**
* Set the current request instance.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return $this
*/
public function setRequest(Request $request)
{
$this->request = $request;
return $this;
}
}

View File

@@ -1,204 +0,0 @@
<?php
namespace Illuminate\Broadcasting\Broadcasters;
use ReflectionFunction;
use Illuminate\Support\Str;
use Illuminate\Container\Container;
use Illuminate\Contracts\Routing\UrlRoutable;
use Illuminate\Contracts\Routing\BindingRegistrar;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract;
abstract class Broadcaster implements BroadcasterContract
{
/**
* The registered channel authenticators.
*
* @var array
*/
protected $channels = [];
/**
* The binding registrar instance.
*
* @var BindingRegistrar
*/
protected $bindingRegistrar;
/**
* Register a channel authenticator.
*
* @param string $channel
* @param callable $callback
* @return $this
*/
public function channel($channel, callable $callback)
{
$this->channels[$channel] = $callback;
return $this;
}
/**
* Authenticate the incoming request for a given channel.
*
* @param \Illuminate\Http\Request $request
* @param string $channel
* @return mixed
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/
protected function verifyUserCanAccessChannel($request, $channel)
{
foreach ($this->channels as $pattern => $callback) {
if (! Str::is(preg_replace('/\{(.*?)\}/', '*', $pattern), $channel)) {
continue;
}
$parameters = $this->extractAuthParameters($pattern, $channel, $callback);
if ($result = $callback($request->user(), ...$parameters)) {
return $this->validAuthenticationResponse($request, $result);
}
}
throw new AccessDeniedHttpException;
}
/**
* Extract the parameters from the given pattern and channel.
*
* @param string $pattern
* @param string $channel
* @param callable $callback
* @return array
*/
protected function extractAuthParameters($pattern, $channel, $callback)
{
$callbackParameters = (new ReflectionFunction($callback))->getParameters();
return collect($this->extractChannelKeys($pattern, $channel))->reject(function ($value, $key) {
return is_numeric($key);
})->map(function ($value, $key) use ($callbackParameters) {
return $this->resolveBinding($key, $value, $callbackParameters);
})->values()->all();
}
/**
* Extract the channel keys from the incoming channel name.
*
* @param string $pattern
* @param string $channel
* @return array
*/
protected function extractChannelKeys($pattern, $channel)
{
preg_match('/^'.preg_replace('/\{(.*?)\}/', '(?<$1>[^\.]+)', $pattern).'/', $channel, $keys);
return $keys;
}
/**
* Resolve the given parameter binding.
*
* @param string $key
* @param string $value
* @param array $callbackParameters
* @return mixed
*/
protected function resolveBinding($key, $value, $callbackParameters)
{
$newValue = $this->resolveExplicitBindingIfPossible($key, $value);
return $newValue === $value ? $this->resolveImplicitBindingIfPossible(
$key, $value, $callbackParameters
) : $newValue;
}
/**
* Resolve an explicit parameter binding if applicable.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function resolveExplicitBindingIfPossible($key, $value)
{
$binder = $this->binder();
if ($binder && $binder->getBindingCallback($key)) {
return call_user_func($binder->getBindingCallback($key), $value);
}
return $value;
}
/**
* Resolve an implicit parameter binding if applicable.
*
* @param string $key
* @param mixed $value
* @param array $callbackParameters
* @return mixed
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/
protected function resolveImplicitBindingIfPossible($key, $value, $callbackParameters)
{
foreach ($callbackParameters as $parameter) {
if (! $this->isImplicitlyBindable($key, $parameter)) {
continue;
}
$instance = $parameter->getClass()->newInstance();
if (! $model = $instance->resolveRouteBinding($value)) {
throw new AccessDeniedHttpException;
}
return $model;
}
return $value;
}
/**
* Determine if a given key and parameter is implicitly bindable.
*
* @param string $key
* @param \ReflectionParameter $parameter
* @return bool
*/
protected function isImplicitlyBindable($key, $parameter)
{
return $parameter->name === $key && $parameter->getClass() &&
$parameter->getClass()->isSubclassOf(UrlRoutable::class);
}
/**
* Format the channel array into an array of strings.
*
* @param array $channels
* @return array
*/
protected function formatChannels(array $channels)
{
return array_map(function ($channel) {
return (string) $channel;
}, $channels);
}
/**
* Get the model binding registrar instance.
*
* @return \Illuminate\Contracts\Routing\BindingRegistrar
*/
protected function binder()
{
if (! $this->bindingRegistrar) {
$this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class)
? Container::getInstance()->make(BindingRegistrar::class) : null;
}
return $this->bindingRegistrar;
}
}

View File

@@ -1,137 +0,0 @@
<?php
namespace Illuminate\Cache\Console;
use Illuminate\Console\Command;
use Illuminate\Cache\CacheManager;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'cache:clear';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Flush the application cache';
/**
* The cache manager instance.
*
* @var \Illuminate\Cache\CacheManager
*/
protected $cache;
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new cache clear command instance.
*
* @param \Illuminate\Cache\CacheManager $cache
* @param \Illuminate\Filesystem\Filesystem $files
* @return void
*/
public function __construct(CacheManager $cache, Filesystem $files)
{
parent::__construct();
$this->cache = $cache;
$this->files = $files;
}
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->laravel['events']->fire(
'cache:clearing', [$this->argument('store'), $this->tags()]
);
$this->cache()->flush();
$this->flushFacades();
$this->laravel['events']->fire(
'cache:cleared', [$this->argument('store'), $this->tags()]
);
$this->info('Cache cleared successfully.');
}
/**
* Flush the real-time facades stored in the cache directory.
*
* @return void
*/
public function flushFacades()
{
foreach ($this->files->files(storage_path('framework/cache')) as $file) {
if (preg_match('/facade-.*\.php$/', $file)) {
$this->files->delete($file);
}
}
}
/**
* Get the cache instance for the command.
*
* @return \Illuminate\Cache\Repository
*/
protected function cache()
{
$cache = $this->cache->store($this->argument('store'));
return empty($this->tags()) ? $cache : $cache->tags($this->tags());
}
/**
* Get the tags passed to the command.
*
* @return array
*/
protected function tags()
{
return array_filter(explode(',', $this->option('tags')));
}
/**
* Get the console command arguments.
*
* @return array
*/
protected function getArguments()
{
return [
['store', InputArgument::OPTIONAL, 'The name of the store you would like to clear.'],
];
}
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return [
['tags', null, InputOption::VALUE_OPTIONAL, 'The cache tags you would like to clear.', null],
];
}
}

View File

@@ -1,586 +0,0 @@
<?php
namespace Illuminate\Cache;
use Closure;
use ArrayAccess;
use DateTimeInterface;
use BadMethodCallException;
use Illuminate\Support\Carbon;
use Illuminate\Cache\Events\CacheHit;
use Illuminate\Contracts\Cache\Store;
use Illuminate\Cache\Events\KeyWritten;
use Illuminate\Cache\Events\CacheMissed;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Cache\Events\KeyForgotten;
use Illuminate\Support\InteractsWithTime;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Cache\Repository as CacheContract;
/**
* @mixin \Illuminate\Contracts\Cache\Store
*/
class Repository implements CacheContract, ArrayAccess
{
use InteractsWithTime;
use Macroable {
__call as macroCall;
}
/**
* The cache store implementation.
*
* @var \Illuminate\Contracts\Cache\Store
*/
protected $store;
/**
* The event dispatcher implementation.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* The default number of minutes to store items.
*
* @var float|int
*/
protected $default = 60;
/**
* Create a new cache repository instance.
*
* @param \Illuminate\Contracts\Cache\Store $store
* @return void
*/
public function __construct(Store $store)
{
$this->store = $store;
}
/**
* Determine if an item exists in the cache.
*
* @param string $key
* @return bool
*/
public function has($key)
{
return ! is_null($this->get($key));
}
/**
* Retrieve an item from the cache by key.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function get($key, $default = null)
{
if (is_array($key)) {
return $this->many($key);
}
$value = $this->store->get($this->itemKey($key));
// If we could not find the cache value, we will fire the missed event and get
// the default value for this cache value. This default could be a callback
// so we will execute the value function which will resolve it if needed.
if (is_null($value)) {
$this->event(new CacheMissed($key));
$value = value($default);
} else {
$this->event(new CacheHit($key, $value));
}
return $value;
}
/**
* Retrieve multiple items from the cache by key.
*
* Items not found in the cache will have a null value.
*
* @param array $keys
* @return array
*/
public function many(array $keys)
{
$values = $this->store->many(collect($keys)->map(function ($value, $key) {
return is_string($key) ? $key : $value;
})->values()->all());
return collect($values)->map(function ($value, $key) use ($keys) {
return $this->handleManyResult($keys, $key, $value);
})->all();
}
/**
* {@inheritdoc}
*/
public function getMultiple($keys, $default = null)
{
if (is_null($default)) {
return $this->many($keys);
}
foreach ($keys as $key) {
if (! isset($default[$key])) {
$default[$key] = null;
}
}
return $this->many($default);
}
/**
* Handle a result for the "many" method.
*
* @param array $keys
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function handleManyResult($keys, $key, $value)
{
// If we could not find the cache value, we will fire the missed event and get
// the default value for this cache value. This default could be a callback
// so we will execute the value function which will resolve it if needed.
if (is_null($value)) {
$this->event(new CacheMissed($key));
return isset($keys[$key]) ? value($keys[$key]) : null;
}
// If we found a valid value we will fire the "hit" event and return the value
// back from this function. The "hit" event gives developers an opportunity
// to listen for every possible cache "hit" throughout this applications.
$this->event(new CacheHit($key, $value));
return $value;
}
/**
* Retrieve an item from the cache and delete it.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function pull($key, $default = null)
{
return tap($this->get($key, $default), function ($value) use ($key) {
$this->forget($key);
});
}
/**
* Store an item in the cache.
*
* @param string $key
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|float|int $minutes
* @return void
*/
public function put($key, $value, $minutes = null)
{
if (is_array($key)) {
return $this->putMany($key, $value);
}
if (! is_null($minutes = $this->getMinutes($minutes))) {
$this->store->put($this->itemKey($key), $value, $minutes);
$this->event(new KeyWritten($key, $value, $minutes));
}
}
/**
* {@inheritdoc}
*/
public function set($key, $value, $ttl = null)
{
$this->put($key, $value, $ttl);
}
/**
* Store multiple items in the cache for a given number of minutes.
*
* @param array $values
* @param \DateTimeInterface|\DateInterval|float|int $minutes
* @return void
*/
public function putMany(array $values, $minutes)
{
if (! is_null($minutes = $this->getMinutes($minutes))) {
$this->store->putMany($values, $minutes);
foreach ($values as $key => $value) {
$this->event(new KeyWritten($key, $value, $minutes));
}
}
}
/**
* {@inheritdoc}
*/
public function setMultiple($values, $ttl = null)
{
$this->putMany($values, $ttl);
}
/**
* Store an item in the cache if the key does not exist.
*
* @param string $key
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|float|int $minutes
* @return bool
*/
public function add($key, $value, $minutes)
{
if (is_null($minutes = $this->getMinutes($minutes))) {
return false;
}
// If the store has an "add" method we will call the method on the store so it
// has a chance to override this logic. Some drivers better support the way
// this operation should work with a total "atomic" implementation of it.
if (method_exists($this->store, 'add')) {
return $this->store->add(
$this->itemKey($key), $value, $minutes
);
}
// If the value did not exist in the cache, we will put the value in the cache
// so it exists for subsequent requests. Then, we will return true so it is
// easy to know if the value gets added. Otherwise, we will return false.
if (is_null($this->get($key))) {
$this->put($key, $value, $minutes);
return true;
}
return false;
}
/**
* Increment the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @return int|bool
*/
public function increment($key, $value = 1)
{
return $this->store->increment($key, $value);
}
/**
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @return int|bool
*/
public function decrement($key, $value = 1)
{
return $this->store->decrement($key, $value);
}
/**
* Store an item in the cache indefinitely.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function forever($key, $value)
{
$this->store->forever($this->itemKey($key), $value);
$this->event(new KeyWritten($key, $value, 0));
}
/**
* Get an item from the cache, or store the default value.
*
* @param string $key
* @param \DateTimeInterface|\DateInterval|float|int $minutes
* @param \Closure $callback
* @return mixed
*/
public function remember($key, $minutes, Closure $callback)
{
$value = $this->get($key);
// If the item exists in the cache we will just return this immediately and if
// not we will execute the given Closure and cache the result of that for a
// given number of minutes so it's available for all subsequent requests.
if (! is_null($value)) {
return $value;
}
$this->put($key, $value = $callback(), $minutes);
return $value;
}
/**
* Get an item from the cache, or store the default value forever.
*
* @param string $key
* @param \Closure $callback
* @return mixed
*/
public function sear($key, Closure $callback)
{
return $this->rememberForever($key, $callback);
}
/**
* Get an item from the cache, or store the default value forever.
*
* @param string $key
* @param \Closure $callback
* @return mixed
*/
public function rememberForever($key, Closure $callback)
{
$value = $this->get($key);
// If the item exists in the cache we will just return this immediately and if
// not we will execute the given Closure and cache the result of that for a
// given number of minutes so it's available for all subsequent requests.
if (! is_null($value)) {
return $value;
}
$this->forever($key, $value = $callback());
return $value;
}
/**
* Remove an item from the cache.
*
* @param string $key
* @return bool
*/
public function forget($key)
{
return tap($this->store->forget($this->itemKey($key)), function () use ($key) {
$this->event(new KeyForgotten($key));
});
}
/**
* {@inheritdoc}
*/
public function delete($key)
{
return $this->forget($key);
}
/**
* {@inheritdoc}
*/
public function deleteMultiple($keys)
{
foreach ($keys as $key) {
$this->forget($key);
}
return true;
}
/**
* {@inheritdoc}
*/
public function clear()
{
return $this->store->flush();
}
/**
* Begin executing a new tags operation if the store supports it.
*
* @param array|mixed $names
* @return \Illuminate\Cache\TaggedCache
*
* @throws \BadMethodCallException
*/
public function tags($names)
{
if (! method_exists($this->store, 'tags')) {
throw new BadMethodCallException('This cache store does not support tagging.');
}
$cache = $this->store->tags($names);
if (! is_null($this->events)) {
$cache->setEventDispatcher($this->events);
}
return $cache->setDefaultCacheTime($this->default);
}
/**
* Format the key for a cache item.
*
* @param string $key
* @return string
*/
protected function itemKey($key)
{
return $key;
}
/**
* Get the default cache time.
*
* @return float|int
*/
public function getDefaultCacheTime()
{
return $this->default;
}
/**
* Set the default cache time in minutes.
*
* @param float|int $minutes
* @return $this
*/
public function setDefaultCacheTime($minutes)
{
$this->default = $minutes;
return $this;
}
/**
* Get the cache store implementation.
*
* @return \Illuminate\Contracts\Cache\Store
*/
public function getStore()
{
return $this->store;
}
/**
* Fire an event for this cache instance.
*
* @param string $event
* @return void
*/
protected function event($event)
{
if (isset($this->events)) {
$this->events->dispatch($event);
}
}
/**
* Set the event dispatcher instance.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function setEventDispatcher(Dispatcher $events)
{
$this->events = $events;
}
/**
* Determine if a cached value exists.
*
* @param string $key
* @return bool
*/
public function offsetExists($key)
{
return $this->has($key);
}
/**
* Retrieve an item from the cache by key.
*
* @param string $key
* @return mixed
*/
public function offsetGet($key)
{
return $this->get($key);
}
/**
* Store an item in the cache for the default time.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
{
$this->put($key, $value, $this->default);
}
/**
* Remove an item from the cache.
*
* @param string $key
* @return void
*/
public function offsetUnset($key)
{
$this->forget($key);
}
/**
* Calculate the number of minutes with the given duration.
*
* @param \DateTimeInterface|\DateInterval|float|int $duration
* @return float|int|null
*/
protected function getMinutes($duration)
{
$duration = $this->parseDateInterval($duration);
if ($duration instanceof DateTimeInterface) {
$duration = Carbon::now()->diffInSeconds(Carbon::createFromTimestamp($duration->getTimestamp()), false) / 60;
}
return (int) ($duration * 60) > 0 ? $duration : null;
}
/**
* Handle dynamic calls into macros or pass missing methods to the store.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}
return $this->store->$method(...$parameters);
}
/**
* Clone cache repository instance.
*
* @return void
*/
public function __clone()
{
$this->store = clone $this->store;
}
}

View File

@@ -1,172 +0,0 @@
<?php
namespace Illuminate\Container;
use Closure;
use ReflectionMethod;
use ReflectionFunction;
use InvalidArgumentException;
class BoundMethod
{
/**
* Call the given Closure / class@method and inject its dependencies.
*
* @param \Illuminate\Container\Container $container
* @param callable|string $callback
* @param array $parameters
* @param string|null $defaultMethod
* @return mixed
*/
public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
{
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return call_user_func_array(
$callback, static::getMethodDependencies($container, $callback, $parameters)
);
});
}
/**
* Call a string reference to a class using Class@method syntax.
*
* @param \Illuminate\Container\Container $container
* @param string $target
* @param array $parameters
* @param string|null $defaultMethod
* @return mixed
*
* @throws \InvalidArgumentException
*/
protected static function callClass($container, $target, array $parameters = [], $defaultMethod = null)
{
$segments = explode('@', $target);
// We will assume an @ sign is used to delimit the class name from the method
// name. We will split on this @ sign and then build a callable array that
// we can pass right back into the "call" method for dependency binding.
$method = count($segments) == 2
? $segments[1] : $defaultMethod;
if (is_null($method)) {
throw new InvalidArgumentException('Method not provided.');
}
return static::call(
$container, [$container->make($segments[0]), $method], $parameters
);
}
/**
* Call a method that has been bound to the container.
*
* @param \Illuminate\Container\Container $container
* @param callable $callback
* @param mixed $default
* @return mixed
*/
protected static function callBoundMethod($container, $callback, $default)
{
if (! is_array($callback)) {
return $default instanceof Closure ? $default() : $default;
}
// Here we need to turn the array callable into a Class@method string we can use to
// examine the container and see if there are any method bindings for this given
// method. If there are, we can call this method binding callback immediately.
$method = static::normalizeMethod($callback);
if ($container->hasMethodBinding($method)) {
return $container->callMethodBinding($method, $callback[0]);
}
return $default instanceof Closure ? $default() : $default;
}
/**
* Normalize the given callback into a Class@method string.
*
* @param callable $callback
* @return string
*/
protected static function normalizeMethod($callback)
{
$class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]);
return "{$class}@{$callback[1]}";
}
/**
* Get all dependencies for a given method.
*
* @param \Illuminate\Container\Container $container
* @param callable|string $callback
* @param array $parameters
* @return array
*/
protected static function getMethodDependencies($container, $callback, array $parameters = [])
{
$dependencies = [];
foreach (static::getCallReflector($callback)->getParameters() as $parameter) {
static::addDependencyForCallParameter($container, $parameter, $parameters, $dependencies);
}
return array_merge($dependencies, $parameters);
}
/**
* Get the proper reflection instance for the given callback.
*
* @param callable|string $callback
* @return \ReflectionFunctionAbstract
*/
protected static function getCallReflector($callback)
{
if (is_string($callback) && strpos($callback, '::') !== false) {
$callback = explode('::', $callback);
}
return is_array($callback)
? new ReflectionMethod($callback[0], $callback[1])
: new ReflectionFunction($callback);
}
/**
* Get the dependency for the given call parameter.
*
* @param \Illuminate\Container\Container $container
* @param \ReflectionParameter $parameter
* @param array $parameters
* @param array $dependencies
* @return mixed
*/
protected static function addDependencyForCallParameter($container, $parameter,
array &$parameters, &$dependencies)
{
if (array_key_exists($parameter->name, $parameters)) {
$dependencies[] = $parameters[$parameter->name];
unset($parameters[$parameter->name]);
} elseif ($parameter->getClass()) {
$dependencies[] = $container->make($parameter->getClass()->name);
} elseif ($parameter->isDefaultValueAvailable()) {
$dependencies[] = $parameter->getDefaultValue();
}
}
/**
* Determine if the given string is in Class@method syntax.
*
* @param mixed $callback
* @return bool
*/
protected static function isCallableWithAtSign($callback)
{
return is_string($callback) && strpos($callback, '@') !== false;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,253 +0,0 @@
<?php
namespace Illuminate\Database\Eloquent;
use ArrayAccess;
use Faker\Generator as Faker;
use Symfony\Component\Finder\Finder;
class Factory implements ArrayAccess
{
/**
* The model definitions in the container.
*
* @var array
*/
protected $definitions = [];
/**
* The registered model states.
*
* @var array
*/
protected $states = [];
/**
* The Faker instance for the builder.
*
* @var \Faker\Generator
*/
protected $faker;
/**
* Create a new factory instance.
*
* @param \Faker\Generator $faker
* @return void
*/
public function __construct(Faker $faker)
{
$this->faker = $faker;
}
/**
* Create a new factory container.
*
* @param \Faker\Generator $faker
* @param string|null $pathToFactories
* @return static
*/
public static function construct(Faker $faker, $pathToFactories = null)
{
$pathToFactories = $pathToFactories ?: database_path('factories');
return (new static($faker))->load($pathToFactories);
}
/**
* Define a class with a given short-name.
*
* @param string $class
* @param string $name
* @param callable $attributes
* @return $this
*/
public function defineAs($class, $name, callable $attributes)
{
return $this->define($class, $attributes, $name);
}
/**
* Define a class with a given set of attributes.
*
* @param string $class
* @param callable $attributes
* @param string $name
* @return $this
*/
public function define($class, callable $attributes, $name = 'default')
{
$this->definitions[$class][$name] = $attributes;
return $this;
}
/**
* Define a state with a given set of attributes.
*
* @param string $class
* @param string $state
* @param callable|array $attributes
* @return $this
*/
public function state($class, $state, $attributes)
{
$this->states[$class][$state] = $attributes;
return $this;
}
/**
* Create an instance of the given model and persist it to the database.
*
* @param string $class
* @param array $attributes
* @return mixed
*/
public function create($class, array $attributes = [])
{
return $this->of($class)->create($attributes);
}
/**
* Create an instance of the given model and type and persist it to the database.
*
* @param string $class
* @param string $name
* @param array $attributes
* @return mixed
*/
public function createAs($class, $name, array $attributes = [])
{
return $this->of($class, $name)->create($attributes);
}
/**
* Create an instance of the given model.
*
* @param string $class
* @param array $attributes
* @return mixed
*/
public function make($class, array $attributes = [])
{
return $this->of($class)->make($attributes);
}
/**
* Create an instance of the given model and type.
*
* @param string $class
* @param string $name
* @param array $attributes
* @return mixed
*/
public function makeAs($class, $name, array $attributes = [])
{
return $this->of($class, $name)->make($attributes);
}
/**
* Get the raw attribute array for a given named model.
*
* @param string $class
* @param string $name
* @param array $attributes
* @return array
*/
public function rawOf($class, $name, array $attributes = [])
{
return $this->raw($class, $attributes, $name);
}
/**
* Get the raw attribute array for a given model.
*
* @param string $class
* @param array $attributes
* @param string $name
* @return array
*/
public function raw($class, array $attributes = [], $name = 'default')
{
return array_merge(
call_user_func($this->definitions[$class][$name], $this->faker), $attributes
);
}
/**
* Create a builder for the given model.
*
* @param string $class
* @param string $name
* @return \Illuminate\Database\Eloquent\FactoryBuilder
*/
public function of($class, $name = 'default')
{
return new FactoryBuilder($class, $name, $this->definitions, $this->states, $this->faker);
}
/**
* Load factories from path.
*
* @param string $path
* @return $this
*/
public function load($path)
{
$factory = $this;
if (is_dir($path)) {
foreach (Finder::create()->files()->name('*.php')->in($path) as $file) {
require $file->getRealPath();
}
}
return $factory;
}
/**
* Determine if the given offset exists.
*
* @param string $offset
* @return bool
*/
public function offsetExists($offset)
{
return isset($this->definitions[$offset]);
}
/**
* Get the value of the given offset.
*
* @param string $offset
* @return mixed
*/
public function offsetGet($offset)
{
return $this->make($offset);
}
/**
* Set the given offset to the given value.
*
* @param string $offset
* @param callable $value
* @return void
*/
public function offsetSet($offset, $value)
{
return $this->define($offset, $value);
}
/**
* Unset the value at the given offset.
*
* @param string $offset
* @return void
*/
public function offsetUnset($offset)
{
unset($this->definitions[$offset]);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,172 +0,0 @@
<?php
namespace Illuminate\Foundation;
use Exception;
use Illuminate\Filesystem\Filesystem;
class PackageManifest
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
public $files;
/**
* The base path.
*
* @var string
*/
public $basePath;
/**
* The vendor path.
*
* @var string
*/
public $vendorPath;
/**
* The manifest path.
*
* @var string|null
*/
public $manifestPath;
/**
* The loaded manifest array.
*
* @var array
*/
public $manifest;
/**
* Create a new package manifest instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param string $basePath
* @param string $manifestPath
* @return void
*/
public function __construct(Filesystem $files, $basePath, $manifestPath)
{
$this->files = $files;
$this->basePath = $basePath;
$this->manifestPath = $manifestPath;
$this->vendorPath = $basePath.'/vendor';
}
/**
* Get all of the service provider class names for all packages.
*
* @return array
*/
public function providers()
{
return collect($this->getManifest())->flatMap(function ($configuration) {
return (array) ($configuration['providers'] ?? []);
})->filter()->all();
}
/**
* Get all of the aliases for all packages.
*
* @return array
*/
public function aliases()
{
return collect($this->getManifest())->flatMap(function ($configuration) {
return (array) ($configuration['aliases'] ?? []);
})->filter()->all();
}
/**
* Get the current package manifest.
*
* @return array
*/
protected function getManifest()
{
if (! is_null($this->manifest)) {
return $this->manifest;
}
if (! file_exists($this->manifestPath)) {
$this->build();
}
return $this->manifest = file_exists($this->manifestPath) ?
$this->files->getRequire($this->manifestPath) : [];
}
/**
* Build the manifest and write it to disk.
*
* @return void
*/
public function build()
{
$packages = [];
if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) {
$packages = json_decode($this->files->get($path), true);
}
$ignoreAll = in_array('*', $ignore = $this->packagesToIgnore());
$this->write(collect($packages)->mapWithKeys(function ($package) {
return [$this->format($package['name']) => $package['extra']['laravel'] ?? []];
})->each(function ($configuration) use (&$ignore) {
$ignore = array_merge($ignore, $configuration['dont-discover'] ?? []);
})->reject(function ($configuration, $package) use ($ignore, $ignoreAll) {
return $ignoreAll || in_array($package, $ignore);
})->filter()->all());
}
/**
* Format the given package name.
*
* @param string $package
* @return string
*/
protected function format($package)
{
return str_replace($this->vendorPath.'/', '', $package);
}
/**
* Get all of the package names that should be ignored.
*
* @return array
*/
protected function packagesToIgnore()
{
if (! file_exists($this->basePath.'/composer.json')) {
return [];
}
return json_decode(file_get_contents(
$this->basePath.'/composer.json'
), true)['extra']['laravel']['dont-discover'] ?? [];
}
/**
* Write the given manifest array to disk.
*
* @param array $manifest
* @return void
* @throws \Exception
*/
protected function write(array $manifest)
{
if (! is_writable(dirname($this->manifestPath))) {
throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.');
}
$this->files->put(
$this->manifestPath, '<?php return '.var_export($manifest, true).';'
);
}
}

View File

@@ -1,210 +0,0 @@
<?php
namespace Illuminate\Foundation;
use Exception;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;
class ProviderRepository
{
/**
* The application implementation.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $app;
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* The path to the manifest file.
*
* @var string
*/
protected $manifestPath;
/**
* Create a new service repository instance.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Filesystem\Filesystem $files
* @param string $manifestPath
* @return void
*/
public function __construct(ApplicationContract $app, Filesystem $files, $manifestPath)
{
$this->app = $app;
$this->files = $files;
$this->manifestPath = $manifestPath;
}
/**
* Register the application service providers.
*
* @param array $providers
* @return void
*/
public function load(array $providers)
{
$manifest = $this->loadManifest();
// First we will load the service manifest, which contains information on all
// service providers registered with the application and which services it
// provides. This is used to know which services are "deferred" loaders.
if ($this->shouldRecompile($manifest, $providers)) {
$manifest = $this->compileManifest($providers);
}
// Next, we will register events to load the providers for each of the events
// that it has requested. This allows the service provider to defer itself
// while still getting automatically loaded when a certain event occurs.
foreach ($manifest['when'] as $provider => $events) {
$this->registerLoadEvents($provider, $events);
}
// We will go ahead and register all of the eagerly loaded providers with the
// application so their services can be registered with the application as
// a provided service. Then we will set the deferred service list on it.
foreach ($manifest['eager'] as $provider) {
$this->app->register($provider);
}
$this->app->addDeferredServices($manifest['deferred']);
}
/**
* Load the service provider manifest JSON file.
*
* @return array|null
*/
public function loadManifest()
{
// The service manifest is a file containing a JSON representation of every
// service provided by the application and whether its provider is using
// deferred loading or should be eagerly loaded on each request to us.
if ($this->files->exists($this->manifestPath)) {
$manifest = $this->files->getRequire($this->manifestPath);
if ($manifest) {
return array_merge(['when' => []], $manifest);
}
}
}
/**
* Determine if the manifest should be compiled.
*
* @param array $manifest
* @param array $providers
* @return bool
*/
public function shouldRecompile($manifest, $providers)
{
return is_null($manifest) || $manifest['providers'] != $providers;
}
/**
* Register the load events for the given provider.
*
* @param string $provider
* @param array $events
* @return void
*/
protected function registerLoadEvents($provider, array $events)
{
if (count($events) < 1) {
return;
}
$this->app->make('events')->listen($events, function () use ($provider) {
$this->app->register($provider);
});
}
/**
* Compile the application service manifest file.
*
* @param array $providers
* @return array
*/
protected function compileManifest($providers)
{
// The service manifest should contain a list of all of the providers for
// the application so we can compare it on each request to the service
// and determine if the manifest should be recompiled or is current.
$manifest = $this->freshManifest($providers);
foreach ($providers as $provider) {
$instance = $this->createProvider($provider);
// When recompiling the service manifest, we will spin through each of the
// providers and check if it's a deferred provider or not. If so we'll
// add it's provided services to the manifest and note the provider.
if ($instance->isDeferred()) {
foreach ($instance->provides() as $service) {
$manifest['deferred'][$service] = $provider;
}
$manifest['when'][$provider] = $instance->when();
}
// If the service providers are not deferred, we will simply add it to an
// array of eagerly loaded providers that will get registered on every
// request to this application instead of "lazy" loading every time.
else {
$manifest['eager'][] = $provider;
}
}
return $this->writeManifest($manifest);
}
/**
* Create a fresh service manifest data structure.
*
* @param array $providers
* @return array
*/
protected function freshManifest(array $providers)
{
return ['providers' => $providers, 'eager' => [], 'deferred' => []];
}
/**
* Write the service manifest file to disk.
*
* @param array $manifest
* @return array
*
* @throws \Exception
*/
public function writeManifest($manifest)
{
if (! is_writable(dirname($this->manifestPath))) {
throw new Exception('The bootstrap/cache directory must be present and writable.');
}
$this->files->put(
$this->manifestPath, '<?php return '.var_export($manifest, true).';'
);
return array_merge(['when' => []], $manifest);
}
/**
* Create a new provider instance.
*
* @param string $provider
* @return \Illuminate\Support\ServiceProvider
*/
public function createProvider($provider)
{
return new $provider($this->app);
}
}

View File

@@ -1,624 +0,0 @@
<?php
namespace Illuminate\Http;
use Closure;
use ArrayAccess;
use RuntimeException;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Support\Arrayable;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class Request extends SymfonyRequest implements Arrayable, ArrayAccess
{
use Concerns\InteractsWithContentTypes,
Concerns\InteractsWithFlashData,
Concerns\InteractsWithInput,
Macroable;
/**
* The decoded JSON content for the request.
*
* @var \Symfony\Component\HttpFoundation\ParameterBag|null
*/
protected $json;
/**
* All of the converted files for the request.
*
* @var array
*/
protected $convertedFiles;
/**
* The user resolver callback.
*
* @var \Closure
*/
protected $userResolver;
/**
* The route resolver callback.
*
* @var \Closure
*/
protected $routeResolver;
/**
* Create a new Illuminate HTTP request from server variables.
*
* @return static
*/
public static function capture()
{
static::enableHttpMethodParameterOverride();
return static::createFromBase(SymfonyRequest::createFromGlobals());
}
/**
* Return the Request instance.
*
* @return $this
*/
public function instance()
{
return $this;
}
/**
* Get the request method.
*
* @return string
*/
public function method()
{
return $this->getMethod();
}
/**
* Get the root URL for the application.
*
* @return string
*/
public function root()
{
return rtrim($this->getSchemeAndHttpHost().$this->getBaseUrl(), '/');
}
/**
* Get the URL (no query string) for the request.
*
* @return string
*/
public function url()
{
return rtrim(preg_replace('/\?.*/', '', $this->getUri()), '/');
}
/**
* Get the full URL for the request.
*
* @return string
*/
public function fullUrl()
{
$query = $this->getQueryString();
$question = $this->getBaseUrl().$this->getPathInfo() == '/' ? '/?' : '?';
return $query ? $this->url().$question.$query : $this->url();
}
/**
* Get the full URL for the request with the added query string parameters.
*
* @param array $query
* @return string
*/
public function fullUrlWithQuery(array $query)
{
$question = $this->getBaseUrl().$this->getPathInfo() == '/' ? '/?' : '?';
return count($this->query()) > 0
? $this->url().$question.http_build_query(array_merge($this->query(), $query))
: $this->fullUrl().$question.http_build_query($query);
}
/**
* Get the current path info for the request.
*
* @return string
*/
public function path()
{
$pattern = trim($this->getPathInfo(), '/');
return $pattern == '' ? '/' : $pattern;
}
/**
* Get the current decoded path info for the request.
*
* @return string
*/
public function decodedPath()
{
return rawurldecode($this->path());
}
/**
* Get a segment from the URI (1 based index).
*
* @param int $index
* @param string|null $default
* @return string|null
*/
public function segment($index, $default = null)
{
return Arr::get($this->segments(), $index - 1, $default);
}
/**
* Get all of the segments for the request path.
*
* @return array
*/
public function segments()
{
$segments = explode('/', $this->decodedPath());
return array_values(array_filter($segments, function ($value) {
return $value !== '';
}));
}
/**
* Determine if the current request URI matches a pattern.
*
* @param dynamic $patterns
* @return bool
*/
public function is(...$patterns)
{
foreach ($patterns as $pattern) {
if (Str::is($pattern, $this->decodedPath())) {
return true;
}
}
return false;
}
/**
* Determine if the route name matches a given pattern.
*
* @param dynamic $patterns
* @return bool
*/
public function routeIs(...$patterns)
{
return $this->route() && $this->route()->named(...$patterns);
}
/**
* Determine if the current request URL and query string matches a pattern.
*
* @param dynamic $patterns
* @return bool
*/
public function fullUrlIs(...$patterns)
{
$url = $this->fullUrl();
foreach ($patterns as $pattern) {
if (Str::is($pattern, $url)) {
return true;
}
}
return false;
}
/**
* Determine if the request is the result of an AJAX call.
*
* @return bool
*/
public function ajax()
{
return $this->isXmlHttpRequest();
}
/**
* Determine if the request is the result of an PJAX call.
*
* @return bool
*/
public function pjax()
{
return $this->headers->get('X-PJAX') == true;
}
/**
* Determine if the request is over HTTPS.
*
* @return bool
*/
public function secure()
{
return $this->isSecure();
}
/**
* Get the client IP address.
*
* @return string
*/
public function ip()
{
return $this->getClientIp();
}
/**
* Get the client IP addresses.
*
* @return array
*/
public function ips()
{
return $this->getClientIps();
}
/**
* Get the client user agent.
*
* @return string
*/
public function userAgent()
{
return $this->headers->get('User-Agent');
}
/**
* Merge new input into the current request's input array.
*
* @param array $input
* @return \Illuminate\Http\Request
*/
public function merge(array $input)
{
$this->getInputSource()->add($input);
return $this;
}
/**
* Replace the input for the current request.
*
* @param array $input
* @return \Illuminate\Http\Request
*/
public function replace(array $input)
{
$this->getInputSource()->replace($input);
return $this;
}
/**
* Get the JSON payload for the request.
*
* @param string $key
* @param mixed $default
* @return \Symfony\Component\HttpFoundation\ParameterBag|mixed
*/
public function json($key = null, $default = null)
{
if (! isset($this->json)) {
$this->json = new ParameterBag((array) json_decode($this->getContent(), true));
}
if (is_null($key)) {
return $this->json;
}
return data_get($this->json->all(), $key, $default);
}
/**
* Get the input source for the request.
*
* @return \Symfony\Component\HttpFoundation\ParameterBag
*/
protected function getInputSource()
{
if ($this->isJson()) {
return $this->json();
}
return $this->getRealMethod() == 'GET' ? $this->query : $this->request;
}
/**
* Create an Illuminate request from a Symfony instance.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return \Illuminate\Http\Request
*/
public static function createFromBase(SymfonyRequest $request)
{
if ($request instanceof static) {
return $request;
}
$content = $request->content;
$request = (new static)->duplicate(
$request->query->all(), $request->request->all(), $request->attributes->all(),
$request->cookies->all(), $request->files->all(), $request->server->all()
);
$request->content = $content;
$request->request = $request->getInputSource();
return $request;
}
/**
* {@inheritdoc}
*/
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
{
return parent::duplicate($query, $request, $attributes, $cookies, $this->filterFiles($files), $server);
}
/**
* Filter the given array of files, removing any empty values.
*
* @param mixed $files
* @return mixed
*/
protected function filterFiles($files)
{
if (! $files) {
return;
}
foreach ($files as $key => $file) {
if (is_array($file)) {
$files[$key] = $this->filterFiles($files[$key]);
}
if (empty($files[$key])) {
unset($files[$key]);
}
}
return $files;
}
/**
* Get the session associated with the request.
*
* @return \Illuminate\Session\Store
*
* @throws \RuntimeException
*/
public function session()
{
if (! $this->hasSession()) {
throw new RuntimeException('Session store not set on request.');
}
return $this->getSession();
}
/**
* Set the session instance on the request.
*
* @param \Illuminate\Contracts\Session\Session $session
* @return void
*/
public function setLaravelSession($session)
{
$this->session = $session;
}
/**
* Get the user making the request.
*
* @param string|null $guard
* @return mixed
*/
public function user($guard = null)
{
return call_user_func($this->getUserResolver(), $guard);
}
/**
* Get the route handling the request.
*
* @param string|null $param
*
* @return \Illuminate\Routing\Route|object|string
*/
public function route($param = null)
{
$route = call_user_func($this->getRouteResolver());
if (is_null($route) || is_null($param)) {
return $route;
}
return $route->parameter($param);
}
/**
* Get a unique fingerprint for the request / route / IP address.
*
* @return string
*
* @throws \RuntimeException
*/
public function fingerprint()
{
if (! $route = $this->route()) {
throw new RuntimeException('Unable to generate fingerprint. Route unavailable.');
}
return sha1(implode('|', array_merge(
$route->methods(), [$route->getDomain(), $route->uri(), $this->ip()]
)));
}
/**
* Set the JSON payload for the request.
*
* @param \Symfony\Component\HttpFoundation\ParameterBag $json
* @return $this
*/
public function setJson($json)
{
$this->json = $json;
return $this;
}
/**
* Get the user resolver callback.
*
* @return \Closure
*/
public function getUserResolver()
{
return $this->userResolver ?: function () {
//
};
}
/**
* Set the user resolver callback.
*
* @param \Closure $callback
* @return $this
*/
public function setUserResolver(Closure $callback)
{
$this->userResolver = $callback;
return $this;
}
/**
* Get the route resolver callback.
*
* @return \Closure
*/
public function getRouteResolver()
{
return $this->routeResolver ?: function () {
//
};
}
/**
* Set the route resolver callback.
*
* @param \Closure $callback
* @return $this
*/
public function setRouteResolver(Closure $callback)
{
$this->routeResolver = $callback;
return $this;
}
/**
* Get all of the input and files for the request.
*
* @return array
*/
public function toArray()
{
return $this->all();
}
/**
* Determine if the given offset exists.
*
* @param string $offset
* @return bool
*/
public function offsetExists($offset)
{
return array_key_exists(
$offset, $this->all() + $this->route()->parameters()
);
}
/**
* Get the value at the given offset.
*
* @param string $offset
* @return mixed
*/
public function offsetGet($offset)
{
return $this->__get($offset);
}
/**
* Set the value at the given offset.
*
* @param string $offset
* @param mixed $value
* @return void
*/
public function offsetSet($offset, $value)
{
$this->getInputSource()->set($offset, $value);
}
/**
* Remove the value at the given offset.
*
* @param string $offset
* @return void
*/
public function offsetUnset($offset)
{
$this->getInputSource()->remove($offset);
}
/**
* Check if an input element is set on the request.
*
* @param string $key
* @return bool
*/
public function __isset($key)
{
return ! is_null($this->__get($key));
}
/**
* Get an input element from the request.
*
* @param string $key
* @return mixed
*/
public function __get($key)
{
if (array_key_exists($key, $this->all())) {
return data_get($this->all(), $key);
}
return $this->route($key);
}
}

View File

@@ -1,206 +0,0 @@
<?php
namespace Illuminate\Mail;
use Aws\Ses\SesClient;
use Illuminate\Support\Arr;
use Psr\Log\LoggerInterface;
use Illuminate\Support\Manager;
use GuzzleHttp\Client as HttpClient;
use Swift_SmtpTransport as SmtpTransport;
use Illuminate\Mail\Transport\LogTransport;
use Illuminate\Mail\Transport\SesTransport;
use Illuminate\Mail\Transport\ArrayTransport;
use Swift_SendmailTransport as MailTransport;
use Illuminate\Mail\Transport\MailgunTransport;
use Illuminate\Mail\Transport\MandrillTransport;
use Illuminate\Mail\Transport\SparkPostTransport;
use Swift_SendmailTransport as SendmailTransport;
class TransportManager extends Manager
{
/**
* Create an instance of the SMTP Swift Transport driver.
*
* @return \Swift_SmtpTransport
*/
protected function createSmtpDriver()
{
$config = $this->app->make('config')->get('mail');
// The Swift SMTP transport instance will allow us to use any SMTP backend
// for delivering mail such as Sendgrid, Amazon SES, or a custom server
// a developer has available. We will just pass this configured host.
$transport = new SmtpTransport($config['host'], $config['port']);
if (isset($config['encryption'])) {
$transport->setEncryption($config['encryption']);
}
// Once we have the transport we will check for the presence of a username
// and password. If we have it we will set the credentials on the Swift
// transporter instance so that we'll properly authenticate delivery.
if (isset($config['username'])) {
$transport->setUsername($config['username']);
$transport->setPassword($config['password']);
}
// Next we will set any stream context options specified for the transport
// and then return it. The option is not required any may not be inside
// the configuration array at all so we'll verify that before adding.
if (isset($config['stream'])) {
$transport->setStreamOptions($config['stream']);
}
return $transport;
}
/**
* Create an instance of the Sendmail Swift Transport driver.
*
* @return \Swift_SendmailTransport
*/
protected function createSendmailDriver()
{
return new SendmailTransport($this->app['config']['mail']['sendmail']);
}
/**
* Create an instance of the Amazon SES Swift Transport driver.
*
* @return \Swift_SendmailTransport
*/
protected function createSesDriver()
{
$config = array_merge($this->app['config']->get('services.ses', []), [
'version' => 'latest', 'service' => 'email',
]);
return new SesTransport(new SesClient(
$this->addSesCredentials($config)
));
}
/**
* Add the SES credentials to the configuration array.
*
* @param array $config
* @return array
*/
protected function addSesCredentials(array $config)
{
if ($config['key'] && $config['secret']) {
$config['credentials'] = Arr::only($config, ['key', 'secret']);
}
return $config;
}
/**
* Create an instance of the Mail Swift Transport driver.
*
* @return \Swift_SendmailTransport
*/
protected function createMailDriver()
{
return new MailTransport;
}
/**
* Create an instance of the Mailgun Swift Transport driver.
*
* @return \Illuminate\Mail\Transport\MailgunTransport
*/
protected function createMailgunDriver()
{
$config = $this->app['config']->get('services.mailgun', []);
return new MailgunTransport(
$this->guzzle($config),
$config['secret'], $config['domain']
);
}
/**
* Create an instance of the Mandrill Swift Transport driver.
*
* @return \Illuminate\Mail\Transport\MandrillTransport
*/
protected function createMandrillDriver()
{
$config = $this->app['config']->get('services.mandrill', []);
return new MandrillTransport(
$this->guzzle($config), $config['secret']
);
}
/**
* Create an instance of the SparkPost Swift Transport driver.
*
* @return \Illuminate\Mail\Transport\SparkPostTransport
*/
protected function createSparkPostDriver()
{
$config = $this->app['config']->get('services.sparkpost', []);
return new SparkPostTransport(
$this->guzzle($config), $config['secret'], $config['options'] ?? []
);
}
/**
* Create an instance of the Log Swift Transport driver.
*
* @return \Illuminate\Mail\Transport\LogTransport
*/
protected function createLogDriver()
{
return new LogTransport($this->app->make(LoggerInterface::class));
}
/**
* Create an instance of the Array Swift Transport Driver.
*
* @return \Illuminate\Mail\Transport\ArrayTransport
*/
protected function createArrayDriver()
{
return new ArrayTransport;
}
/**
* Get a fresh Guzzle HTTP client instance.
*
* @param array $config
* @return \GuzzleHttp\Client
*/
protected function guzzle($config)
{
return new HttpClient(Arr::add(
$config['guzzle'] ?? [], 'connect_timeout', 60
));
}
/**
* Get the default mail driver name.
*
* @return string
*/
public function getDefaultDriver()
{
return $this->app['config']['mail.driver'];
}
/**
* Set the default mail driver name.
*
* @param string $name
* @return void
*/
public function setDefaultDriver($name)
{
$this->app['config']['mail.driver'] = $name;
}
}

View File

@@ -1,589 +0,0 @@
<?php
namespace Illuminate\Pagination;
use Closure;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Support\Htmlable;
/**
* @mixin \Illuminate\Support\Collection
*/
abstract class AbstractPaginator implements Htmlable
{
/**
* All of the items being paginated.
*
* @var \Illuminate\Support\Collection
*/
protected $items;
/**
* The number of items to be shown per page.
*
* @var int
*/
protected $perPage;
/**
* The current page being "viewed".
*
* @var int
*/
protected $currentPage;
/**
* The base path to assign to all URLs.
*
* @var string
*/
protected $path = '/';
/**
* The query parameters to add to all URLs.
*
* @var array
*/
protected $query = [];
/**
* The URL fragment to add to all URLs.
*
* @var string|null
*/
protected $fragment;
/**
* The query string variable used to store the page.
*
* @var string
*/
protected $pageName = 'page';
/**
* The current path resolver callback.
*
* @var \Closure
*/
protected static $currentPathResolver;
/**
* The current page resolver callback.
*
* @var \Closure
*/
protected static $currentPageResolver;
/**
* The view factory resolver callback.
*
* @var \Closure
*/
protected static $viewFactoryResolver;
/**
* The default pagination view.
*
* @var string
*/
public static $defaultView = 'pagination::default';
/**
* The default "simple" pagination view.
*
* @var string
*/
public static $defaultSimpleView = 'pagination::simple-default';
/**
* Determine if the given value is a valid page number.
*
* @param int $page
* @return bool
*/
protected function isValidPageNumber($page)
{
return $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false;
}
/**
* Get the URL for the previous page.
*
* @return string|null
*/
public function previousPageUrl()
{
if ($this->currentPage() > 1) {
return $this->url($this->currentPage() - 1);
}
}
/**
* Create a range of pagination URLs.
*
* @param int $start
* @param int $end
* @return array
*/
public function getUrlRange($start, $end)
{
return collect(range($start, $end))->mapWithKeys(function ($page) {
return [$page => $this->url($page)];
})->all();
}
/**
* Get the URL for a given page number.
*
* @param int $page
* @return string
*/
public function url($page)
{
if ($page <= 0) {
$page = 1;
}
// If we have any extra query string key / value pairs that need to be added
// onto the URL, we will put them in query string form and then attach it
// to the URL. This allows for extra information like sortings storage.
$parameters = [$this->pageName => $page];
if (count($this->query) > 0) {
$parameters = array_merge($this->query, $parameters);
}
return $this->path
.(Str::contains($this->path, '?') ? '&' : '?')
.http_build_query($parameters, '', '&')
.$this->buildFragment();
}
/**
* Get / set the URL fragment to be appended to URLs.
*
* @param string|null $fragment
* @return $this|string|null
*/
public function fragment($fragment = null)
{
if (is_null($fragment)) {
return $this->fragment;
}
$this->fragment = $fragment;
return $this;
}
/**
* Add a set of query string values to the paginator.
*
* @param array|string $key
* @param string|null $value
* @return $this
*/
public function appends($key, $value = null)
{
if (is_array($key)) {
return $this->appendArray($key);
}
return $this->addQuery($key, $value);
}
/**
* Add an array of query string values.
*
* @param array $keys
* @return $this
*/
protected function appendArray(array $keys)
{
foreach ($keys as $key => $value) {
$this->addQuery($key, $value);
}
return $this;
}
/**
* Add a query string value to the paginator.
*
* @param string $key
* @param string $value
* @return $this
*/
protected function addQuery($key, $value)
{
if ($key !== $this->pageName) {
$this->query[$key] = $value;
}
return $this;
}
/**
* Build the full fragment portion of a URL.
*
* @return string
*/
protected function buildFragment()
{
return $this->fragment ? '#'.$this->fragment : '';
}
/**
* Get the slice of items being paginated.
*
* @return array
*/
public function items()
{
return $this->items->all();
}
/**
* Get the number of the first item in the slice.
*
* @return int
*/
public function firstItem()
{
return count($this->items) > 0 ? ($this->currentPage - 1) * $this->perPage + 1 : null;
}
/**
* Get the number of the last item in the slice.
*
* @return int
*/
public function lastItem()
{
return count($this->items) > 0 ? $this->firstItem() + $this->count() - 1 : null;
}
/**
* Get the number of items shown per page.
*
* @return int
*/
public function perPage()
{
return $this->perPage;
}
/**
* Determine if there are enough items to split into multiple pages.
*
* @return bool
*/
public function hasPages()
{
return $this->currentPage() != 1 || $this->hasMorePages();
}
/**
* Determine if the paginator is on the first page.
*
* @return bool
*/
public function onFirstPage()
{
return $this->currentPage() <= 1;
}
/**
* Get the current page.
*
* @return int
*/
public function currentPage()
{
return $this->currentPage;
}
/**
* Get the query string variable used to store the page.
*
* @return string
*/
public function getPageName()
{
return $this->pageName;
}
/**
* Set the query string variable used to store the page.
*
* @param string $name
* @return $this
*/
public function setPageName($name)
{
$this->pageName = $name;
return $this;
}
/**
* Set the base path to assign to all URLs.
*
* @param string $path
* @return $this
*/
public function withPath($path)
{
return $this->setPath($path);
}
/**
* Set the base path to assign to all URLs.
*
* @param string $path
* @return $this
*/
public function setPath($path)
{
$this->path = $path;
return $this;
}
/**
* Resolve the current request path or return the default value.
*
* @param string $default
* @return string
*/
public static function resolveCurrentPath($default = '/')
{
if (isset(static::$currentPathResolver)) {
return call_user_func(static::$currentPathResolver);
}
return $default;
}
/**
* Set the current request path resolver callback.
*
* @param \Closure $resolver
* @return void
*/
public static function currentPathResolver(Closure $resolver)
{
static::$currentPathResolver = $resolver;
}
/**
* Resolve the current page or return the default value.
*
* @param string $pageName
* @param int $default
* @return int
*/
public static function resolveCurrentPage($pageName = 'page', $default = 1)
{
if (isset(static::$currentPageResolver)) {
return call_user_func(static::$currentPageResolver, $pageName);
}
return $default;
}
/**
* Set the current page resolver callback.
*
* @param \Closure $resolver
* @return void
*/
public static function currentPageResolver(Closure $resolver)
{
static::$currentPageResolver = $resolver;
}
/**
* Get an instance of the view factory from the resolver.
*
* @return \Illuminate\Contracts\View\Factory
*/
public static function viewFactory()
{
return call_user_func(static::$viewFactoryResolver);
}
/**
* Set the view factory resolver callback.
*
* @param \Closure $resolver
* @return void
*/
public static function viewFactoryResolver(Closure $resolver)
{
static::$viewFactoryResolver = $resolver;
}
/**
* Set the default pagination view.
*
* @param string $view
* @return void
*/
public static function defaultView($view)
{
static::$defaultView = $view;
}
/**
* Set the default "simple" pagination view.
*
* @param string $view
* @return void
*/
public static function defaultSimpleView($view)
{
static::$defaultSimpleView = $view;
}
/**
* Get an iterator for the items.
*
* @return \ArrayIterator
*/
public function getIterator()
{
return $this->items->getIterator();
}
/**
* Determine if the list of items is empty or not.
*
* @return bool
*/
public function isEmpty()
{
return $this->items->isEmpty();
}
/**
* Determine if the list of items is not empty.
*
* @return bool
*/
public function isNotEmpty()
{
return $this->items->isNotEmpty();
}
/**
* Get the number of items for the current page.
*
* @return int
*/
public function count()
{
return $this->items->count();
}
/**
* Get the paginator's underlying collection.
*
* @return \Illuminate\Support\Collection
*/
public function getCollection()
{
return $this->items;
}
/**
* Set the paginator's underlying collection.
*
* @param \Illuminate\Support\Collection $collection
* @return $this
*/
public function setCollection(Collection $collection)
{
$this->items = $collection;
return $this;
}
/**
* Determine if the given item exists.
*
* @param mixed $key
* @return bool
*/
public function offsetExists($key)
{
return $this->items->has($key);
}
/**
* Get the item at the given offset.
*
* @param mixed $key
* @return mixed
*/
public function offsetGet($key)
{
return $this->items->get($key);
}
/**
* Set the item at the given offset.
*
* @param mixed $key
* @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
{
$this->items->put($key, $value);
}
/**
* Unset the item at the given key.
*
* @param mixed $key
* @return void
*/
public function offsetUnset($key)
{
$this->items->forget($key);
}
/**
* Render the contents of the paginator to HTML.
*
* @return string
*/
public function toHtml()
{
return (string) $this->render();
}
/**
* Make dynamic calls into the collection.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->getCollection()->$method(...$parameters);
}
/**
* Render the contents of the paginator when casting to string.
*
* @return string
*/
public function __toString()
{
return (string) $this->render();
}
}

View File

@@ -1,199 +0,0 @@
<?php
namespace Illuminate\Pagination;
use Countable;
use ArrayAccess;
use JsonSerializable;
use IteratorAggregate;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Pagination\LengthAwarePaginator as LengthAwarePaginatorContract;
class LengthAwarePaginator extends AbstractPaginator implements Arrayable, ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Jsonable, LengthAwarePaginatorContract
{
/**
* The total number of items before slicing.
*
* @var int
*/
protected $total;
/**
* The last available page.
*
* @var int
*/
protected $lastPage;
/**
* Create a new paginator instance.
*
* @param mixed $items
* @param int $total
* @param int $perPage
* @param int|null $currentPage
* @param array $options (path, query, fragment, pageName)
* @return void
*/
public function __construct($items, $total, $perPage, $currentPage = null, array $options = [])
{
foreach ($options as $key => $value) {
$this->{$key} = $value;
}
$this->total = $total;
$this->perPage = $perPage;
$this->lastPage = max((int) ceil($total / $perPage), 1);
$this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path;
$this->currentPage = $this->setCurrentPage($currentPage, $this->pageName);
$this->items = $items instanceof Collection ? $items : Collection::make($items);
}
/**
* Get the current page for the request.
*
* @param int $currentPage
* @param string $pageName
* @return int
*/
protected function setCurrentPage($currentPage, $pageName)
{
$currentPage = $currentPage ?: static::resolveCurrentPage($pageName);
return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1;
}
/**
* Render the paginator using the given view.
*
* @param string|null $view
* @param array $data
* @return \Illuminate\Support\HtmlString
*/
public function links($view = null, $data = [])
{
return $this->render($view, $data);
}
/**
* Render the paginator using the given view.
*
* @param string|null $view
* @param array $data
* @return \Illuminate\Support\HtmlString
*/
public function render($view = null, $data = [])
{
return new HtmlString(static::viewFactory()->make($view ?: static::$defaultView, array_merge($data, [
'paginator' => $this,
'elements' => $this->elements(),
]))->render());
}
/**
* Get the array of elements to pass to the view.
*
* @return array
*/
protected function elements()
{
$window = UrlWindow::make($this);
return array_filter([
$window['first'],
is_array($window['slider']) ? '...' : null,
$window['slider'],
is_array($window['last']) ? '...' : null,
$window['last'],
]);
}
/**
* Get the total number of items being paginated.
*
* @return int
*/
public function total()
{
return $this->total;
}
/**
* Determine if there are more items in the data source.
*
* @return bool
*/
public function hasMorePages()
{
return $this->currentPage() < $this->lastPage();
}
/**
* Get the URL for the next page.
*
* @return string|null
*/
public function nextPageUrl()
{
if ($this->lastPage() > $this->currentPage()) {
return $this->url($this->currentPage() + 1);
}
}
/**
* Get the last page.
*
* @return int
*/
public function lastPage()
{
return $this->lastPage;
}
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray()
{
return [
'current_page' => $this->currentPage(),
'data' => $this->items->toArray(),
'first_page_url' => $this->url(1),
'from' => $this->firstItem(),
'last_page' => $this->lastPage(),
'last_page_url' => $this->url($this->lastPage()),
'next_page_url' => $this->nextPageUrl(),
'path' => $this->path,
'per_page' => $this->perPage(),
'prev_page_url' => $this->previousPageUrl(),
'to' => $this->lastItem(),
'total' => $this->total(),
];
}
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function jsonSerialize()
{
return $this->toArray();
}
/**
* Convert the object to its JSON representation.
*
* @param int $options
* @return string
*/
public function toJson($options = 0)
{
return json_encode($this->jsonSerialize(), $options);
}
}

View File

@@ -1,177 +0,0 @@
<?php
namespace Illuminate\Pagination;
use Countable;
use ArrayAccess;
use JsonSerializable;
use IteratorAggregate;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract;
class Paginator extends AbstractPaginator implements Arrayable, ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Jsonable, PaginatorContract
{
/**
* Determine if there are more items in the data source.
*
* @return bool
*/
protected $hasMore;
/**
* Create a new paginator instance.
*
* @param mixed $items
* @param int $perPage
* @param int|null $currentPage
* @param array $options (path, query, fragment, pageName)
* @return void
*/
public function __construct($items, $perPage, $currentPage = null, array $options = [])
{
foreach ($options as $key => $value) {
$this->{$key} = $value;
}
$this->perPage = $perPage;
$this->currentPage = $this->setCurrentPage($currentPage);
$this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path;
$this->setItems($items);
}
/**
* Get the current page for the request.
*
* @param int $currentPage
* @return int
*/
protected function setCurrentPage($currentPage)
{
$currentPage = $currentPage ?: static::resolveCurrentPage();
return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1;
}
/**
* Set the items for the paginator.
*
* @param mixed $items
* @return void
*/
protected function setItems($items)
{
$this->items = $items instanceof Collection ? $items : Collection::make($items);
$this->hasMore = $this->items->count() > $this->perPage;
$this->items = $this->items->slice(0, $this->perPage);
}
/**
* Get the URL for the next page.
*
* @return string|null
*/
public function nextPageUrl()
{
if ($this->hasMorePages()) {
return $this->url($this->currentPage() + 1);
}
}
/**
* Render the paginator using the given view.
*
* @param string|null $view
* @param array $data
* @return string
*/
public function links($view = null, $data = [])
{
return $this->render($view, $data);
}
/**
* Render the paginator using the given view.
*
* @param string|null $view
* @param array $data
* @return string
*/
public function render($view = null, $data = [])
{
return new HtmlString(
static::viewFactory()->make($view ?: static::$defaultSimpleView, array_merge($data, [
'paginator' => $this,
]))->render()
);
}
/**
* Manually indicate that the paginator does have more pages.
*
* @param bool $hasMore
* @return $this
*/
public function hasMorePagesWhen($hasMore = true)
{
$this->hasMore = $hasMore;
return $this;
}
/**
* Determine if there are more items in the data source.
*
* @return bool
*/
public function hasMorePages()
{
return $this->hasMore;
}
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray()
{
return [
'current_page' => $this->currentPage(),
'data' => $this->items->toArray(),
'first_page_url' => $this->url(1),
'from' => $this->firstItem(),
'next_page_url' => $this->nextPageUrl(),
'path' => $this->path,
'per_page' => $this->perPage(),
'prev_page_url' => $this->previousPageUrl(),
'to' => $this->lastItem(),
];
}
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function jsonSerialize()
{
return $this->toArray();
}
/**
* Convert the object to its JSON representation.
*
* @param int $options
* @return string
*/
public function toJson($options = 0)
{
return json_encode($this->jsonSerialize(), $options);
}
}

View File

@@ -1,70 +0,0 @@
<?php
namespace Illuminate\Routing;
use BadMethodCallException;
abstract class Controller
{
/**
* The middleware registered on the controller.
*
* @var array
*/
protected $middleware = [];
/**
* Register middleware on the controller.
*
* @param array|string|\Closure $middleware
* @param array $options
* @return \Illuminate\Routing\ControllerMiddlewareOptions
*/
public function middleware($middleware, array $options = [])
{
foreach ((array) $middleware as $m) {
$this->middleware[] = [
'middleware' => $m,
'options' => &$options,
];
}
return new ControllerMiddlewareOptions($options);
}
/**
* Get the middleware assigned to the controller.
*
* @return array
*/
public function getMiddleware()
{
return $this->middleware;
}
/**
* Execute an action on the controller.
*
* @param string $method
* @param array $parameters
* @return \Symfony\Component\HttpFoundation\Response
*/
public function callAction($method, $parameters)
{
return call_user_func_array([$this, $method], $parameters);
}
/**
* Handle calls to missing methods on the controller.
*
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{
throw new BadMethodCallException("Method [{$method}] does not exist on [".get_class($this).'].');
}
}

View File

@@ -1,351 +0,0 @@
<?php
namespace Illuminate\Routing;
use Countable;
use ArrayIterator;
use IteratorAggregate;
use Illuminate\Support\Arr;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
class RouteCollection implements Countable, IteratorAggregate
{
/**
* An array of the routes keyed by method.
*
* @var array
*/
protected $routes = [];
/**
* An flattened array of all of the routes.
*
* @var array
*/
protected $allRoutes = [];
/**
* A look-up table of routes by their names.
*
* @var array
*/
protected $nameList = [];
/**
* A look-up table of routes by controller action.
*
* @var array
*/
protected $actionList = [];
/**
* Add a Route instance to the collection.
*
* @param \Illuminate\Routing\Route $route
* @return \Illuminate\Routing\Route
*/
public function add(Route $route)
{
$this->addToCollections($route);
$this->addLookups($route);
return $route;
}
/**
* Add the given route to the arrays of routes.
*
* @param \Illuminate\Routing\Route $route
* @return void
*/
protected function addToCollections($route)
{
$domainAndUri = $route->getDomain().$route->uri();
foreach ($route->methods() as $method) {
$this->routes[$method][$domainAndUri] = $route;
}
$this->allRoutes[$method.$domainAndUri] = $route;
}
/**
* Add the route to any look-up tables if necessary.
*
* @param \Illuminate\Routing\Route $route
* @return void
*/
protected function addLookups($route)
{
// If the route has a name, we will add it to the name look-up table so that we
// will quickly be able to find any route associate with a name and not have
// to iterate through every route every time we need to perform a look-up.
$action = $route->getAction();
if (isset($action['as'])) {
$this->nameList[$action['as']] = $route;
}
// When the route is routing to a controller we will also store the action that
// is used by the route. This will let us reverse route to controllers while
// processing a request and easily generate URLs to the given controllers.
if (isset($action['controller'])) {
$this->addToActionList($action, $route);
}
}
/**
* Add a route to the controller action dictionary.
*
* @param array $action
* @param \Illuminate\Routing\Route $route
* @return void
*/
protected function addToActionList($action, $route)
{
$this->actionList[trim($action['controller'], '\\')] = $route;
}
/**
* Refresh the name look-up table.
*
* This is done in case any names are fluently defined or if routes are overwritten.
*
* @return void
*/
public function refreshNameLookups()
{
$this->nameList = [];
foreach ($this->allRoutes as $route) {
if ($route->getName()) {
$this->nameList[$route->getName()] = $route;
}
}
}
/**
* Refresh the action look-up table.
*
* This is done in case any actions are overwritten with new controllers.
*
* @return void
*/
public function refreshActionLookups()
{
$this->actionList = [];
foreach ($this->allRoutes as $route) {
if (isset($route->getAction()['controller'])) {
$this->addToActionList($route->getAction(), $route);
}
}
}
/**
* Find the first route matching a given request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public function match(Request $request)
{
$routes = $this->get($request->getMethod());
// First, we will see if we can find a matching route for this current request
// method. If we can, great, we can just return it so that it can be called
// by the consumer. Otherwise we will check for routes with another verb.
$route = $this->matchAgainstRoutes($routes, $request);
if (! is_null($route)) {
return $route->bind($request);
}
// If no route was found we will now check if a matching route is specified by
// another HTTP verb. If it is we will need to throw a MethodNotAllowed and
// inform the user agent of which HTTP verb it should use for this route.
$others = $this->checkForAlternateVerbs($request);
if (count($others) > 0) {
return $this->getRouteForMethods($request, $others);
}
throw new NotFoundHttpException;
}
/**
* Determine if a route in the array matches the request.
*
* @param array $routes
* @param \Illuminate\http\Request $request
* @param bool $includingMethod
* @return \Illuminate\Routing\Route|null
*/
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true)
{
list($fallbacks, $routes) = collect($routes)->partition(function ($route) {
return $route->isFallback;
});
return $routes->merge($fallbacks)->first(function ($value) use ($request, $includingMethod) {
return $value->matches($request, $includingMethod);
});
}
/**
* Determine if any routes match on another HTTP verb.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
protected function checkForAlternateVerbs($request)
{
$methods = array_diff(Router::$verbs, [$request->getMethod()]);
// Here we will spin through all verbs except for the current request verb and
// check to see if any routes respond to them. If they do, we will return a
// proper error response with the correct headers on the response string.
$others = [];
foreach ($methods as $method) {
if (! is_null($this->matchAgainstRoutes($this->get($method), $request, false))) {
$others[] = $method;
}
}
return $others;
}
/**
* Get a route (if necessary) that responds when other available methods are present.
*
* @param \Illuminate\Http\Request $request
* @param array $methods
* @return \Illuminate\Routing\Route
*
* @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
*/
protected function getRouteForMethods($request, array $methods)
{
if ($request->method() == 'OPTIONS') {
return (new Route('OPTIONS', $request->path(), function () use ($methods) {
return new Response('', 200, ['Allow' => implode(',', $methods)]);
}))->bind($request);
}
$this->methodNotAllowed($methods);
}
/**
* Throw a method not allowed HTTP exception.
*
* @param array $others
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
*/
protected function methodNotAllowed(array $others)
{
throw new MethodNotAllowedHttpException($others);
}
/**
* Get routes from the collection by method.
*
* @param string|null $method
* @return array
*/
public function get($method = null)
{
return is_null($method) ? $this->getRoutes() : Arr::get($this->routes, $method, []);
}
/**
* Determine if the route collection contains a given named route.
*
* @param string $name
* @return bool
*/
public function hasNamedRoute($name)
{
return ! is_null($this->getByName($name));
}
/**
* Get a route instance by its name.
*
* @param string $name
* @return \Illuminate\Routing\Route|null
*/
public function getByName($name)
{
return $this->nameList[$name] ?? null;
}
/**
* Get a route instance by its controller action.
*
* @param string $action
* @return \Illuminate\Routing\Route|null
*/
public function getByAction($action)
{
return $this->actionList[$action] ?? null;
}
/**
* Get all of the routes in the collection.
*
* @return array
*/
public function getRoutes()
{
return array_values($this->allRoutes);
}
/**
* Get all of the routes keyed by their HTTP verb / method.
*
* @return array
*/
public function getRoutesByMethod()
{
return $this->routes;
}
/**
* Get all of the routes keyed by their name.
*
* @return array
*/
public function getRoutesByName()
{
return $this->nameList;
}
/**
* Get an iterator for the items.
*
* @return \ArrayIterator
*/
public function getIterator()
{
return new ArrayIterator($this->getRoutes());
}
/**
* Count the number of items in the collection.
*
* @return int
*/
public function count()
{
return count($this->getRoutes());
}
}

View File

@@ -1,111 +0,0 @@
<?php
namespace Illuminate\Routing;
use ReflectionMethod;
use ReflectionParameter;
use Illuminate\Support\Arr;
use ReflectionFunctionAbstract;
trait RouteDependencyResolverTrait
{
/**
* Resolve the object method's type-hinted dependencies.
*
* @param array $parameters
* @param object $instance
* @param string $method
* @return array
*/
protected function resolveClassMethodDependencies(array $parameters, $instance, $method)
{
if (! method_exists($instance, $method)) {
return $parameters;
}
return $this->resolveMethodDependencies(
$parameters, new ReflectionMethod($instance, $method)
);
}
/**
* Resolve the given method's type-hinted dependencies.
*
* @param array $parameters
* @param \ReflectionFunctionAbstract $reflector
* @return array
*/
public function resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector)
{
$instanceCount = 0;
$values = array_values($parameters);
foreach ($reflector->getParameters() as $key => $parameter) {
$instance = $this->transformDependency(
$parameter, $parameters
);
if (! is_null($instance)) {
$instanceCount++;
$this->spliceIntoParameters($parameters, $key, $instance);
} elseif (! isset($values[$key - $instanceCount]) &&
$parameter->isDefaultValueAvailable()) {
$this->spliceIntoParameters($parameters, $key, $parameter->getDefaultValue());
}
}
return $parameters;
}
/**
* Attempt to transform the given parameter into a class instance.
*
* @param \ReflectionParameter $parameter
* @param array $parameters
* @return mixed
*/
protected function transformDependency(ReflectionParameter $parameter, $parameters)
{
$class = $parameter->getClass();
// If the parameter has a type-hinted class, we will check to see if it is already in
// the list of parameters. If it is we will just skip it as it is probably a model
// binding and we do not want to mess with those; otherwise, we resolve it here.
if ($class && ! $this->alreadyInParameters($class->name, $parameters)) {
return $parameter->isDefaultValueAvailable()
? $parameter->getDefaultValue()
: $this->container->make($class->name);
}
}
/**
* Determine if an object of the given class is in a list of parameters.
*
* @param string $class
* @param array $parameters
* @return bool
*/
protected function alreadyInParameters($class, array $parameters)
{
return ! is_null(Arr::first($parameters, function ($value) use ($class) {
return $value instanceof $class;
}));
}
/**
* Splice the given value into the parameter list.
*
* @param array $parameters
* @param string $offset
* @param mixed $value
* @return void
*/
protected function spliceIntoParameters(array &$parameters, $offset, $value)
{
array_splice(
$parameters, $offset, 0, [$value]
);
}
}

View File

@@ -1,45 +0,0 @@
<?php
namespace Illuminate\Routing;
use ReflectionMethod;
use ReflectionFunction;
use Illuminate\Support\Str;
class RouteSignatureParameters
{
/**
* Extract the route action's signature parameters.
*
* @param array $action
* @param string $subClass
* @return array
*/
public static function fromAction(array $action, $subClass = null)
{
$parameters = is_string($action['uses'])
? static::fromClassMethodString($action['uses'])
: (new ReflectionFunction($action['uses']))->getParameters();
return is_null($subClass) ? $parameters : array_filter($parameters, function ($p) use ($subClass) {
return $p->getClass() && $p->getClass()->isSubclassOf($subClass);
});
}
/**
* Get the parameters for the given class / method by string.
*
* @param string $uses
* @return array
*/
protected static function fromClassMethodString($uses)
{
list($class, $method) = Str::parseCallback($uses);
if (! method_exists($class, $method) && is_callable($class, $method)) {
return [];
}
return (new ReflectionMethod($class, $method))->getParameters();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,629 +0,0 @@
<?php
namespace Illuminate\Routing;
use Closure;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use InvalidArgumentException;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Routing\UrlRoutable;
use Illuminate\Contracts\Routing\UrlGenerator as UrlGeneratorContract;
class UrlGenerator implements UrlGeneratorContract
{
use Macroable;
/**
* The route collection.
*
* @var \Illuminate\Routing\RouteCollection
*/
protected $routes;
/**
* The request instance.
*
* @var \Illuminate\Http\Request
*/
protected $request;
/**
* The forced URL root.
*
* @var string
*/
protected $forcedRoot;
/**
* The forced schema for URLs.
*
* @var string
*/
protected $forceScheme;
/**
* A cached copy of the URL root for the current request.
*
* @var string|null
*/
protected $cachedRoot;
/**
* A cached copy of the URL schema for the current request.
*
* @var string|null
*/
protected $cachedSchema;
/**
* The root namespace being applied to controller actions.
*
* @var string
*/
protected $rootNamespace;
/**
* The session resolver callable.
*
* @var callable
*/
protected $sessionResolver;
/**
* The callback to use to format hosts.
*
* @var \Closure
*/
protected $formatHostUsing;
/**
* The callback to use to format paths.
*
* @var \Closure
*/
protected $formatPathUsing;
/**
* The route URL generator instance.
*
* @var \Illuminate\Routing\RouteUrlGenerator|null
*/
protected $routeGenerator;
/**
* Create a new URL Generator instance.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @param \Illuminate\Http\Request $request
* @return void
*/
public function __construct(RouteCollection $routes, Request $request)
{
$this->routes = $routes;
$this->setRequest($request);
}
/**
* Get the full URL for the current request.
*
* @return string
*/
public function full()
{
return $this->request->fullUrl();
}
/**
* Get the current URL for the request.
*
* @return string
*/
public function current()
{
return $this->to($this->request->getPathInfo());
}
/**
* Get the URL for the previous request.
*
* @param mixed $fallback
* @return string
*/
public function previous($fallback = false)
{
$referrer = $this->request->headers->get('referer');
$url = $referrer ? $this->to($referrer) : $this->getPreviousUrlFromSession();
if ($url) {
return $url;
} elseif ($fallback) {
return $this->to($fallback);
}
return $this->to('/');
}
/**
* Get the previous URL from the session if possible.
*
* @return string|null
*/
protected function getPreviousUrlFromSession()
{
$session = $this->getSession();
return $session ? $session->previousUrl() : null;
}
/**
* Generate an absolute URL to the given path.
*
* @param string $path
* @param mixed $extra
* @param bool|null $secure
* @return string
*/
public function to($path, $extra = [], $secure = null)
{
// First we will check if the URL is already a valid URL. If it is we will not
// try to generate a new one but will simply return the URL as is, which is
// convenient since developers do not always have to check if it's valid.
if ($this->isValidUrl($path)) {
return $path;
}
$tail = implode('/', array_map(
'rawurlencode', (array) $this->formatParameters($extra))
);
// Once we have the scheme we will compile the "tail" by collapsing the values
// into a single string delimited by slashes. This just makes it convenient
// for passing the array of parameters to this URL as a list of segments.
$root = $this->formatRoot($this->formatScheme($secure));
list($path, $query) = $this->extractQueryString($path);
return $this->format(
$root, '/'.trim($path.'/'.$tail, '/')
).$query;
}
/**
* Generate a secure, absolute URL to the given path.
*
* @param string $path
* @param array $parameters
* @return string
*/
public function secure($path, $parameters = [])
{
return $this->to($path, $parameters, true);
}
/**
* Generate the URL to an application asset.
*
* @param string $path
* @param bool|null $secure
* @return string
*/
public function asset($path, $secure = null)
{
if ($this->isValidUrl($path)) {
return $path;
}
// Once we get the root URL, we will check to see if it contains an index.php
// file in the paths. If it does, we will remove it since it is not needed
// for asset paths, but only for routes to endpoints in the application.
$root = $this->formatRoot($this->formatScheme($secure));
return $this->removeIndex($root).'/'.trim($path, '/');
}
/**
* Generate the URL to a secure asset.
*
* @param string $path
* @return string
*/
public function secureAsset($path)
{
return $this->asset($path, true);
}
/**
* Generate the URL to an asset from a custom root domain such as CDN, etc.
*
* @param string $root
* @param string $path
* @param bool|null $secure
* @return string
*/
public function assetFrom($root, $path, $secure = null)
{
// Once we get the root URL, we will check to see if it contains an index.php
// file in the paths. If it does, we will remove it since it is not needed
// for asset paths, but only for routes to endpoints in the application.
$root = $this->formatRoot($this->formatScheme($secure), $root);
return $this->removeIndex($root).'/'.trim($path, '/');
}
/**
* Remove the index.php file from a path.
*
* @param string $root
* @return string
*/
protected function removeIndex($root)
{
$i = 'index.php';
return Str::contains($root, $i) ? str_replace('/'.$i, '', $root) : $root;
}
/**
* Get the default scheme for a raw URL.
*
* @param bool|null $secure
* @return string
*/
public function formatScheme($secure)
{
if (! is_null($secure)) {
return $secure ? 'https://' : 'http://';
}
if (is_null($this->cachedSchema)) {
$this->cachedSchema = $this->forceScheme ?: $this->request->getScheme().'://';
}
return $this->cachedSchema;
}
/**
* Get the URL to a named route.
*
* @param string $name
* @param mixed $parameters
* @param bool $absolute
* @return string
*
* @throws \InvalidArgumentException
*/
public function route($name, $parameters = [], $absolute = true)
{
if (! is_null($route = $this->routes->getByName($name))) {
return $this->toRoute($route, $parameters, $absolute);
}
throw new InvalidArgumentException("Route [{$name}] not defined.");
}
/**
* Get the URL for a given route instance.
*
* @param \Illuminate\Routing\Route $route
* @param mixed $parameters
* @param bool $absolute
* @return string
*
* @throws \Illuminate\Routing\Exceptions\UrlGenerationException
*/
protected function toRoute($route, $parameters, $absolute)
{
return $this->routeUrl()->to(
$route, $this->formatParameters($parameters), $absolute
);
}
/**
* Get the URL to a controller action.
*
* @param string $action
* @param mixed $parameters
* @param bool $absolute
* @return string
*
* @throws \InvalidArgumentException
*/
public function action($action, $parameters = [], $absolute = true)
{
if (is_null($route = $this->routes->getByAction($action = $this->formatAction($action)))) {
throw new InvalidArgumentException("Action {$action} not defined.");
}
return $this->toRoute($route, $parameters, $absolute);
}
/**
* Format the given controller action.
*
* @param string $action
* @return string
*/
protected function formatAction($action)
{
if ($this->rootNamespace && ! (strpos($action, '\\') === 0)) {
return $this->rootNamespace.'\\'.$action;
} else {
return trim($action, '\\');
}
}
/**
* Format the array of URL parameters.
*
* @param mixed|array $parameters
* @return array
*/
public function formatParameters($parameters)
{
$parameters = Arr::wrap($parameters);
foreach ($parameters as $key => $parameter) {
if ($parameter instanceof UrlRoutable) {
$parameters[$key] = $parameter->getRouteKey();
}
}
return $parameters;
}
/**
* Extract the query string from the given path.
*
* @param string $path
* @return array
*/
protected function extractQueryString($path)
{
if (($queryPosition = strpos($path, '?')) !== false) {
return [
substr($path, 0, $queryPosition),
substr($path, $queryPosition),
];
}
return [$path, ''];
}
/**
* Get the base URL for the request.
*
* @param string $scheme
* @param string $root
* @return string
*/
public function formatRoot($scheme, $root = null)
{
if (is_null($root)) {
if (is_null($this->cachedRoot)) {
$this->cachedRoot = $this->forcedRoot ?: $this->request->root();
}
$root = $this->cachedRoot;
}
$start = Str::startsWith($root, 'http://') ? 'http://' : 'https://';
return preg_replace('~'.$start.'~', $scheme, $root, 1);
}
/**
* Format the given URL segments into a single URL.
*
* @param string $root
* @param string $path
* @return string
*/
public function format($root, $path)
{
$path = '/'.trim($path, '/');
if ($this->formatHostUsing) {
$root = call_user_func($this->formatHostUsing, $root);
}
if ($this->formatPathUsing) {
$path = call_user_func($this->formatPathUsing, $path);
}
return trim($root.$path, '/');
}
/**
* Determine if the given path is a valid URL.
*
* @param string $path
* @return bool
*/
public function isValidUrl($path)
{
if (! preg_match('~^(#|//|https?://|mailto:|tel:)~', $path)) {
return filter_var($path, FILTER_VALIDATE_URL) !== false;
}
return true;
}
/**
* Get the Route URL generator instance.
*
* @return \Illuminate\Routing\RouteUrlGenerator
*/
protected function routeUrl()
{
if (! $this->routeGenerator) {
$this->routeGenerator = new RouteUrlGenerator($this, $this->request);
}
return $this->routeGenerator;
}
/**
* Set the default named parameters used by the URL generator.
*
* @param array $defaults
* @return void
*/
public function defaults(array $defaults)
{
$this->routeUrl()->defaults($defaults);
}
/**
* Get the default named parameters used by the URL generator.
*
* @return array
*/
public function getDefaultParameters()
{
return $this->routeUrl()->defaultParameters;
}
/**
* Force the scheme for URLs.
*
* @param string $schema
* @return void
*/
public function forceScheme($schema)
{
$this->cachedSchema = null;
$this->forceScheme = $schema.'://';
}
/**
* Set the forced root URL.
*
* @param string $root
* @return void
*/
public function forceRootUrl($root)
{
$this->forcedRoot = rtrim($root, '/');
$this->cachedRoot = null;
}
/**
* Set a callback to be used to format the host of generated URLs.
*
* @param \Closure $callback
* @return $this
*/
public function formatHostUsing(Closure $callback)
{
$this->formatHostUsing = $callback;
return $this;
}
/**
* Set a callback to be used to format the path of generated URLs.
*
* @param \Closure $callback
* @return $this
*/
public function formatPathUsing(Closure $callback)
{
$this->formatPathUsing = $callback;
return $this;
}
/**
* Get the path formatter being used by the URL generator.
*
* @return \Closure
*/
public function pathFormatter()
{
return $this->formatPathUsing ?: function ($path) {
return $path;
};
}
/**
* Get the request instance.
*
* @return \Illuminate\Http\Request
*/
public function getRequest()
{
return $this->request;
}
/**
* Set the current request instance.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
public function setRequest(Request $request)
{
$this->request = $request;
$this->cachedRoot = null;
$this->cachedSchema = null;
$this->routeGenerator = null;
}
/**
* Set the route collection.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @return $this
*/
public function setRoutes(RouteCollection $routes)
{
$this->routes = $routes;
return $this;
}
/**
* Get the session implementation from the resolver.
*
* @return \Illuminate\Session\Store|null
*/
protected function getSession()
{
if ($this->sessionResolver) {
return call_user_func($this->sessionResolver);
}
}
/**
* Set the session resolver for the generator.
*
* @param callable $sessionResolver
* @return $this
*/
public function setSessionResolver(callable $sessionResolver)
{
$this->sessionResolver = $sessionResolver;
return $this;
}
/**
* Set the root controller namespace.
*
* @param string $rootNamespace
* @return $this
*/
public function setRootControllerNamespace($rootNamespace)
{
$this->rootNamespace = $rootNamespace;
return $this;
}
}

View File

@@ -1,113 +0,0 @@
<?php
namespace Illuminate\Session;
use SessionHandlerInterface;
use Illuminate\Support\Carbon;
use Symfony\Component\Finder\Finder;
use Illuminate\Filesystem\Filesystem;
class FileSessionHandler implements SessionHandlerInterface
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* The path where sessions should be stored.
*
* @var string
*/
protected $path;
/**
* The number of minutes the session should be valid.
*
* @var int
*/
protected $minutes;
/**
* Create a new file driven handler instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param string $path
* @param int $minutes
* @return void
*/
public function __construct(Filesystem $files, $path, $minutes)
{
$this->path = $path;
$this->files = $files;
$this->minutes = $minutes;
}
/**
* {@inheritdoc}
*/
public function open($savePath, $sessionName)
{
return true;
}
/**
* {@inheritdoc}
*/
public function close()
{
return true;
}
/**
* {@inheritdoc}
*/
public function read($sessionId)
{
if ($this->files->exists($path = $this->path.'/'.$sessionId)) {
if (filemtime($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) {
return $this->files->get($path, true);
}
}
return '';
}
/**
* {@inheritdoc}
*/
public function write($sessionId, $data)
{
$this->files->put($this->path.'/'.$sessionId, $data, true);
return true;
}
/**
* {@inheritdoc}
*/
public function destroy($sessionId)
{
$this->files->delete($this->path.'/'.$sessionId);
return true;
}
/**
* {@inheritdoc}
*/
public function gc($lifetime)
{
$files = Finder::create()
->in($this->path)
->files()
->ignoreDotFiles(true)
->date('<= now - '.$lifetime.' seconds');
foreach ($files as $file) {
$this->files->delete($file->getRealPath());
}
}
}

View File

@@ -1,48 +0,0 @@
<?php
namespace Illuminate\Support;
use JsonSerializable;
use Carbon\Carbon as BaseCarbon;
use Illuminate\Support\Traits\Macroable;
class Carbon extends BaseCarbon implements JsonSerializable
{
use Macroable;
/**
* The custom Carbon JSON serializer.
*
* @var callable|null
*/
protected static $serializer;
/**
* Prepare the object for JSON serialization.
*
* @return array|string
*/
public function jsonSerialize()
{
if (static::$serializer) {
return call_user_func(static::$serializer, $this);
}
$carbon = $this;
return call_user_func(function () use ($carbon) {
return get_object_vars($carbon);
});
}
/**
* JSON serialize all Carbon instances using the given callback.
*
* @param callable $callback
* @return void
*/
public static function serializeUsing($callback)
{
static::$serializer = $callback;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,192 +0,0 @@
<?php
namespace Illuminate\Support;
use ArrayAccess;
use JsonSerializable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
{
/**
* All of the attributes set on the container.
*
* @var array
*/
protected $attributes = [];
/**
* Create a new fluent container instance.
*
* @param array|object $attributes
* @return void
*/
public function __construct($attributes = [])
{
foreach ($attributes as $key => $value) {
$this->attributes[$key] = $value;
}
}
/**
* Get an attribute from the container.
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function get($key, $default = null)
{
if (array_key_exists($key, $this->attributes)) {
return $this->attributes[$key];
}
return value($default);
}
/**
* Get the attributes from the container.
*
* @return array
*/
public function getAttributes()
{
return $this->attributes;
}
/**
* Convert the Fluent instance to an array.
*
* @return array
*/
public function toArray()
{
return $this->attributes;
}
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function jsonSerialize()
{
return $this->toArray();
}
/**
* Convert the Fluent instance to JSON.
*
* @param int $options
* @return string
*/
public function toJson($options = 0)
{
return json_encode($this->jsonSerialize(), $options);
}
/**
* Determine if the given offset exists.
*
* @param string $offset
* @return bool
*/
public function offsetExists($offset)
{
return isset($this->attributes[$offset]);
}
/**
* Get the value for a given offset.
*
* @param string $offset
* @return mixed
*/
public function offsetGet($offset)
{
return $this->get($offset);
}
/**
* Set the value at the given offset.
*
* @param string $offset
* @param mixed $value
* @return void
*/
public function offsetSet($offset, $value)
{
$this->attributes[$offset] = $value;
}
/**
* Unset the value at the given offset.
*
* @param string $offset
* @return void
*/
public function offsetUnset($offset)
{
unset($this->attributes[$offset]);
}
/**
* Handle dynamic calls to the container to set attributes.
*
* @param string $method
* @param array $parameters
* @return $this
*/
public function __call($method, $parameters)
{
$this->attributes[$method] = count($parameters) > 0 ? $parameters[0] : true;
return $this;
}
/**
* Dynamically retrieve the value of an attribute.
*
* @param string $key
* @return mixed
*/
public function __get($key)
{
return $this->get($key);
}
/**
* Dynamically set the value of an attribute.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function __set($key, $value)
{
$this->offsetSet($key, $value);
}
/**
* Dynamically check if an attribute is set.
*
* @param string $key
* @return bool
*/
public function __isset($key)
{
return $this->offsetExists($key);
}
/**
* Dynamically unset an attribute.
*
* @param string $key
* @return void
*/
public function __unset($key)
{
$this->offsetUnset($key);
}
}

View File

@@ -1,395 +0,0 @@
<?php
namespace Illuminate\Support;
use Countable;
use JsonSerializable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\MessageProvider;
use Illuminate\Contracts\Support\MessageBag as MessageBagContract;
class MessageBag implements Arrayable, Countable, Jsonable, JsonSerializable, MessageBagContract, MessageProvider
{
/**
* All of the registered messages.
*
* @var array
*/
protected $messages = [];
/**
* Default format for message output.
*
* @var string
*/
protected $format = ':message';
/**
* Create a new message bag instance.
*
* @param array $messages
* @return void
*/
public function __construct(array $messages = [])
{
foreach ($messages as $key => $value) {
$this->messages[$key] = $value instanceof Arrayable
? $value->toArray() : (array) $value;
}
}
/**
* Get the keys present in the message bag.
*
* @return array
*/
public function keys()
{
return array_keys($this->messages);
}
/**
* Add a message to the bag.
*
* @param string $key
* @param string $message
* @return $this
*/
public function add($key, $message)
{
if ($this->isUnique($key, $message)) {
$this->messages[$key][] = $message;
}
return $this;
}
/**
* Determine if a key and message combination already exists.
*
* @param string $key
* @param string $message
* @return bool
*/
protected function isUnique($key, $message)
{
$messages = (array) $this->messages;
return ! isset($messages[$key]) || ! in_array($message, $messages[$key]);
}
/**
* Merge a new array of messages into the bag.
*
* @param \Illuminate\Contracts\Support\MessageProvider|array $messages
* @return $this
*/
public function merge($messages)
{
if ($messages instanceof MessageProvider) {
$messages = $messages->getMessageBag()->getMessages();
}
$this->messages = array_merge_recursive($this->messages, $messages);
return $this;
}
/**
* Determine if messages exist for all of the given keys.
*
* @param array|string $key
* @return bool
*/
public function has($key)
{
if (is_null($key)) {
return $this->any();
}
$keys = is_array($key) ? $key : func_get_args();
foreach ($keys as $key) {
if ($this->first($key) === '') {
return false;
}
}
return true;
}
/**
* Determine if messages exist for any of the given keys.
*
* @param array|string $keys
* @return bool
*/
public function hasAny($keys = [])
{
$keys = is_array($keys) ? $keys : func_get_args();
foreach ($keys as $key) {
if ($this->has($key)) {
return true;
}
}
return false;
}
/**
* Get the first message from the bag for a given key.
*
* @param string $key
* @param string $format
* @return string
*/
public function first($key = null, $format = null)
{
$messages = is_null($key) ? $this->all($format) : $this->get($key, $format);
$firstMessage = Arr::first($messages, null, '');
return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage;
}
/**
* Get all of the messages from the bag for a given key.
*
* @param string $key
* @param string $format
* @return array
*/
public function get($key, $format = null)
{
// If the message exists in the container, we will transform it and return
// the message. Otherwise, we'll check if the key is implicit & collect
// all the messages that match a given key and output it as an array.
if (array_key_exists($key, $this->messages)) {
return $this->transform(
$this->messages[$key], $this->checkFormat($format), $key
);
}
if (Str::contains($key, '*')) {
return $this->getMessagesForWildcardKey($key, $format);
}
return [];
}
/**
* Get the messages for a wildcard key.
*
* @param string $key
* @param string|null $format
* @return array
*/
protected function getMessagesForWildcardKey($key, $format)
{
return collect($this->messages)
->filter(function ($messages, $messageKey) use ($key) {
return Str::is($key, $messageKey);
})
->map(function ($messages, $messageKey) use ($format) {
return $this->transform(
$messages, $this->checkFormat($format), $messageKey
);
})->all();
}
/**
* Get all of the messages for every key in the bag.
*
* @param string $format
* @return array
*/
public function all($format = null)
{
$format = $this->checkFormat($format);
$all = [];
foreach ($this->messages as $key => $messages) {
$all = array_merge($all, $this->transform($messages, $format, $key));
}
return $all;
}
/**
* Get all of the unique messages for every key in the bag.
*
* @param string $format
* @return array
*/
public function unique($format = null)
{
return array_unique($this->all($format));
}
/**
* Format an array of messages.
*
* @param array $messages
* @param string $format
* @param string $messageKey
* @return array
*/
protected function transform($messages, $format, $messageKey)
{
return collect((array) $messages)
->map(function ($message) use ($format, $messageKey) {
// We will simply spin through the given messages and transform each one
// replacing the :message place holder with the real message allowing
// the messages to be easily formatted to each developer's desires.
return str_replace([':message', ':key'], [$message, $messageKey], $format);
})->all();
}
/**
* Get the appropriate format based on the given format.
*
* @param string $format
* @return string
*/
protected function checkFormat($format)
{
return $format ?: $this->format;
}
/**
* Get the raw messages in the container.
*
* @return array
*/
public function messages()
{
return $this->messages;
}
/**
* Get the raw messages in the container.
*
* @return array
*/
public function getMessages()
{
return $this->messages();
}
/**
* Get the messages for the instance.
*
* @return \Illuminate\Support\MessageBag
*/
public function getMessageBag()
{
return $this;
}
/**
* Get the default message format.
*
* @return string
*/
public function getFormat()
{
return $this->format;
}
/**
* Set the default message format.
*
* @param string $format
* @return \Illuminate\Support\MessageBag
*/
public function setFormat($format = ':message')
{
$this->format = $format;
return $this;
}
/**
* Determine if the message bag has any messages.
*
* @return bool
*/
public function isEmpty()
{
return ! $this->any();
}
/**
* Determine if the message bag has any messages.
*
* @return bool
*/
public function isNotEmpty()
{
return $this->any();
}
/**
* Determine if the message bag has any messages.
*
* @return bool
*/
public function any()
{
return $this->count() > 0;
}
/**
* Get the number of messages in the container.
*
* @return int
*/
public function count()
{
return count($this->messages, COUNT_RECURSIVE) - count($this->messages);
}
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray()
{
return $this->getMessages();
}
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function jsonSerialize()
{
return $this->toArray();
}
/**
* Convert the object to its JSON representation.
*
* @param int $options
* @return string
*/
public function toJson($options = 0)
{
return json_encode($this->jsonSerialize(), $options);
}
/**
* Convert the message bag to its string representation.
*
* @return string
*/
public function __toString()
{
return $this->toJson();
}
}

View File

@@ -1,110 +0,0 @@
<?php
namespace Illuminate\Support;
use ArrayAccess;
class Optional implements ArrayAccess
{
use Traits\Macroable {
__call as macroCall;
}
/**
* The underlying object.
*
* @var mixed
*/
protected $value;
/**
* Create a new optional instance.
*
* @param mixed $value
* @return void
*/
public function __construct($value)
{
$this->value = $value;
}
/**
* Dynamically access a property on the underlying object.
*
* @param string $key
* @return mixed
*/
public function __get($key)
{
if (is_object($this->value)) {
return $this->value->{$key};
}
}
/**
* Dynamically pass a method to the underlying object.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}
if (is_object($this->value)) {
return $this->value->{$method}(...$parameters);
}
}
/**
* Determine if an item exists at an offset.
*
* @param mixed $key
* @return bool
*/
public function offsetExists($key)
{
return Arr::accessible($this->value) && Arr::exists($this->value, $key);
}
/**
* Get an item at a given offset.
*
* @param mixed $key
* @return mixed
*/
public function offsetGet($key)
{
return Arr::get($this->value, $key);
}
/**
* Set the item at a given offset.
*
* @param mixed $key
* @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
{
if (Arr::accessible($this->value)) {
$this->value[$key] = $value;
}
}
/**
* Unset the item at a given offset.
*
* @param string $key
* @return void
*/
public function offsetUnset($key)
{
if (Arr::accessible($this->value)) {
unset($this->value[$key]);
}
}
}

View File

@@ -1,683 +0,0 @@
<?php
namespace Illuminate\Support;
use Illuminate\Support\Traits\Macroable;
class Str
{
use Macroable;
/**
* The cache of snake-cased words.
*
* @var array
*/
protected static $snakeCache = [];
/**
* The cache of camel-cased words.
*
* @var array
*/
protected static $camelCache = [];
/**
* The cache of studly-cased words.
*
* @var array
*/
protected static $studlyCache = [];
/**
* Return the remainder of a string after a given value.
*
* @param string $subject
* @param string $search
* @return string
*/
public static function after($subject, $search)
{
return $search === '' ? $subject : array_reverse(explode($search, $subject, 2))[0];
}
/**
* Transliterate a UTF-8 value to ASCII.
*
* @param string $value
* @param string $language
* @return string
*/
public static function ascii($value, $language = 'en')
{
$languageSpecific = static::languageSpecificCharsArray($language);
if (! is_null($languageSpecific)) {
$value = str_replace($languageSpecific[0], $languageSpecific[1], $value);
}
foreach (static::charsArray() as $key => $val) {
$value = str_replace($val, $key, $value);
}
return preg_replace('/[^\x20-\x7E]/u', '', $value);
}
/**
* Get the portion of a string before a given value.
*
* @param string $subject
* @param string $search
* @return string
*/
public static function before($subject, $search)
{
return $search === '' ? $subject : explode($search, $subject)[0];
}
/**
* Convert a value to camel case.
*
* @param string $value
* @return string
*/
public static function camel($value)
{
if (isset(static::$camelCache[$value])) {
return static::$camelCache[$value];
}
return static::$camelCache[$value] = lcfirst(static::studly($value));
}
/**
* Determine if a given string contains a given substring.
*
* @param string $haystack
* @param string|array $needles
* @return bool
*/
public static function contains($haystack, $needles)
{
foreach ((array) $needles as $needle) {
if ($needle !== '' && mb_strpos($haystack, $needle) !== false) {
return true;
}
}
return false;
}
/**
* Determine if a given string ends with a given substring.
*
* @param string $haystack
* @param string|array $needles
* @return bool
*/
public static function endsWith($haystack, $needles)
{
foreach ((array) $needles as $needle) {
if (substr($haystack, -strlen($needle)) === (string) $needle) {
return true;
}
}
return false;
}
/**
* Cap a string with a single instance of a given value.
*
* @param string $value
* @param string $cap
* @return string
*/
public static function finish($value, $cap)
{
$quoted = preg_quote($cap, '/');
return preg_replace('/(?:'.$quoted.')+$/u', '', $value).$cap;
}
/**
* Determine if a given string matches a given pattern.
*
* @param string|array $pattern
* @param string $value
* @return bool
*/
public static function is($pattern, $value)
{
$patterns = is_array($pattern) ? $pattern : (array) $pattern;
if (empty($patterns)) {
return false;
}
foreach ($patterns as $pattern) {
// If the given value is an exact match we can of course return true right
// from the beginning. Otherwise, we will translate asterisks and do an
// actual pattern match against the two strings to see if they match.
if ($pattern == $value) {
return true;
}
$pattern = preg_quote($pattern, '#');
// Asterisks are translated into zero-or-more regular expression wildcards
// to make it convenient to check if the strings starts with the given
// pattern such as "library/*", making any string check convenient.
$pattern = str_replace('\*', '.*', $pattern);
if (preg_match('#^'.$pattern.'\z#u', $value) === 1) {
return true;
}
}
return false;
}
/**
* Convert a string to kebab case.
*
* @param string $value
* @return string
*/
public static function kebab($value)
{
return static::snake($value, '-');
}
/**
* Return the length of the given string.
*
* @param string $value
* @param string $encoding
* @return int
*/
public static function length($value, $encoding = null)
{
if ($encoding) {
return mb_strlen($value, $encoding);
}
return mb_strlen($value);
}
/**
* Limit the number of characters in a string.
*
* @param string $value
* @param int $limit
* @param string $end
* @return string
*/
public static function limit($value, $limit = 100, $end = '...')
{
if (mb_strwidth($value, 'UTF-8') <= $limit) {
return $value;
}
return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end;
}
/**
* Convert the given string to lower-case.
*
* @param string $value
* @return string
*/
public static function lower($value)
{
return mb_strtolower($value, 'UTF-8');
}
/**
* Limit the number of words in a string.
*
* @param string $value
* @param int $words
* @param string $end
* @return string
*/
public static function words($value, $words = 100, $end = '...')
{
preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches);
if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) {
return $value;
}
return rtrim($matches[0]).$end;
}
/**
* Parse a Class@method style callback into class and method.
*
* @param string $callback
* @param string|null $default
* @return array
*/
public static function parseCallback($callback, $default = null)
{
return static::contains($callback, '@') ? explode('@', $callback, 2) : [$callback, $default];
}
/**
* Get the plural form of an English word.
*
* @param string $value
* @param int $count
* @return string
*/
public static function plural($value, $count = 2)
{
return Pluralizer::plural($value, $count);
}
/**
* Generate a more truly "random" alpha-numeric string.
*
* @param int $length
* @return string
*/
public static function random($length = 16)
{
$string = '';
while (($len = strlen($string)) < $length) {
$size = $length - $len;
$bytes = random_bytes($size);
$string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);
}
return $string;
}
/**
* Replace a given value in the string sequentially with an array.
*
* @param string $search
* @param array $replace
* @param string $subject
* @return string
*/
public static function replaceArray($search, array $replace, $subject)
{
foreach ($replace as $value) {
$subject = static::replaceFirst($search, $value, $subject);
}
return $subject;
}
/**
* Replace the first occurrence of a given value in the string.
*
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
public static function replaceFirst($search, $replace, $subject)
{
if ($search == '') {
return $subject;
}
$position = strpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
}
/**
* Replace the last occurrence of a given value in the string.
*
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
public static function replaceLast($search, $replace, $subject)
{
$position = strrpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
}
/**
* Begin a string with a single instance of a given value.
*
* @param string $value
* @param string $prefix
* @return string
*/
public static function start($value, $prefix)
{
$quoted = preg_quote($prefix, '/');
return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value);
}
/**
* Convert the given string to upper-case.
*
* @param string $value
* @return string
*/
public static function upper($value)
{
return mb_strtoupper($value, 'UTF-8');
}
/**
* Convert the given string to title case.
*
* @param string $value
* @return string
*/
public static function title($value)
{
return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8');
}
/**
* Get the singular form of an English word.
*
* @param string $value
* @return string
*/
public static function singular($value)
{
return Pluralizer::singular($value);
}
/**
* Generate a URL friendly "slug" from a given string.
*
* @param string $title
* @param string $separator
* @param string $language
* @return string
*/
public static function slug($title, $separator = '-', $language = 'en')
{
$title = static::ascii($title, $language);
// Convert all dashes/underscores into separator
$flip = $separator == '-' ? '_' : '-';
$title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title);
// Replace @ with the word 'at'
$title = str_replace('@', $separator.'at'.$separator, $title);
// Remove all characters that are not the separator, letters, numbers, or whitespace.
$title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title));
// Replace all separator characters and whitespace by a single separator
$title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title);
return trim($title, $separator);
}
/**
* Convert a string to snake case.
*
* @param string $value
* @param string $delimiter
* @return string
*/
public static function snake($value, $delimiter = '_')
{
$key = $value;
if (isset(static::$snakeCache[$key][$delimiter])) {
return static::$snakeCache[$key][$delimiter];
}
if (! ctype_lower($value)) {
$value = preg_replace('/\s+/u', '', ucwords($value));
$value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));
}
return static::$snakeCache[$key][$delimiter] = $value;
}
/**
* Determine if a given string starts with a given substring.
*
* @param string $haystack
* @param string|array $needles
* @return bool
*/
public static function startsWith($haystack, $needles)
{
foreach ((array) $needles as $needle) {
if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
return true;
}
}
return false;
}
/**
* Convert a value to studly caps case.
*
* @param string $value
* @return string
*/
public static function studly($value)
{
$key = $value;
if (isset(static::$studlyCache[$key])) {
return static::$studlyCache[$key];
}
$value = ucwords(str_replace(['-', '_'], ' ', $value));
return static::$studlyCache[$key] = str_replace(' ', '', $value);
}
/**
* Returns the portion of string specified by the start and length parameters.
*
* @param string $string
* @param int $start
* @param int|null $length
* @return string
*/
public static function substr($string, $start, $length = null)
{
return mb_substr($string, $start, $length, 'UTF-8');
}
/**
* Make a string's first character uppercase.
*
* @param string $string
* @return string
*/
public static function ucfirst($string)
{
return static::upper(static::substr($string, 0, 1)).static::substr($string, 1);
}
/**
* Returns the replacements for the ascii method.
*
* Note: Adapted from Stringy\Stringy.
*
* @see https://github.com/danielstjules/Stringy/blob/3.1.0/LICENSE.txt
*
* @return array
*/
protected static function charsArray()
{
static $charsArray;
if (isset($charsArray)) {
return $charsArray;
}
return $charsArray = [
'0' => ['°', '₀', '۰', '0'],
'1' => ['¹', '₁', '۱', '1'],
'2' => ['²', '₂', '۲', '2'],
'3' => ['³', '₃', '۳', '3'],
'4' => ['⁴', '₄', '۴', '٤', '4'],
'5' => ['⁵', '₅', '۵', '٥', '5'],
'6' => ['⁶', '₆', '۶', '٦', '6'],
'7' => ['⁷', '₇', '۷', '7'],
'8' => ['⁸', '₈', '۸', '8'],
'9' => ['⁹', '₉', '۹', '9'],
'a' => ['à', 'á', 'ả', 'ã', 'ạ', 'ă', 'ắ', 'ằ', 'ẳ', 'ẵ', 'ặ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ā', 'ą', 'å', 'α', 'ά', 'ἀ', 'ἁ', 'ἂ', 'ἃ', 'ἄ', 'ἅ', 'ἆ', 'ἇ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ὰ', 'ά', 'ᾰ', 'ᾱ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'а', 'أ', 'အ', 'ာ', 'ါ', 'ǻ', 'ǎ', 'ª', 'ა', 'अ', 'ا', 'a', 'ä'],
'b' => ['б', 'β', 'ب', 'ဗ', 'ბ', 'b'],
'c' => ['ç', 'ć', 'č', 'ĉ', 'ċ', 'c'],
'd' => ['ď', 'ð', 'đ', 'ƌ', 'ȡ', 'ɖ', 'ɗ', 'ᵭ', 'ᶁ', 'ᶑ', 'д', 'δ', 'د', 'ض', 'ဍ', 'ဒ', 'დ', 'd'],
'e' => ['é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'ề', 'ể', 'ễ', 'ệ', 'ë', 'ē', 'ę', 'ě', 'ĕ', 'ė', 'ε', 'έ', 'ἐ', 'ἑ', 'ἒ', 'ἓ', 'ἔ', 'ἕ', 'ὲ', 'έ', 'е', 'ё', 'э', 'є', 'ə', 'ဧ', 'ေ', 'ဲ', 'ე', 'ए', 'إ', 'ئ', 'e'],
'f' => ['ф', 'φ', 'ف', 'ƒ', 'ფ', 'f'],
'g' => ['ĝ', 'ğ', 'ġ', 'ģ', 'г', 'ґ', 'γ', 'ဂ', 'გ', 'گ', 'g'],
'h' => ['ĥ', 'ħ', 'η', 'ή', 'ح', 'ه', 'ဟ', 'ှ', 'ჰ', 'h'],
'i' => ['í', 'ì', 'ỉ', 'ĩ', 'ị', 'î', 'ï', 'ī', 'ĭ', 'į', 'ı', 'ι', 'ί', 'ϊ', 'ΐ', 'ἰ', 'ἱ', 'ἲ', 'ἳ', 'ἴ', 'ἵ', 'ἶ', 'ἷ', 'ὶ', 'ί', 'ῐ', 'ῑ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'і', 'ї', 'и', 'ဣ', 'ိ', 'ီ', 'ည်', 'ǐ', 'ი', 'इ', 'ی', 'i'],
'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج', 'j'],
'k' => ['ķ', 'ĸ', 'к', 'κ', 'Ķ', 'ق', 'ك', 'က', 'კ', 'ქ', 'ک', 'k'],
'l' => ['ł', 'ľ', 'ĺ', 'ļ', 'ŀ', 'л', 'λ', 'ل', 'လ', 'ლ', 'l'],
'm' => ['м', 'μ', 'م', 'မ', 'მ', 'm'],
'n' => ['ñ', 'ń', 'ň', 'ņ', 'ʼn', 'ŋ', 'ν', 'н', 'ن', 'န', 'ნ', 'n'],
'o' => ['ó', 'ò', 'ỏ', 'õ', 'ọ', 'ô', 'ố', 'ồ', 'ổ', 'ỗ', 'ộ', 'ơ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ø', 'ō', 'ő', 'ŏ', 'ο', 'ὀ', 'ὁ', 'ὂ', 'ὃ', 'ὄ', 'ὅ', 'ὸ', 'ό', 'о', 'و', 'θ', 'ို', 'ǒ', 'ǿ', 'º', 'ო', 'ओ', 'o', 'ö'],
'p' => ['п', 'π', 'ပ', 'პ', 'پ', 'p'],
'q' => ['ყ', 'q'],
'r' => ['ŕ', 'ř', 'ŗ', 'р', 'ρ', 'ر', 'რ', 'r'],
's' => ['ś', 'š', 'ş', 'с', 'σ', 'ș', 'ς', 'س', 'ص', 'စ', 'ſ', 'ს', 's'],
't' => ['ť', 'ţ', 'т', 'τ', 'ț', 'ت', 'ط', 'ဋ', 'တ', 'ŧ', 'თ', 'ტ', 't'],
'u' => ['ú', 'ù', 'ủ', 'ũ', 'ụ', 'ư', 'ứ', 'ừ', 'ử', 'ữ', 'ự', 'û', 'ū', 'ů', 'ű', 'ŭ', 'ų', 'µ', 'у', 'ဉ', 'ု', 'ူ', 'ǔ', 'ǖ', 'ǘ', 'ǚ', 'ǜ', 'უ', 'उ', 'u', 'ў', 'ü'],
'v' => ['в', 'ვ', 'ϐ', 'v'],
'w' => ['ŵ', 'ω', 'ώ', 'ဝ', 'ွ', 'w'],
'x' => ['χ', 'ξ', 'x'],
'y' => ['ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ', 'ÿ', 'ŷ', 'й', 'ы', 'υ', 'ϋ', 'ύ', 'ΰ', 'ي', 'ယ', 'y'],
'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ', 'z'],
'aa' => ['ع', 'आ', 'آ'],
'ae' => ['æ', 'ǽ'],
'ai' => ['ऐ'],
'ch' => ['ч', 'ჩ', 'ჭ', 'چ'],
'dj' => ['ђ', 'đ'],
'dz' => ['џ', 'ძ'],
'ei' => ['ऍ'],
'gh' => ['غ', 'ღ'],
'ii' => ['ई'],
'ij' => ['ij'],
'kh' => ['х', 'خ', 'ხ'],
'lj' => ['љ'],
'nj' => ['њ'],
'oe' => ['ö', 'œ', 'ؤ'],
'oi' => ['ऑ'],
'oii' => ['ऒ'],
'ps' => ['ψ'],
'sh' => ['ш', 'შ', 'ش'],
'shch' => ['щ'],
'ss' => ['ß'],
'sx' => ['ŝ'],
'th' => ['þ', 'ϑ', 'ث', 'ذ', 'ظ'],
'ts' => ['ц', 'ც', 'წ'],
'ue' => ['ü'],
'uu' => ['ऊ'],
'ya' => ['я'],
'yu' => ['ю'],
'zh' => ['ж', 'ჟ', 'ژ'],
'(c)' => ['©'],
'A' => ['Á', 'À', 'Ả', 'Ã', 'Ạ', 'Ă', 'Ắ', 'Ằ', 'Ẳ', 'Ẵ', 'Ặ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ', 'Ậ', 'Å', 'Ā', 'Ą', 'Α', 'Ά', 'Ἀ', 'Ἁ', 'Ἂ', 'Ἃ', 'Ἄ', 'Ἅ', 'Ἆ', 'Ἇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'Ᾰ', 'Ᾱ', 'Ὰ', 'Ά', 'ᾼ', 'А', 'Ǻ', 'Ǎ', 'A', 'Ä'],
'B' => ['Б', 'Β', 'ब', 'B'],
'C' => ['Ç', 'Ć', 'Č', 'Ĉ', 'Ċ', 'C'],
'D' => ['Ď', 'Ð', 'Đ', 'Ɖ', 'Ɗ', 'Ƌ', 'ᴅ', 'ᴆ', 'Д', 'Δ', 'D'],
'E' => ['É', 'È', 'Ẻ', 'Ẽ', 'Ẹ', 'Ê', 'Ế', 'Ề', 'Ể', 'Ễ', 'Ệ', 'Ë', 'Ē', 'Ę', 'Ě', 'Ĕ', 'Ė', 'Ε', 'Έ', 'Ἐ', 'Ἑ', 'Ἒ', 'Ἓ', 'Ἔ', 'Ἕ', 'Έ', 'Ὲ', 'Е', 'Ё', 'Э', 'Є', 'Ə', 'E'],
'F' => ['Ф', 'Φ', 'F'],
'G' => ['Ğ', 'Ġ', 'Ģ', 'Г', 'Ґ', 'Γ', 'G'],
'H' => ['Η', 'Ή', 'Ħ', 'H'],
'I' => ['Í', 'Ì', 'Ỉ', 'Ĩ', 'Ị', 'Î', 'Ï', 'Ī', 'Ĭ', 'Į', 'İ', 'Ι', 'Ί', 'Ϊ', 'Ἰ', 'Ἱ', 'Ἳ', 'Ἴ', 'Ἵ', 'Ἶ', 'Ἷ', 'Ῐ', 'Ῑ', 'Ὶ', 'Ί', 'И', 'І', 'Ї', 'Ǐ', 'ϒ', 'I'],
'J' => ['J'],
'K' => ['К', 'Κ', 'K'],
'L' => ['Ĺ', 'Ł', 'Л', 'Λ', 'Ļ', 'Ľ', 'Ŀ', 'ल', 'L'],
'M' => ['М', 'Μ', 'M'],
'N' => ['Ń', 'Ñ', 'Ň', 'Ņ', 'Ŋ', 'Н', 'Ν', 'N'],
'O' => ['Ó', 'Ò', 'Ỏ', 'Õ', 'Ọ', 'Ô', 'Ố', 'Ồ', 'Ổ', 'Ỗ', 'Ộ', 'Ơ', 'Ớ', 'Ờ', 'Ở', 'Ỡ', 'Ợ', 'Ø', 'Ō', 'Ő', 'Ŏ', 'Ο', 'Ό', 'Ὀ', 'Ὁ', 'Ὂ', 'Ὃ', 'Ὄ', 'Ὅ', 'Ὸ', 'Ό', 'О', 'Θ', 'Ө', 'Ǒ', 'Ǿ', 'O', 'Ö'],
'P' => ['П', 'Π', 'P'],
'Q' => ['Q'],
'R' => ['Ř', 'Ŕ', 'Р', 'Ρ', 'Ŗ', 'R'],
'S' => ['Ş', 'Ŝ', 'Ș', 'Š', 'Ś', 'С', 'Σ', 'S'],
'T' => ['Ť', 'Ţ', 'Ŧ', 'Ț', 'Т', 'Τ', 'T'],
'U' => ['Ú', 'Ù', 'Ủ', 'Ũ', 'Ụ', 'Ư', 'Ứ', 'Ừ', 'Ử', 'Ữ', 'Ự', 'Û', 'Ū', 'Ů', 'Ű', 'Ŭ', 'Ų', 'У', 'Ǔ', 'Ǖ', 'Ǘ', 'Ǚ', 'Ǜ', 'U', 'Ў', 'Ü'],
'V' => ['В', 'V'],
'W' => ['Ω', 'Ώ', 'Ŵ', 'W'],
'X' => ['Χ', 'Ξ', 'X'],
'Y' => ['Ý', 'Ỳ', 'Ỷ', 'Ỹ', 'Ỵ', 'Ÿ', 'Ῠ', 'Ῡ', 'Ὺ', 'Ύ', 'Ы', 'Й', 'Υ', 'Ϋ', 'Ŷ', 'Y'],
'Z' => ['Ź', 'Ž', 'Ż', 'З', 'Ζ', 'Z'],
'AE' => ['Æ', 'Ǽ'],
'Ch' => ['Ч'],
'Dj' => ['Ђ'],
'Dz' => ['Џ'],
'Gx' => ['Ĝ'],
'Hx' => ['Ĥ'],
'Ij' => ['IJ'],
'Jx' => ['Ĵ'],
'Kh' => ['Х'],
'Lj' => ['Љ'],
'Nj' => ['Њ'],
'Oe' => ['Œ'],
'Ps' => ['Ψ'],
'Sh' => ['Ш'],
'Shch' => ['Щ'],
'Ss' => ['ẞ'],
'Th' => ['Þ'],
'Ts' => ['Ц'],
'Ya' => ['Я'],
'Yu' => ['Ю'],
'Zh' => ['Ж'],
' ' => ["\xC2\xA0", "\xE2\x80\x80", "\xE2\x80\x81", "\xE2\x80\x82", "\xE2\x80\x83", "\xE2\x80\x84", "\xE2\x80\x85", "\xE2\x80\x86", "\xE2\x80\x87", "\xE2\x80\x88", "\xE2\x80\x89", "\xE2\x80\x8A", "\xE2\x80\xAF", "\xE2\x81\x9F", "\xE3\x80\x80", "\xEF\xBE\xA0"],
];
}
/**
* Returns the language specific replacements for the ascii method.
*
* Note: Adapted from Stringy\Stringy.
*
* @see https://github.com/danielstjules/Stringy/blob/3.1.0/LICENSE.txt
*
* @param string $language
* @return array|null
*/
protected static function languageSpecificCharsArray($language)
{
static $languageSpecific;
if (! isset($languageSpecific)) {
$languageSpecific = [
'bg' => [
['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'],
['h', 'H', 'sht', 'SHT', 'a', 'А', 'y', 'Y'],
],
'de' => [
['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'],
['ae', 'oe', 'ue', 'AE', 'OE', 'UE'],
],
];
}
return $languageSpecific[$language] ?? null;
}
}

View File

@@ -1,130 +0,0 @@
<?php
namespace Illuminate\Support;
use Countable;
use Illuminate\Contracts\Support\MessageBag as MessageBagContract;
/**
* @mixin \Illuminate\Contracts\Support\MessageBag
*/
class ViewErrorBag implements Countable
{
/**
* The array of the view error bags.
*
* @var array
*/
protected $bags = [];
/**
* Checks if a named MessageBag exists in the bags.
*
* @param string $key
* @return bool
*/
public function hasBag($key = 'default')
{
return isset($this->bags[$key]);
}
/**
* Get a MessageBag instance from the bags.
*
* @param string $key
* @return \Illuminate\Contracts\Support\MessageBag
*/
public function getBag($key)
{
return Arr::get($this->bags, $key) ?: new MessageBag;
}
/**
* Get all the bags.
*
* @return array
*/
public function getBags()
{
return $this->bags;
}
/**
* Add a new MessageBag instance to the bags.
*
* @param string $key
* @param \Illuminate\Contracts\Support\MessageBag $bag
* @return $this
*/
public function put($key, MessageBagContract $bag)
{
$this->bags[$key] = $bag;
return $this;
}
/**
* Determine if the default message bag has any messages.
*
* @return bool
*/
public function any()
{
return $this->count() > 0;
}
/**
* Get the number of messages in the default bag.
*
* @return int
*/
public function count()
{
return $this->getBag('default')->count();
}
/**
* Dynamically call methods on the default bag.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->getBag('default')->$method(...$parameters);
}
/**
* Dynamically access a view error bag.
*
* @param string $key
* @return \Illuminate\Contracts\Support\MessageBag
*/
public function __get($key)
{
return $this->getBag($key);
}
/**
* Dynamically set a view error bag.
*
* @param string $key
* @param \Illuminate\Contracts\Support\MessageBag $value
* @return void
*/
public function __set($key, $value)
{
$this->put($key, $value);
}
/**
* Convert the default bag to its string representation.
*
* @return string
*/
public function __toString()
{
return (string) $this->getBag('default');
}
}

View File

@@ -1,414 +0,0 @@
<?php
namespace Illuminate\View;
use Exception;
use Throwable;
use ArrayAccess;
use BadMethodCallException;
use Illuminate\Support\Str;
use Illuminate\Support\MessageBag;
use Illuminate\Contracts\View\Engine;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Contracts\Support\MessageProvider;
use Illuminate\Contracts\View\View as ViewContract;
class View implements ArrayAccess, ViewContract
{
/**
* The view factory instance.
*
* @var \Illuminate\View\Factory
*/
protected $factory;
/**
* The engine implementation.
*
* @var \Illuminate\Contracts\View\Engine
*/
protected $engine;
/**
* The name of the view.
*
* @var string
*/
protected $view;
/**
* The array of view data.
*
* @var array
*/
protected $data;
/**
* The path to the view file.
*
* @var string
*/
protected $path;
/**
* Create a new view instance.
*
* @param \Illuminate\View\Factory $factory
* @param \Illuminate\Contracts\View\Engine $engine
* @param string $view
* @param string $path
* @param mixed $data
* @return void
*/
public function __construct(Factory $factory, Engine $engine, $view, $path, $data = [])
{
$this->view = $view;
$this->path = $path;
$this->engine = $engine;
$this->factory = $factory;
$this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
}
/**
* Get the string contents of the view.
*
* @param callable|null $callback
* @return string
*
* @throws \Throwable
*/
public function render(callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? call_user_func($callback, $this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
// another view gets rendered in the future by the application developer.
$this->factory->flushStateIfDoneRendering();
return ! is_null($response) ? $response : $contents;
} catch (Exception $e) {
$this->factory->flushState();
throw $e;
} catch (Throwable $e) {
$this->factory->flushState();
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
*/
protected function renderContents()
{
// We will keep track of the amount of views being rendered so we can flush
// the section after the complete rendering operation is done. This will
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each sections get flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
* @return array
*/
protected function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
/**
* Get the sections of the rendered view.
*
* @return string
*/
public function renderSections()
{
return $this->render(function () {
return $this->factory->getSections();
});
}
/**
* Add a piece of data to the view.
*
* @param string|array $key
* @param mixed $value
* @return $this
*/
public function with($key, $value = null)
{
if (is_array($key)) {
$this->data = array_merge($this->data, $key);
} else {
$this->data[$key] = $value;
}
return $this;
}
/**
* Add a view instance to the view data.
*
* @param string $key
* @param string $view
* @param array $data
* @return $this
*/
public function nest($key, $view, array $data = [])
{
return $this->with($key, $this->factory->make($view, $data));
}
/**
* Add validation errors to the view.
*
* @param \Illuminate\Contracts\Support\MessageProvider|array $provider
* @return $this
*/
public function withErrors($provider)
{
$this->with('errors', $this->formatErrors($provider));
return $this;
}
/**
* Format the given message provider into a MessageBag.
*
* @param \Illuminate\Contracts\Support\MessageProvider|array $provider
* @return \Illuminate\Support\MessageBag
*/
protected function formatErrors($provider)
{
return $provider instanceof MessageProvider
? $provider->getMessageBag() : new MessageBag((array) $provider);
}
/**
* Get the name of the view.
*
* @return string
*/
public function name()
{
return $this->getName();
}
/**
* Get the name of the view.
*
* @return string
*/
public function getName()
{
return $this->view;
}
/**
* Get the array of view data.
*
* @return array
*/
public function getData()
{
return $this->data;
}
/**
* Get the path to the view file.
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set the path to the view.
*
* @param string $path
* @return void
*/
public function setPath($path)
{
$this->path = $path;
}
/**
* Get the view factory instance.
*
* @return \Illuminate\View\Factory
*/
public function getFactory()
{
return $this->factory;
}
/**
* Get the view's rendering engine.
*
* @return \Illuminate\Contracts\View\Engine
*/
public function getEngine()
{
return $this->engine;
}
/**
* Determine if a piece of data is bound.
*
* @param string $key
* @return bool
*/
public function offsetExists($key)
{
return array_key_exists($key, $this->data);
}
/**
* Get a piece of bound data to the view.
*
* @param string $key
* @return mixed
*/
public function offsetGet($key)
{
return $this->data[$key];
}
/**
* Set a piece of data on the view.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
{
$this->with($key, $value);
}
/**
* Unset a piece of data from the view.
*
* @param string $key
* @return void
*/
public function offsetUnset($key)
{
unset($this->data[$key]);
}
/**
* Get a piece of data from the view.
*
* @param string $key
* @return mixed
*/
public function &__get($key)
{
return $this->data[$key];
}
/**
* Set a piece of data on the view.
*
* @param string $key
* @param mixed $value
* @return void
*/
public function __set($key, $value)
{
$this->with($key, $value);
}
/**
* Check if a piece of data is bound to the view.
*
* @param string $key
* @return bool
*/
public function __isset($key)
{
return isset($this->data[$key]);
}
/**
* Remove a piece of bound data from the view.
*
* @param string $key
* @return bool
*/
public function __unset($key)
{
unset($this->data[$key]);
}
/**
* Dynamically bind parameters to the view.
*
* @param string $method
* @param array $parameters
* @return \Illuminate\View\View
*
* @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{
if (! Str::startsWith($method, 'with')) {
throw new BadMethodCallException("Method [$method] does not exist on view.");
}
return $this->with(Str::camel(substr($method, 4)), $parameters[0]);
}
/**
* Get the string contents of the view.
*
* @return string
*/
public function __toString()
{
return $this->render();
}
}

View File

@@ -1,91 +0,0 @@
<?php
namespace Lord\Laroute\Routes;
use Illuminate\Routing\Route;
use Illuminate\Routing\RouteCollection;
use Lord\Laroute\Routes\Exceptions\ZeroRoutesException;
class Collection extends \Illuminate\Support\Collection
{
public function __construct(RouteCollection $routes, $filter, $namespace)
{
$this->items = $this->parseRoutes($routes, $filter, $namespace);
}
/**
* Parse the routes into a jsonable output.
*
* @param RouteCollection $routes
* @param string $filter
* @param string $namespace
*
* @return array
* @throws ZeroRoutesException
*/
protected function parseRoutes(RouteCollection $routes, $filter, $namespace)
{
$this->guardAgainstZeroRoutes($routes);
$results = [];
foreach ($routes as $route) {
$results[] = $this->getRouteInformation($route, $filter, $namespace);
}
return array_values(array_filter($results));
}
/**
* Throw an exception if there aren't any routes to process
*
* @param RouteCollection $routes
*
* @throws ZeroRoutesException
*/
protected function guardAgainstZeroRoutes(RouteCollection $routes)
{
if (count($routes) < 1) {
throw new ZeroRoutesException("You don't have any routes!");
}
}
/**
* Get the route information for a given route.
*
* @param $route \Illuminate\Routing\Route
* @param $filter string
* @param $namespace string
*
* @return array
*/
protected function getRouteInformation(Route $route, $filter, $namespace)
{
$host = $route->domain();
$methods = $route->methods();
$uri = $route->uri();
$name = $route->getName();
$action = $route->getActionName();
$laroute = array_get($route->getAction(), 'laroute', null);
if(!empty($namespace)) {
$a = $route->getAction();
if(isset($a['controller'])) {
$action = str_replace($namespace.'\\', '', $action);
}
}
switch ($filter) {
case 'all':
if($laroute === false) return null;
break;
case 'only':
if($laroute !== true) return null;
break;
}
return compact('host', 'methods', 'uri', 'name', 'action');
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,240 +0,0 @@
<?php
namespace Nwidart\Modules;
use Illuminate\Filesystem\Filesystem;
use Nwidart\Modules\Exceptions\InvalidJsonException;
class Json
{
/**
* The file path.
*
* @var string
*/
protected $path;
/**
* The laravel filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $filesystem;
/**
* The attributes collection.
*
* @var \Illuminate\Support\Collection
*/
protected $attributes;
/**
* The constructor.
*
* @param mixed $path
* @param \Illuminate\Filesystem\Filesystem $filesystem
*/
public function __construct($path, Filesystem $filesystem = null)
{
$this->path = (string) $path;
$this->filesystem = $filesystem ?: new Filesystem();
$this->attributes = Collection::make($this->getAttributes());
}
/**
* Get filesystem.
*
* @return Filesystem
*/
public function getFilesystem()
{
return $this->filesystem;
}
/**
* Set filesystem.
*
* @param Filesystem $filesystem
*
* @return $this
*/
public function setFilesystem(Filesystem $filesystem)
{
$this->filesystem = $filesystem;
return $this;
}
/**
* Get path.
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set path.
*
* @param mixed $path
*
* @return $this
*/
public function setPath($path)
{
$this->path = (string) $path;
return $this;
}
/**
* Make new instance.
*
* @param string $path
* @param \Illuminate\Filesystem\Filesystem $filesystem
*
* @return static
*/
public static function make($path, Filesystem $filesystem = null)
{
return new static($path, $filesystem);
}
/**
* Get file content.
*
* @return string
*/
public function getContents()
{
return $this->filesystem->get($this->getPath());
}
/**
* Get file contents as array.
* @return array
* @throws \Exception
*/
public function getAttributes()
{
$attributes = json_decode($this->getContents(), 1);
// any JSON parsing errors should throw an exception
if (json_last_error() > 0) {
throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg());
}
if (config('modules.cache.enabled') === false) {
return $attributes;
}
return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () use ($attributes) {
return $attributes;
});
}
/**
* Convert the given array data to pretty json.
*
* @param array $data
*
* @return string
*/
public function toJsonPretty(array $data = null)
{
return json_encode($data ?: $this->attributes, JSON_PRETTY_PRINT);
}
/**
* Update json contents from array data.
*
* @param array $data
*
* @return bool
*/
public function update(array $data)
{
$this->attributes = new Collection(array_merge($this->attributes->toArray(), $data));
return $this->save();
}
/**
* Set a specific key & value.
*
* @param string $key
* @param mixed $value
*
* @return $this
*/
public function set($key, $value)
{
$this->attributes->offsetSet($key, $value);
return $this;
}
/**
* Save the current attributes array to the file storage.
*
* @return bool
*/
public function save()
{
return $this->filesystem->put($this->getPath(), $this->toJsonPretty());
}
/**
* Handle magic method __get.
*
* @param string $key
*
* @return mixed
*/
public function __get($key)
{
return $this->get($key);
}
/**
* Get the specified attribute from json file.
*
* @param $key
* @param null $default
*
* @return mixed
*/
public function get($key, $default = null)
{
return $this->attributes->get($key, $default);
}
/**
* Handle call to __call method.
*
* @param string $method
* @param array $arguments
*
* @return mixed
*/
public function __call($method, $arguments = [])
{
if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], $arguments);
}
return call_user_func_array([$this->attributes, $method], $arguments);
}
/**
* Handle call to __toString method.
*
* @return string
*/
public function __toString()
{
return $this->getContents();
}
}

View File

@@ -1,441 +0,0 @@
<?php
namespace Nwidart\Modules;
use Illuminate\Container\Container;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
abstract class Module extends ServiceProvider
{
use Macroable;
/**
* The laravel|lumen application instance.
*
* @var \Illuminate\Contracts\Foundation\Application|Laravel\Lumen\Application
*/
protected $app;
/**
* The module name.
*
* @var
*/
protected $name;
/**
* The module path.
*
* @var string
*/
protected $path;
/**
* @var array of cached Json objects, keyed by filename
*/
protected $moduleJson = [];
/**
* The constructor.
*
* @param Container $app
* @param $name
* @param $path
*/
public function __construct(Container $app, $name, $path)
{
parent::__construct($app);
$this->name = $name;
$this->path = realpath($path);
}
/**
* Get laravel instance.
*
* @return \Illuminate\Contracts\Foundation\Application|Laravel\Lumen\Application
*/
public function getLaravel()
{
return $this->app;
}
/**
* Get name.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Get name in lower case.
*
* @return string
*/
public function getLowerName()
{
return strtolower($this->name);
}
/**
* Get name in studly case.
*
* @return string
*/
public function getStudlyName()
{
return Str::studly($this->name);
}
/**
* Get name in snake case.
*
* @return string
*/
public function getSnakeName()
{
return Str::snake($this->name);
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->get('description');
}
/**
* Get alias.
*
* @return string
*/
public function getAlias()
{
return $this->get('alias');
}
/**
* Get priority.
*
* @return string
*/
public function getPriority()
{
return $this->get('priority');
}
/**
* Get module requirements.
*
* @return array
*/
public function getRequires()
{
return $this->get('requires');
}
/**
* Get path.
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set path.
*
* @param string $path
*
* @return $this
*/
public function setPath($path)
{
$this->path = $path;
return $this;
}
/**
* Bootstrap the application events.
*/
public function boot()
{
if (config('modules.register.translations', true) === true) {
$this->registerTranslation();
}
if ($this->isLoadFilesOnBoot()) {
$this->registerFiles();
}
$this->fireEvent('boot');
}
/**
* Register module's translation.
*
* @return void
*/
protected function registerTranslation()
{
$lowerName = $this->getLowerName();
$langPath = $this->getPath() . '/Resources/lang';
if (is_dir($langPath)) {
$this->loadTranslationsFrom($langPath, $lowerName);
}
}
/**
* Get json contents from the cache, setting as needed.
*
* @param string $file
*
* @return Json
*/
public function json($file = null) : Json
{
if ($file === null) {
$file = 'module.json';
}
return array_get($this->moduleJson, $file, function () use ($file) {
return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']);
});
}
/**
* Get a specific data from json file by given the key.
*
* @param string $key
* @param null $default
*
* @return mixed
*/
public function get(string $key, $default = null)
{
return $this->json()->get($key, $default);
}
/**
* Get a specific data from composer.json file by given the key.
*
* @param $key
* @param null $default
*
* @return mixed
*/
public function getComposerAttr($key, $default = null)
{
return $this->json('composer.json')->get($key, $default);
}
/**
* Register the module.
*/
public function register()
{
$this->registerAliases();
$this->registerProviders();
if ($this->isLoadFilesOnBoot() === false) {
$this->registerFiles();
}
$this->fireEvent('register');
}
/**
* Register the module event.
*
* @param string $event
*/
protected function fireEvent($event)
{
$this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
}
/**
* Register the aliases from this module.
*/
abstract public function registerAliases();
/**
* Register the service providers from this module.
*/
abstract public function registerProviders();
/**
* Get the path to the cached *_module.php file.
*
* @return string
*/
abstract public function getCachedServicesPath();
/**
* Register the files from this module.
*/
protected function registerFiles()
{
foreach ($this->get('files', []) as $file) {
include $this->path . '/' . $file;
}
}
/**
* Handle call __toString.
*
* @return string
*/
public function __toString()
{
return $this->getStudlyName();
}
/**
* Determine whether the given status same with the current module status.
*
* @param $status
*
* @return bool
*/
public function isStatus($status) : bool
{
return $this->get('active', 0) === $status;
}
/**
* Determine whether the current module activated.
*
* @return bool
*/
public function enabled() : bool
{
return $this->isStatus(1);
}
/**
* Alternate for "enabled" method.
*
* @return bool
* @deprecated
*/
public function active()
{
return $this->isStatus(1);
}
/**
* Determine whether the current module not activated.
*
* @return bool
* @deprecated
*/
public function notActive()
{
return !$this->active();
}
/**
* Determine whether the current module not disabled.
*
* @return bool
*/
public function disabled() : bool
{
return !$this->enabled();
}
/**
* Set active state for current module.
*
* @param $active
*
* @return bool
*/
public function setActive($active)
{
return $this->json()->set('active', $active)->save();
}
/**
* Disable the current module.
*/
public function disable()
{
$this->fireEvent('disabling');
$this->setActive(0);
$this->fireEvent('disabled');
}
/**
* Enable the current module.
*/
public function enable()
{
$this->fireEvent('enabling');
$this->setActive(1);
$this->fireEvent('enabled');
}
/**
* Delete the current module.
*
* @return bool
*/
public function delete()
{
return $this->json()->getFilesystem()->deleteDirectory($this->getPath());
}
/**
* Get extra path.
*
* @param string $path
*
* @return string
*/
public function getExtraPath(string $path) : string
{
return $this->getPath() . '/' . $path;
}
/**
* Handle call to __get method.
*
* @param $key
*
* @return mixed
*/
public function __get($key)
{
return $this->get($key);
}
/**
* Check if can load files of module on boot method.
*
* @return bool
*/
protected function isLoadFilesOnBoot()
{
return config('modules.register.files', 'register') === 'boot' &&
// force register method if option == boot && app is AsgardCms
!class_exists('\Modules\Core\Foundation\AsgardCms');
}
}

View File

@@ -1,682 +0,0 @@
<?php
namespace Nwidart\Modules;
use Countable;
use Illuminate\Container\Container;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
use Nwidart\Modules\Contracts\RepositoryInterface;
use Nwidart\Modules\Exceptions\InvalidAssetPath;
use Nwidart\Modules\Exceptions\ModuleNotFoundException;
use Nwidart\Modules\Process\Installer;
use Nwidart\Modules\Process\Updater;
abstract class Repository implements RepositoryInterface, Countable
{
use Macroable;
/**
* Application instance.
*
* @var Illuminate\Contracts\Foundation\Application|Laravel\Lumen\Application
*/
protected $app;
/**
* The module path.
*
* @var string|null
*/
protected $path;
/**
* The scanned paths.
*
* @var array
*/
protected $paths = [];
/**
* @var string
*/
protected $stubPath;
/**
* The constructor.
*
* @param Container $app
* @param string|null $path
*/
public function __construct(Container $app, $path = null)
{
$this->app = $app;
$this->path = $path;
}
/**
* Add other module location.
*
* @param string $path
*
* @return $this
*/
public function addLocation($path)
{
$this->paths[] = $path;
return $this;
}
/**
* Alternative method for "addPath".
*
* @param string $path
*
* @return $this
* @deprecated
*/
public function addPath($path)
{
return $this->addLocation($path);
}
/**
* Get all additional paths.
*
* @return array
*/
public function getPaths() : array
{
return $this->paths;
}
/**
* Get scanned modules paths.
*
* @return array
*/
public function getScanPaths() : array
{
$paths = $this->paths;
$paths[] = $this->getPath();
if ($this->config('scan.enabled')) {
$paths = array_merge($paths, $this->config('scan.paths'));
}
$paths = array_map(function ($path) {
return ends_with($path, '/*') ? $path : str_finish($path, '/*');
}, $paths);
return $paths;
}
/**
* Creates a new Module instance
*
* @param Container $app
* @param $name
* @param $path
* @return \Nwidart\Modules\Module
*/
abstract protected function createModule(...$args);
/**
* Get & scan all modules.
*
* @return array
*/
public function scan()
{
$paths = $this->getScanPaths();
$modules = [];
foreach ($paths as $key => $path) {
$manifests = $this->app['files']->glob("{$path}/module.json");
is_array($manifests) || $manifests = [];
foreach ($manifests as $manifest) {
$name = Json::make($manifest)->get('name');
$modules[$name] = $this->createModule($this->app, $name, dirname($manifest));
}
}
return $modules;
}
/**
* Get all modules.
*
* @return array
*/
public function all() : array
{
if (!$this->config('cache.enabled')) {
return $this->scan();
}
return $this->formatCached($this->getCached());
}
/**
* Format the cached data as array of modules.
*
* @param array $cached
*
* @return array
*/
protected function formatCached($cached)
{
$modules = [];
foreach ($cached as $name => $module) {
$path = $module["path"];
$modules[$name] = $this->createModule($this->app, $name, $path);
}
return $modules;
}
/**
* Get cached modules.
*
* @return array
*/
public function getCached()
{
return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
return $this->toCollection()->toArray();
});
}
/**
* Get all modules as collection instance.
*
* @return Collection
*/
public function toCollection() : Collection
{
return new Collection($this->scan());
}
/**
* Get modules by status.
*
* @param $status
*
* @return array
*/
public function getByStatus($status) : array
{
$modules = [];
foreach ($this->all() as $name => $module) {
if ($module->isStatus($status)) {
$modules[$name] = $module;
}
}
return $modules;
}
/**
* Determine whether the given module exist.
*
* @param $name
*
* @return bool
*/
public function has($name) : bool
{
return array_key_exists($name, $this->all());
}
/**
* Get list of enabled modules.
*
* @return array
*/
public function enabled() : array
{
return $this->getByStatus(1);
}
/**
* Get list of disabled modules.
*
* @return array
*/
public function disabled() : array
{
return $this->getByStatus(0);
}
/**
* Get count from all modules.
*
* @return int
*/
public function count() : int
{
return count($this->all());
}
/**
* Get all ordered modules.
*
* @param string $direction
*
* @return array
*/
public function getOrdered($direction = 'asc') : array
{
$modules = $this->enabled();
uasort($modules, function (Module $a, Module $b) use ($direction) {
if ($a->order == $b->order) {
return 0;
}
if ($direction == 'desc') {
return $a->order < $b->order ? 1 : -1;
}
return $a->order > $b->order ? 1 : -1;
});
return $modules;
}
/**
* Get a module path.
*
* @return string
*/
public function getPath() : string
{
return $this->path ?: $this->config('paths.modules', base_path('Modules'));
}
/**
* Register the modules.
*/
public function register()
{
foreach ($this->getOrdered() as $module) {
$module->register();
}
}
/**
* Boot the modules.
*/
public function boot()
{
foreach ($this->getOrdered() as $module) {
$module->boot();
}
}
/**
* Find a specific module.
* @param $name
* @return mixed|void
*/
public function find($name)
{
foreach ($this->all() as $module) {
if ($module->getLowerName() === strtolower($name)) {
return $module;
}
}
return;
}
/**
* Find a specific module by its alias.
* @param $alias
* @return mixed|void
*/
public function findByAlias($alias)
{
foreach ($this->all() as $module) {
if ($module->getAlias() === $alias) {
return $module;
}
}
return;
}
/**
* Find all modules that are required by a module. If the module cannot be found, throw an exception.
*
* @param $name
* @return array
* @throws ModuleNotFoundException
*/
public function findRequirements($name)
{
$requirements = [];
$module = $this->findOrFail($name);
foreach ($module->getRequires() as $requirementName) {
$requirements[] = $this->findByAlias($requirementName);
}
return $requirements;
}
/**
* Alternative for "find" method.
* @param $name
* @return mixed|void
* @deprecated
*/
public function get($name)
{
return $this->find($name);
}
/**
* Find a specific module, if there return that, otherwise throw exception.
*
* @param $name
*
* @return Module
*
* @throws ModuleNotFoundException
*/
public function findOrFail($name)
{
$module = $this->find($name);
if ($module !== null) {
return $module;
}
throw new ModuleNotFoundException("Module [{$name}] does not exist!");
}
/**
* Get all modules as laravel collection instance.
*
* @param $status
*
* @return Collection
*/
public function collections($status = 1) : Collection
{
return new Collection($this->getByStatus($status));
}
/**
* Get module path for a specific module.
*
* @param $module
*
* @return string
*/
public function getModulePath($module)
{
try {
return $this->findOrFail($module)->getPath() . '/';
} catch (ModuleNotFoundException $e) {
return $this->getPath() . '/' . Str::studly($module) . '/';
}
}
/**
* Get asset path for a specific module.
*
* @param $module
*
* @return string
*/
public function assetPath($module) : string
{
return $this->config('paths.assets') . '/' . $module;
}
/**
* Get a specific config data from a configuration file.
*
* @param $key
*
* @param null $default
* @return mixed
*/
public function config($key, $default = null)
{
return $this->app['config']->get('modules.' . $key, $default);
}
/**
* Get storage path for module used.
*
* @return string
*/
public function getUsedStoragePath() : string
{
$directory = storage_path('app/modules');
if ($this->app['files']->exists($directory) === false) {
$this->app['files']->makeDirectory($directory, 0777, true);
}
$path = storage_path('app/modules/modules.used');
if (!$this->app['files']->exists($path)) {
$this->app['files']->put($path, '');
}
return $path;
}
/**
* Set module used for cli session.
*
* @param $name
*
* @throws ModuleNotFoundException
*/
public function setUsed($name)
{
$module = $this->findOrFail($name);
$this->app['files']->put($this->getUsedStoragePath(), $module);
}
/**
* Forget the module used for cli session.
*/
public function forgetUsed()
{
if ($this->app['files']->exists($this->getUsedStoragePath())) {
$this->app['files']->delete($this->getUsedStoragePath());
}
}
/**
* Get module used for cli session.
* @return string
* @throws \Nwidart\Modules\Exceptions\ModuleNotFoundException
*/
public function getUsedNow() : string
{
return $this->findOrFail($this->app['files']->get($this->getUsedStoragePath()));
}
/**
* Get used now.
*
* @return string
* @deprecated
*/
public function getUsed()
{
return $this->getUsedNow();
}
/**
* Get laravel filesystem instance.
*
* @return \Illuminate\Filesystem\Filesystem
*/
public function getFiles()
{
return $this->app['files'];
}
/**
* Get module assets path.
*
* @return string
*/
public function getAssetsPath() : string
{
return $this->config('paths.assets');
}
/**
* Get asset url from a specific module.
* @param string $asset
* @return string
* @throws InvalidAssetPath
*/
public function asset($asset) : string
{
if (str_contains($asset, ':') === false) {
throw InvalidAssetPath::missingModuleName($asset);
}
list($name, $url) = explode(':', $asset);
$baseUrl = str_replace(public_path() . DIRECTORY_SEPARATOR, '', $this->getAssetsPath());
$url = $this->app['url']->asset($baseUrl . "/{$name}/" . $url);
return str_replace(['http://', 'https://'], '//', $url);
}
/**
* Determine whether the given module is activated.
*
* @param string $name
*
* @return bool
*/
public function active($name) : bool
{
return $this->findOrFail($name)->active();
}
/**
* Determine whether the given module is not activated.
*
* @param string $name
*
* @return bool
*/
public function notActive($name) : bool
{
return !$this->active($name);
}
/**
* Enabling a specific module.
* @param string $name
* @return void
* @throws \Nwidart\Modules\Exceptions\ModuleNotFoundException
*/
public function enable($name)
{
$this->findOrFail($name)->enable();
}
/**
* Disabling a specific module.
* @param string $name
* @return void
* @throws \Nwidart\Modules\Exceptions\ModuleNotFoundException
*/
public function disable($name)
{
$this->findOrFail($name)->disable();
}
/**
* Delete a specific module.
* @param string $name
* @return bool
* @throws \Nwidart\Modules\Exceptions\ModuleNotFoundException
*/
public function delete($name) : bool
{
return $this->findOrFail($name)->delete();
}
/**
* Update dependencies for the specified module.
*
* @param string $module
*/
public function update($module)
{
with(new Updater($this))->update($module);
}
/**
* Install the specified module.
*
* @param string $name
* @param string $version
* @param string $type
* @param bool $subtree
*
* @return \Symfony\Component\Process\Process
*/
public function install($name, $version = 'dev-master', $type = 'composer', $subtree = false)
{
$installer = new Installer($name, $version, $type, $subtree);
return $installer->run();
}
/**
* Get stub path.
*
* @return string|null
*/
public function getStubPath()
{
if ($this->stubPath !== null) {
return $this->stubPath;
}
if ($this->config('stubs.enabled') === true) {
return $this->config('stubs.path');
}
return $this->stubPath;
}
/**
* Set stub path.
*
* @param string $stubPath
*
* @return $this
*/
public function setStubPath($stubPath)
{
$this->stubPath = $stubPath;
return $this;
}
}

View File

@@ -1,107 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use RachidLaasri\LaravelInstaller\Helpers\EnvironmentManager;
use RachidLaasri\LaravelInstaller\Events\EnvironmentSaved;
use Validator;
use Illuminate\Validation\Rule;
class EnvironmentController extends Controller
{
/**
* @var EnvironmentManager
*/
protected $EnvironmentManager;
/**
* @param EnvironmentManager $environmentManager
*/
public function __construct(EnvironmentManager $environmentManager)
{
$this->EnvironmentManager = $environmentManager;
}
/**
* Display the Environment menu page.
*
* @return \Illuminate\View\View
*/
public function environmentMenu()
{
return view('vendor.installer.environment');
}
/**
* Display the Environment page.
*
* @return \Illuminate\View\View
*/
public function environmentWizard()
{
$envConfig = $this->EnvironmentManager->getEnvContent();
return view('vendor.installer.environment-wizard', compact('envConfig'));
}
/**
* Display the Environment page.
*
* @return \Illuminate\View\View
*/
public function environmentClassic()
{
$envConfig = $this->EnvironmentManager->getEnvContent();
return view('vendor.installer.environment-classic', compact('envConfig'));
}
/**
* Processes the newly saved environment configuration (Classic).
*
* @param Request $input
* @param Redirector $redirect
* @return \Illuminate\Http\RedirectResponse
*/
public function saveClassic(Request $input, Redirector $redirect)
{
$message = $this->EnvironmentManager->saveFileClassic($input);
event(new EnvironmentSaved($input));
return $redirect->route('LaravelInstaller::environmentClassic')
->with(['message' => $message]);
}
/**
* Processes the newly saved environment configuration (Form Wizard).
*
* @param Request $request
* @param Redirector $redirect
* @return \Illuminate\Http\RedirectResponse
*/
public function saveWizard(Request $request, Redirector $redirect)
{
$rules = config('installer.environment.form.rules');
$messages = [
'environment_custom.required_if' => trans('installer_messages.environment.wizard.form.name_required'),
];
$validator = Validator::make($request->all(), $rules, $messages);
if ($validator->fails()) {
$errors = $validator->errors();
return view('vendor.installer.environment-wizard', compact('errors', 'envConfig'));
}
$results = $this->EnvironmentManager->saveFileWizard($request);
event(new EnvironmentSaved($request));
return $redirect->route('LaravelInstaller::database')
->with(['results' => $results]);
}
}

View File

@@ -1,29 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Controllers;
use Illuminate\Routing\Controller;
use RachidLaasri\LaravelInstaller\Helpers\EnvironmentManager;
use RachidLaasri\LaravelInstaller\Helpers\FinalInstallManager;
use RachidLaasri\LaravelInstaller\Helpers\InstalledFileManager;
use RachidLaasri\LaravelInstaller\Events\LaravelInstallerFinished;
class FinalController extends Controller
{
/**
* Update installed file and display finished view.
*
* @param InstalledFileManager $fileManager
* @return \Illuminate\View\View
*/
public function finish(InstalledFileManager $fileManager, FinalInstallManager $finalInstall, EnvironmentManager $environment)
{
$finalMessages = $finalInstall->runFinal();
$finalStatusMessage = $fileManager->update();
$finalEnvFile = $environment->getEnvContent();
event(new LaravelInstallerFinished);
return view('vendor.installer.finished', compact('finalMessages', 'finalStatusMessage', 'finalEnvFile'));
}
}

View File

@@ -1,97 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
use Exception;
use Illuminate\Database\SQLiteConnection;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Console\Output\BufferedOutput;
class DatabaseManager
{
/**
* Migrate and seed the database.
*
* @return array
*/
public function migrateAndSeed()
{
$outputLog = new BufferedOutput;
$this->sqlite($outputLog);
return $this->migrate($outputLog);
}
/**
* Run the migration and call the seeder.
*
* @param collection $outputLog
* @return collection
*/
private function migrate($outputLog)
{
try{
Artisan::call('migrate', ["--force"=> true], $outputLog);
}
catch(Exception $e){
return $this->response($e->getMessage(), 'error', $outputLog);
}
return $this->seed($outputLog);
}
/**
* Seed the database.
*
* @param collection $outputLog
* @return array
*/
private function seed($outputLog)
{
try{
Artisan::call('db:seed', ['--force' => true], $outputLog);
}
catch(Exception $e){
return $this->response($e->getMessage(), 'error', $outputLog);
}
return $this->response(trans('installer_messages.final.finished'), 'success', $outputLog);
}
/**
* Return a formatted error messages.
*
* @param $message
* @param string $status
* @param collection $outputLog
* @return array
*/
private function response($message, $status = 'danger', $outputLog)
{
return [
'status' => $status,
'message' => $message,
'dbOutputLog' => $outputLog->fetch()
];
}
/**
* check database type. If SQLite, then create the database file.
*
* @param collection $outputLog
*/
private function sqlite($outputLog)
{
if(DB::connection() instanceof SQLiteConnection) {
$database = DB::connection()->getDatabaseName();
if(!file_exists($database)) {
touch($database);
DB::reconnect(Config::get('database.default'));
}
$outputLog->write('Using SqlLite database: ' . $database, 1);
}
}
}

View File

@@ -1,135 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
use Exception;
use Illuminate\Http\Request;
class EnvironmentManager
{
/**
* @var string
*/
private $envPath;
/**
* @var string
*/
private $envExamplePath;
/**
* Set the .env and .env.example paths.
*/
public function __construct()
{
$this->envPath = base_path('.env');
$this->envExamplePath = base_path('.env.example');
}
/**
* Get the content of the .env file.
*
* @return string
*/
public function getEnvContent()
{
if (!file_exists($this->envPath)) {
if (file_exists($this->envExamplePath)) {
copy($this->envExamplePath, $this->envPath);
} else {
touch($this->envPath);
}
}
return file_get_contents($this->envPath);
}
/**
* Get the the .env file path.
*
* @return string
*/
public function getEnvPath() {
return $this->envPath;
}
/**
* Get the the .env.example file path.
*
* @return string
*/
public function getEnvExamplePath() {
return $this->envExamplePath;
}
/**
* Save the edited content to the .env file.
*
* @param Request $input
* @return string
*/
public function saveFileClassic(Request $input)
{
$message = trans('installer_messages.environment.success');
try {
file_put_contents($this->envPath, $input->get('envConfig'));
}
catch(Exception $e) {
$message = trans('installer_messages.environment.errors');
}
return $message;
}
/**
* Save the form content to the .env file.
*
* @param Request $request
* @return string
*/
public function saveFileWizard(Request $request)
{
$results = trans('installer_messages.environment.success');
$envFileData =
'APP_NAME=\'' . $request->app_name . "'\n" .
'APP_ENV=' . $request->environment . "\n" .
'APP_KEY=' . 'base64:bODi8VtmENqnjklBmNJzQcTTSC8jNjBysfnjQN59btE=' . "\n" .
'APP_DEBUG=' . $request->app_debug . "\n" .
'APP_LOG_LEVEL=' . $request->app_log_level . "\n" .
'APP_URL=' . $request->app_url . "\n\n" .
'DB_CONNECTION=' . $request->database_connection . "\n" .
'DB_HOST=' . $request->database_hostname . "\n" .
'DB_PORT=' . $request->database_port . "\n" .
'DB_DATABASE=' . $request->database_name . "\n" .
'DB_USERNAME=' . $request->database_username . "\n" .
'DB_PASSWORD=' . $request->database_password . "\n\n" .
'BROADCAST_DRIVER=' . $request->broadcast_driver . "\n" .
'CACHE_DRIVER=' . $request->cache_driver . "\n" .
'SESSION_DRIVER=' . $request->session_driver . "\n" .
'QUEUE_DRIVER=' . $request->queue_driver . "\n\n" .
'REDIS_HOST=' . $request->redis_hostname . "\n" .
'REDIS_PASSWORD=' . $request->redis_password . "\n" .
'REDIS_PORT=' . $request->redis_port . "\n\n" .
'MAIL_DRIVER=' . $request->mail_driver . "\n" .
'MAIL_HOST=' . $request->mail_host . "\n" .
'MAIL_PORT=' . $request->mail_port . "\n" .
'MAIL_USERNAME=' . $request->mail_username . "\n" .
'MAIL_PASSWORD=' . $request->mail_password . "\n" .
'MAIL_ENCRYPTION=' . $request->mail_encryption . "\n\n" .
'PUSHER_APP_ID=' . $request->pusher_app_id . "\n" .
'PUSHER_APP_KEY=' . $request->pusher_app_key . "\n" .
'PUSHER_APP_SECRET=' . $request->pusher_app_secret;
try {
file_put_contents($this->envPath, $envFileData);
}
catch(Exception $e) {
$results = trans('installer_messages.environment.errors');
}
return $results;
}
}

View File

@@ -1,81 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
use Exception;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Output\BufferedOutput;
class FinalInstallManager
{
/**
* Run final commands.
*
* @return collection
*/
public function runFinal()
{
$outputLog = new BufferedOutput;
$this->generateKey($outputLog);
$this->publishVendorAssets($outputLog);
return $outputLog->fetch();
}
/**
* Generate New Application Key.
*
* @param collection $outputLog
* @return collection
*/
private static function generateKey($outputLog)
{
try{
if (config('installer.final.key')){
Artisan::call('key:generate', ["--force"=> true], $outputLog);
}
}
catch(Exception $e){
return static::response($e->getMessage(), $outputLog);
}
return $outputLog;
}
/**
* Publish vendor assets.
*
* @param collection $outputLog
* @return collection
*/
private static function publishVendorAssets($outputLog)
{
try{
if (config('installer.final.publish')){
Artisan::call('vendor:publish', ['--all' => true], $outputLog);
}
}
catch(Exception $e){
return static::response($e->getMessage(), $outputLog);
}
return $outputLog;
}
/**
* Return a formatted error messages.
*
* @param $message
* @param collection $outputLog
* @return array
*/
private static function response($message, $outputLog)
{
return [
'status' => 'error',
'message' => $message,
'dbOutputLog' => $outputLog->fetch()
];
}
}

View File

@@ -1,42 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
class InstalledFileManager
{
/**
* Create installed file.
*
* @return int
*/
public function create()
{
$installedLogFile = storage_path('installed');
$dateStamp = date("Y/m/d h:i:sa");
if (!file_exists($installedLogFile))
{
$message = trans('installer_messages.installed.success_log_message') . $dateStamp . "\n";
file_put_contents($installedLogFile, $message);
} else {
$message = trans('installer_messages.updater.log.success_message') . $dateStamp;
file_put_contents($installedLogFile, $message.PHP_EOL , FILE_APPEND | LOCK_EX);
}
return $message;
}
/**
* Update installed file.
*
* @return int
*/
public function update()
{
return $this->create();
}
}

View File

@@ -1,86 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
class PermissionsChecker
{
/**
* @var array
*/
protected $results = [];
/**
* Set the result array permissions and errors.
*
* @return mixed
*/
public function __construct()
{
$this->results['permissions'] = [];
$this->results['errors'] = null;
}
/**
* Check for the folders permissions.
*
* @param array $folders
* @return array
*/
public function check(array $folders)
{
foreach($folders as $folder => $permission)
{
if(!($this->getPermission($folder) >= $permission))
{
$this->addFileAndSetErrors($folder, $permission, false);
}
else {
$this->addFile($folder, $permission, true);
}
}
return $this->results;
}
/**
* Get a folder permission.
*
* @param $folder
* @return string
*/
private function getPermission($folder)
{
return substr(sprintf('%o', fileperms(base_path($folder))), -4);
}
/**
* Add the file to the list of results.
*
* @param $folder
* @param $permission
* @param $isSet
*/
private function addFile($folder, $permission, $isSet)
{
array_push($this->results['permissions'], [
'folder' => $folder,
'permission' => $permission,
'isSet' => $isSet
]);
}
/**
* Add the file and set the errors.
*
* @param $folder
* @param $permission
* @param $isSet
*/
private function addFileAndSetErrors($folder, $permission, $isSet)
{
$this->addFile($folder, $permission, $isSet);
$this->results['errors'] = true;
}
}

View File

@@ -1,121 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Helpers;
class RequirementsChecker
{
/**
* Minimum PHP Version Supported (Override is in installer.php config file).
*
* @var _minPhpVersion
*/
private $_minPhpVersion = '7.0.0';
/**
* Check for the server requirements.
*
* @param array $requirements
* @return array
*/
public function check(array $requirements)
{
$results = [];
foreach($requirements as $type => $requirement)
{
switch ($type) {
// check php requirements
case 'php':
foreach($requirements[$type] as $requirement)
{
$results['requirements'][$type][$requirement] = true;
if(!extension_loaded($requirement))
{
$results['requirements'][$type][$requirement] = false;
$results['errors'] = true;
}
}
break;
// check apache requirements
case 'apache':
foreach ($requirements[$type] as $requirement) {
// if function doesn't exist we can't check apache modules
if(function_exists('apache_get_modules'))
{
$results['requirements'][$type][$requirement] = true;
if(!in_array($requirement,apache_get_modules()))
{
$results['requirements'][$type][$requirement] = false;
$results['errors'] = true;
}
}
}
break;
}
}
return $results;
}
/**
* Check PHP version requirement.
*
* @return array
*/
public function checkPHPversion(string $minPhpVersion = null)
{
$minVersionPhp = $minPhpVersion;
$currentPhpVersion = $this->getPhpVersionInfo();
$supported = false;
if ($minPhpVersion == null) {
$minVersionPhp = $this->getMinPhpVersion();
}
if (version_compare($currentPhpVersion['version'], $minVersionPhp) >= 0) {
$supported = true;
}
$phpStatus = [
'full' => $currentPhpVersion['full'],
'current' => $currentPhpVersion['version'],
'minimum' => $minVersionPhp,
'supported' => $supported
];
return $phpStatus;
}
/**
* Get current Php version information
*
* @return array
*/
private static function getPhpVersionInfo()
{
$currentVersionFull = PHP_VERSION;
preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered);
$currentVersion = $filtered[0];
return [
'full' => $currentVersionFull,
'version' => $currentVersion
];
}
/**
* Get minimum PHP version ID.
*
* @return string _minPhpVersion
*/
protected function getMinPhpVersion()
{
return $this->_minPhpVersion;
}
}

View File

@@ -1,62 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Middleware;
use Closure;
use DB;
use Redirect;
class canInstall
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
* @param Redirector $redirect
* @return \Illuminate\Http\RedirectResponse
*/
public function handle($request, Closure $next)
{
if($this->alreadyInstalled()) {
$installedRedirect = config('installer.installedAlreadyAction');
switch ($installedRedirect) {
case 'route':
$routeName = config('installer.installed.redirectOptions.route.name');
$data = config('installer.installed.redirectOptions.route.message');
return redirect()->route($routeName)->with(['data' => $data]);
break;
case 'abort':
abort(config('installer.installed.redirectOptions.abort.type'));
break;
case 'dump':
$dump = config('installer.installed.redirectOptions.dump.data');
dd($dump);
break;
case '404':
case 'default':
default:
abort(404);
break;
}
}
return $next($request);
}
/**
* If application is already installed.
*
* @return bool
*/
public function alreadyInstalled()
{
return file_exists(storage_path('installed'));
}
}

View File

@@ -1,64 +0,0 @@
<?php
namespace RachidLaasri\LaravelInstaller\Providers;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use RachidLaasri\LaravelInstaller\Middleware\canInstall;
use RachidLaasri\LaravelInstaller\Middleware\canUpdate;
class LaravelInstallerServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->publishFiles();
$this->loadRoutesFrom(__DIR__.'/../Routes/web.php');
}
/**
* Bootstrap the application events.
*
* @param $void
*/
public function boot(Router $router)
{
$router->middlewareGroup('install',[CanInstall::class]);
$router->middlewareGroup('update',[CanUpdate::class]);
}
/**
* Publish config file for the installer.
*
* @return void
*/
protected function publishFiles()
{
$this->publishes([
__DIR__.'/../Config/installer.php' => base_path('config/installer.php'),
], 'laravelinstaller');
$this->publishes([
__DIR__.'/../assets' => public_path('installer'),
], 'laravelinstaller');
$this->publishes([
__DIR__.'/../Views' => base_path('resources/views/vendor/installer'),
], 'laravelinstaller');
$this->publishes([
__DIR__.'/../Lang' => base_path('resources/lang'),
], 'laravelinstaller');
}
}

View File

@@ -1,780 +0,0 @@
<?php
/**
* This file is part of the ramsey/uuid library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) Ben Ramsey <ben@benramsey.com>
* @license http://opensource.org/licenses/MIT MIT
* @link https://benramsey.com/projects/ramsey-uuid/ Documentation
* @link https://packagist.org/packages/ramsey/uuid Packagist
* @link https://github.com/ramsey/uuid GitHub
*/
namespace Ramsey\Uuid;
use DateTime;
use Exception;
use InvalidArgumentException;
use Ramsey\Uuid\Converter\NumberConverterInterface;
use Ramsey\Uuid\Codec\CodecInterface;
use Ramsey\Uuid\Exception\InvalidUuidStringException;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
use Ramsey\Uuid\Exception\UnsupportedOperationException;
use ReturnTypeWillChange;
/**
* Represents a universally unique identifier (UUID), according to RFC 4122.
*
* This class provides immutable UUID objects (the Uuid class) and the static
* methods `uuid1()`, `uuid3()`, `uuid4()`, and `uuid5()` for generating version
* 1, 3, 4, and 5 UUIDs as specified in RFC 4122.
*
* If all you want is a unique ID, you should probably call `uuid1()` or `uuid4()`.
* Note that `uuid1()` may compromise privacy since it creates a UUID containing
* the computer’s network address. `uuid4()` creates a random UUID.
*
* @link http://tools.ietf.org/html/rfc4122
* @link http://en.wikipedia.org/wiki/Universally_unique_identifier
* @link http://docs.python.org/3/library/uuid.html
* @link http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html
*/
class Uuid implements UuidInterface
{
/**
* When this namespace is specified, the name string is a fully-qualified domain name.
* @link http://tools.ietf.org/html/rfc4122#appendix-C
*/
const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
/**
* When this namespace is specified, the name string is a URL.
* @link http://tools.ietf.org/html/rfc4122#appendix-C
*/
const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
/**
* When this namespace is specified, the name string is an ISO OID.
* @link http://tools.ietf.org/html/rfc4122#appendix-C
*/
const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8';
/**
* When this namespace is specified, the name string is an X.500 DN in DER or a text output format.
* @link http://tools.ietf.org/html/rfc4122#appendix-C
*/
const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8';
/**
* The nil UUID is special form of UUID that is specified to have all 128 bits set to zero.
* @link http://tools.ietf.org/html/rfc4122#section-4.1.7
*/
const NIL = '00000000-0000-0000-0000-000000000000';
/**
* Reserved for NCS compatibility.
* @link http://tools.ietf.org/html/rfc4122#section-4.1.1
*/
const RESERVED_NCS = 0;
/**
* Specifies the UUID layout given in RFC 4122.
* @link http://tools.ietf.org/html/rfc4122#section-4.1.1
*/
const RFC_4122 = 2;
/**
* Reserved for Microsoft compatibility.
* @link http://tools.ietf.org/html/rfc4122#section-4.1.1
*/
const RESERVED_MICROSOFT = 6;
/**
* Reserved for future definition.
* @link http://tools.ietf.org/html/rfc4122#section-4.1.1
*/
const RESERVED_FUTURE = 7;
/**
* Regular expression pattern for matching a valid UUID of any variant.
*/
const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$';
/**
* Version 1 (time-based) UUID object constant identifier
*/
const UUID_TYPE_TIME = 1;
/**
* Version 2 (identifier-based) UUID object constant identifier
*/
const UUID_TYPE_IDENTIFIER = 2;
/**
* Version 3 (name-based and hashed with MD5) UUID object constant identifier
*/
const UUID_TYPE_HASH_MD5 = 3;
/**
* Version 4 (random) UUID object constant identifier
*/
const UUID_TYPE_RANDOM = 4;
/**
* Version 5 (name-based and hashed with SHA1) UUID object constant identifier
*/
const UUID_TYPE_HASH_SHA1 = 5;
/**
* The factory to use when creating UUIDs.
* @var UuidFactoryInterface
*/
private static $factory = null;
/**
* The codec to use when encoding or decoding UUID strings.
* @var CodecInterface
*/
protected $codec;
/**
* The fields that make up this UUID.
*
* This is initialized to the nil value.
*
* @var array
* @see UuidInterface::getFieldsHex()
*/
protected $fields = [
'time_low' => '00000000',
'time_mid' => '0000',
'time_hi_and_version' => '0000',
'clock_seq_hi_and_reserved' => '00',
'clock_seq_low' => '00',
'node' => '000000000000',
];
/**
* The number converter to use for converting hex values to/from integers.
* @var NumberConverterInterface
*/
protected $converter;
/**
* Creates a universally unique identifier (UUID) from an array of fields.
*
* Unless you're making advanced use of this library to generate identifiers
* that deviate from RFC 4122, you probably do not want to instantiate a
* UUID directly. Use the static methods, instead:
*
* ```
* use Ramsey\Uuid\Uuid;
*
* $timeBasedUuid = Uuid::uuid1();
* $namespaceMd5Uuid = Uuid::uuid3(Uuid::NAMESPACE_URL, 'http://php.net/');
* $randomUuid = Uuid::uuid4();
* $namespaceSha1Uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://php.net/');
* ```
*
* @param array $fields An array of fields from which to construct a UUID;
* see {@see \Ramsey\Uuid\UuidInterface::getFieldsHex()} for array structure.
* @param NumberConverterInterface $converter The number converter to use
* for converting hex values to/from integers.
* @param CodecInterface $codec The codec to use when encoding or decoding
* UUID strings.
*/
public function __construct(
array $fields,
NumberConverterInterface $converter,
CodecInterface $codec
) {
$this->fields = $fields;
$this->codec = $codec;
$this->converter = $converter;
}
/**
* Converts this UUID object to a string when the object is used in any
* string context.
*
* @return string
* @link http://www.php.net/manual/en/language.oop5.magic.php#object.tostring
*/
public function __toString()
{
return $this->toString();
}
/**
* Converts this UUID object to a string when the object is serialized
* with `json_encode()`
*
* @return string
* @link http://php.net/manual/en/class.jsonserializable.php
*/
public function jsonSerialize()
{
return $this->toString();
}
/**
* Converts this UUID object to a string when the object is serialized
* with `serialize()`
*
* @return string
* @link http://php.net/manual/en/class.serializable.php
*/
#[ReturnTypeWillChange]
public function serialize()
{
return $this->toString();
}
/**
* @return array{string: string}
*/
#[ReturnTypeWillChange]
public function __serialize()
{
return ['string' => $this->toString()];
}
/**
* Re-constructs the object from its serialized form.
*
* @param string $serialized
* @link http://php.net/manual/en/class.serializable.php
* @throws InvalidUuidStringException
*/
#[ReturnTypeWillChange]
public function unserialize($serialized)
{
$uuid = self::fromString($serialized);
$this->codec = $uuid->codec;
$this->converter = $uuid->converter;
$this->fields = $uuid->fields;
}
/**
* @param array{string: string} $serialized
* @return void
* @throws InvalidUuidStringException
*/
#[ReturnTypeWillChange]
public function __unserialize(array $serialized)
{
// @codeCoverageIgnoreStart
if (!isset($serialized['string'])) {
throw new InvalidUuidStringException();
}
// @codeCoverageIgnoreEnd
$this->unserialize($serialized['string']);
}
public function compareTo(UuidInterface $other)
{
if ($this->getMostSignificantBitsHex() < $other->getMostSignificantBitsHex()) {
return -1;
}
if ($this->getMostSignificantBitsHex() > $other->getMostSignificantBitsHex()) {
return 1;
}
if ($this->getLeastSignificantBitsHex() < $other->getLeastSignificantBitsHex()) {
return -1;
}
if ($this->getLeastSignificantBitsHex() > $other->getLeastSignificantBitsHex()) {
return 1;
}
return 0;
}
public function equals($other)
{
if (!$other instanceof UuidInterface) {
return false;
}
return $this->compareTo($other) == 0;
}
public function getBytes()
{
return $this->codec->encodeBinary($this);
}
/**
* Returns the high field of the clock sequence multiplexed with the variant
* (bits 65-72 of the UUID).
*
* @return int Unsigned 8-bit integer value of clock_seq_hi_and_reserved
*/
public function getClockSeqHiAndReserved()
{
return hexdec($this->getClockSeqHiAndReservedHex());
}
public function getClockSeqHiAndReservedHex()
{
return $this->fields['clock_seq_hi_and_reserved'];
}
/**
* Returns the low field of the clock sequence (bits 73-80 of the UUID).
*
* @return int Unsigned 8-bit integer value of clock_seq_low
*/
public function getClockSeqLow()
{
return hexdec($this->getClockSeqLowHex());
}
public function getClockSeqLowHex()
{
return $this->fields['clock_seq_low'];
}
/**
* Returns the clock sequence value associated with this UUID.
*
* For UUID version 1, the clock sequence is used to help avoid
* duplicates that could arise when the clock is set backwards in time
* or if the node ID changes.
*
* For UUID version 3 or 5, the clock sequence is a 14-bit value
* constructed from a name as described in RFC 4122, Section 4.3.
*
* For UUID version 4, clock sequence is a randomly or pseudo-randomly
* generated 14-bit value as described in RFC 4122, Section 4.4.
*
* @return int Unsigned 14-bit integer value of clock sequence
* @link http://tools.ietf.org/html/rfc4122#section-4.1.5
*/
public function getClockSequence()
{
return ($this->getClockSeqHiAndReserved() & 0x3f) << 8 | $this->getClockSeqLow();
}
public function getClockSequenceHex()
{
return sprintf('%04x', $this->getClockSequence());
}
public function getNumberConverter()
{
return $this->converter;
}
/**
* @inheritdoc
*/
public function getDateTime()
{
if ($this->getVersion() != 1) {
throw new UnsupportedOperationException('Not a time-based UUID');
}
$unixTimeNanoseconds = $this->getTimestamp() - 0x01b21dd213814000;
$unixTime = ($unixTimeNanoseconds - $unixTimeNanoseconds % 1e7) / 1e7;
return new DateTime("@{$unixTime}");
}
/**
* Returns an array of the fields of this UUID, with keys named according
* to the RFC 4122 names for the fields.
*
* * **time_low**: The low field of the timestamp, an unsigned 32-bit integer
* * **time_mid**: The middle field of the timestamp, an unsigned 16-bit integer
* * **time_hi_and_version**: The high field of the timestamp multiplexed with
* the version number, an unsigned 16-bit integer
* * **clock_seq_hi_and_reserved**: The high field of the clock sequence
* multiplexed with the variant, an unsigned 8-bit integer
* * **clock_seq_low**: The low field of the clock sequence, an unsigned
* 8-bit integer
* * **node**: The spatially unique node identifier, an unsigned 48-bit
* integer
*
* @return array The UUID fields represented as integer values
* @link http://tools.ietf.org/html/rfc4122#section-4.1.2
*/
public function getFields()
{
return [
'time_low' => $this->getTimeLow(),
'time_mid' => $this->getTimeMid(),
'time_hi_and_version' => $this->getTimeHiAndVersion(),
'clock_seq_hi_and_reserved' => $this->getClockSeqHiAndReserved(),
'clock_seq_low' => $this->getClockSeqLow(),
'node' => $this->getNode(),
];
}
public function getFieldsHex()
{
return $this->fields;
}
public function getHex()
{
return str_replace('-', '', $this->toString());
}
/**
* @inheritdoc
*/
public function getInteger()
{
return $this->converter->fromHex($this->getHex());
}
/**
* Returns the least significant 64 bits of this UUID's 128 bit value.
*
* @return mixed Converted representation of the unsigned 64-bit integer value
* @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
*/
public function getLeastSignificantBits()
{
return $this->converter->fromHex($this->getLeastSignificantBitsHex());
}
public function getLeastSignificantBitsHex()
{
return sprintf(
'%02s%02s%012s',
$this->fields['clock_seq_hi_and_reserved'],
$this->fields['clock_seq_low'],
$this->fields['node']
);
}
/**
* Returns the most significant 64 bits of this UUID's 128 bit value.
*
* @return mixed Converted representation of the unsigned 64-bit integer value
* @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
*/
public function getMostSignificantBits()
{
return $this->converter->fromHex($this->getMostSignificantBitsHex());
}
public function getMostSignificantBitsHex()
{
return sprintf(
'%08s%04s%04s',
$this->fields['time_low'],
$this->fields['time_mid'],
$this->fields['time_hi_and_version']
);
}
/**
* Returns the node value associated with this UUID
*
* For UUID version 1, the node field consists of an IEEE 802 MAC
* address, usually the host address. For systems with multiple IEEE
* 802 addresses, any available one can be used. The lowest addressed
* octet (octet number 10) contains the global/local bit and the
* unicast/multicast bit, and is the first octet of the address
* transmitted on an 802.3 LAN.
*
* For systems with no IEEE address, a randomly or pseudo-randomly
* generated value may be used; see RFC 4122, Section 4.5. The
* multicast bit must be set in such addresses, in order that they
* will never conflict with addresses obtained from network cards.
*
* For UUID version 3 or 5, the node field is a 48-bit value constructed
* from a name as described in RFC 4122, Section 4.3.
*
* For UUID version 4, the node field is a randomly or pseudo-randomly
* generated 48-bit value as described in RFC 4122, Section 4.4.
*
* @return int Unsigned 48-bit integer value of node
* @link http://tools.ietf.org/html/rfc4122#section-4.1.6
*/
public function getNode()
{
return hexdec($this->getNodeHex());
}
public function getNodeHex()
{
return $this->fields['node'];
}
/**
* Returns the high field of the timestamp multiplexed with the version
* number (bits 49-64 of the UUID).
*
* @return int Unsigned 16-bit integer value of time_hi_and_version
*/
public function getTimeHiAndVersion()
{
return hexdec($this->getTimeHiAndVersionHex());
}
public function getTimeHiAndVersionHex()
{
return $this->fields['time_hi_and_version'];
}
/**
* Returns the low field of the timestamp (the first 32 bits of the UUID).
*
* @return int Unsigned 32-bit integer value of time_low
*/
public function getTimeLow()
{
return hexdec($this->getTimeLowHex());
}
public function getTimeLowHex()
{
return $this->fields['time_low'];
}
/**
* Returns the middle field of the timestamp (bits 33-48 of the UUID).
*
* @return int Unsigned 16-bit integer value of time_mid
*/
public function getTimeMid()
{
return hexdec($this->getTimeMidHex());
}
public function getTimeMidHex()
{
return $this->fields['time_mid'];
}
/**
* Returns the timestamp value associated with this UUID.
*
* The 60 bit timestamp value is constructed from the time_low,
* time_mid, and time_hi fields of this UUID. The resulting
* timestamp is measured in 100-nanosecond units since midnight,
* October 15, 1582 UTC.
*
* The timestamp value is only meaningful in a time-based UUID, which
* has version type 1. If this UUID is not a time-based UUID then
* this method throws UnsupportedOperationException.
*
* @return int Unsigned 60-bit integer value of the timestamp
* @throws UnsupportedOperationException If this UUID is not a version 1 UUID
* @link http://tools.ietf.org/html/rfc4122#section-4.1.4
*/
public function getTimestamp()
{
if ($this->getVersion() != 1) {
throw new UnsupportedOperationException('Not a time-based UUID');
}
return hexdec($this->getTimestampHex());
}
/**
* @inheritdoc
*/
public function getTimestampHex()
{
if ($this->getVersion() != 1) {
throw new UnsupportedOperationException('Not a time-based UUID');
}
return sprintf(
'%03x%04s%08s',
($this->getTimeHiAndVersion() & 0x0fff),
$this->fields['time_mid'],
$this->fields['time_low']
);
}
public function getUrn()
{
return 'urn:uuid:' . $this->toString();
}
public function getVariant()
{
$clockSeq = $this->getClockSeqHiAndReserved();
if (0 === ($clockSeq & 0x80)) {
return self::RESERVED_NCS;
}
if (0 === ($clockSeq & 0x40)) {
return self::RFC_4122;
}
if (0 === ($clockSeq & 0x20)) {
return self::RESERVED_MICROSOFT;
}
return self::RESERVED_FUTURE;
}
public function getVersion()
{
if ($this->getVariant() == self::RFC_4122) {
return (int) (($this->getTimeHiAndVersion() >> 12) & 0x0f);
}
return null;
}
public function toString()
{
return $this->codec->encode($this);
}
/**
* Returns the currently set factory used to create UUIDs.
*
* @return UuidFactoryInterface
*/
public static function getFactory()
{
if (!self::$factory) {
self::$factory = new UuidFactory();
}
return self::$factory;
}
/**
* Sets the factory used to create UUIDs.
*
* @param UuidFactoryInterface $factory
*/
public static function setFactory(UuidFactoryInterface $factory)
{
self::$factory = $factory;
}
/**
* Creates a UUID from a byte string.
*
* @param string $bytes
* @return UuidInterface
* @throws InvalidUuidStringException
* @throws InvalidArgumentException
*/
public static function fromBytes($bytes)
{
return self::getFactory()->fromBytes($bytes);
}
/**
* Creates a UUID from the string standard representation.
*
* @param string $name A string that specifies a UUID
* @return UuidInterface
* @throws InvalidUuidStringException
*/
public static function fromString($name)
{
return self::getFactory()->fromString($name);
}
/**
* Creates a UUID from a 128-bit integer string.
*
* @param string $integer String representation of 128-bit integer
* @return UuidInterface
* @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
* @throws InvalidUuidStringException
*/
public static function fromInteger($integer)
{
return self::getFactory()->fromInteger($integer);
}
/**
* Check if a string is a valid UUID.
*
* @param string $uuid The string UUID to test
* @return boolean
*/
public static function isValid($uuid)
{
$uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid);
if ($uuid == self::NIL) {
return true;
}
if (!preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) {
return false;
}
return true;
}
/**
* Generate a version 1 UUID from a host ID, sequence number, and the current time.
*
* @param int|string $node A 48-bit number representing the hardware address
* This number may be represented as an integer or a hexadecimal string.
* @param int $clockSeq A 14-bit number used to help avoid duplicates that
* could arise when the clock is set backwards in time or if the node ID
* changes.
* @return UuidInterface
* @throws UnsatisfiedDependencyException if called on a 32-bit system and
* `Moontoast\Math\BigNumber` is not present
* @throws InvalidArgumentException
* @throws Exception if it was not possible to gather sufficient entropy
*/
public static function uuid1($node = null, $clockSeq = null)
{
return self::getFactory()->uuid1($node, $clockSeq);
}
/**
* Generate a version 3 UUID based on the MD5 hash of a namespace identifier
* (which is a UUID) and a name (which is a string).
*
* @param string|UuidInterface $ns The UUID namespace in which to create the named UUID
* @param string $name The name to create a UUID for
* @return UuidInterface
* @throws InvalidUuidStringException
*/
public static function uuid3($ns, $name)
{
return self::getFactory()->uuid3($ns, $name);
}
/**
* Generate a version 4 (random) UUID.
*
* @return UuidInterface
* @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
* @throws InvalidArgumentException
* @throws Exception
*/
public static function uuid4()
{
return self::getFactory()->uuid4();
}
/**
* Generate a version 5 UUID based on the SHA-1 hash of a namespace
* identifier (which is a UUID) and a name (which is a string).
*
* @param string|UuidInterface $ns The UUID namespace in which to create the named UUID
* @param string $name The name to create a UUID for
* @return UuidInterface
* @throws InvalidUuidStringException
*/
public static function uuid5($ns, $name)
{
return self::getFactory()->uuid5($ns, $name);
}
}

View File

@@ -1,376 +0,0 @@
<?php
namespace Rap2hpoutre\LaravelLogViewer;
/**
* Class LaravelLogViewer
* @package Rap2hpoutre\LaravelLogViewer
*/
class LaravelLogViewer
{
/**
* @var string file
*/
private $file;
/**
* @var string folder
*/
private $folder;
/**
* @var string storage_path
*/
private $storage_path;
/**
* Why? Uh... Sorry
*/
const MAX_FILE_SIZE = 52428800;
/**
* @var Level level
*/
private $level;
/**
* @var Pattern pattern
*/
private $pattern;
/**
* LaravelLogViewer constructor.
*/
public function __construct()
{
$this->level = new Level();
$this->pattern = new Pattern();
$this->storage_path = function_exists('config') ? config('logviewer.storage_path', storage_path('logs')) : storage_path('logs');
}
/**
* @param string $folder
*/
public function setFolder($folder)
{
if (app('files')->exists($folder)) {
$this->folder = $folder;
}
else if(is_array($this->storage_path)) {
foreach ($this->storage_path as $value) {
$logsPath = $value . '/' . $folder;
if (app('files')->exists($logsPath)) {
$this->folder = $folder;
break;
}
}
} else {
$logsPath = $this->storage_path . '/' . $folder;
if (app('files')->exists($logsPath)) {
$this->folder = $folder;
}
}
}
/**
* @param string $file
* @throws \Exception
*/
public function setFile($file)
{
$file = $this->pathToLogFile($file);
if (app('files')->exists($file)) {
$this->file = $file;
}
}
/**
* @param string $file
* @return string
* @throws \Exception
*/
public function pathToLogFile($file)
{
if (app('files')->exists($file)) { // try the absolute path
return $file;
}
if (is_array($this->storage_path)) {
foreach ($this->storage_path as $folder) {
if (app('files')->exists($folder . '/' . $file)) { // try the absolute path
$file = $folder . '/' . $file;
break;
}
}
return $file;
}
$logsPath = $this->storage_path;
$logsPath .= ($this->folder) ? '/' . $this->folder : '';
$file = $logsPath . '/' . $file;
// check if requested file is really in the logs directory
if (dirname($file) !== $logsPath) {
throw new \Exception('No such log file: '.$file);
}
return $file;
}
/**
* @return string
*/
public function getFolderName()
{
return $this->folder;
}
/**
* @return string
*/
public function getFileName()
{
return basename($this->file);
}
/**
* @return array
*/
public function all()
{
$log = array();
if (!$this->file) {
$log_file = (!$this->folder) ? $this->getFiles() : $this->getFolderFiles();
if (!count($log_file)) {
return [];
}
$this->file = $log_file[0];
}
$max_file_size = function_exists('config') ? config('logviewer.max_file_size', self::MAX_FILE_SIZE) : self::MAX_FILE_SIZE;
if (app('files')->size($this->file) > $max_file_size) {
return null;
}
if (!is_readable($this->file)) {
return [[
'context' => '',
'level' => '',
'date' => null,
'text' => 'Log file "' . $this->file . '" not readable',
'stack' => '',
]];
}
$file = app('files')->get($this->file);
preg_match_all($this->pattern->getPattern('logs'), $file, $headings);
if (!is_array($headings)) {
return $log;
}
$log_data = preg_split($this->pattern->getPattern('logs'), $file);
if ($log_data[0] < 1) {
array_shift($log_data);
}
foreach ($headings as $h) {
for ($i = 0, $j = count($h); $i < $j; $i++) {
foreach ($this->level->all() as $level) {
if (strpos(strtolower($h[$i]), '.' . $level) || strpos(strtolower($h[$i]), $level . ':')) {
preg_match($this->pattern->getPattern('current_log', 0) . $level . $this->pattern->getPattern('current_log', 1), $h[$i], $current);
if (!isset($current[4])) {
continue;
}
$log[] = array(
'context' => $current[3],
'level' => $level,
'folder' => $this->folder,
'level_class' => $this->level->cssClass($level),
'level_img' => $this->level->img($level),
'date' => $current[1],
'text' => $current[4],
'in_file' => isset($current[5]) ? $current[5] : null,
'stack' => preg_replace("/^\n*/", '', $log_data[$i])
);
}
}
}
}
if (empty($log)) {
$lines = explode(PHP_EOL, $file);
$log = [];
foreach ($lines as $key => $line) {
$log[] = [
'context' => '',
'level' => '',
'folder' => '',
'level_class' => '',
'level_img' => '',
'date' => $key + 1,
'text' => $line,
'in_file' => null,
'stack' => '',
];
}
}
return array_reverse($log);
}
/**Creates a multidimensional array
* of subdirectories and files
*
* @param null $path
*
* @return array
*/
public function foldersAndFiles($path = null)
{
$contents = array();
$dir = $path ? $path : $this->storage_path;
foreach (scandir($dir) as $node) {
if ($node == '.' || $node == '..') continue;
$path = $dir . '\\' . $node;
if (is_dir($path)) {
$contents[$path] = $this->foldersAndFiles($path);
} else {
$contents[] = $path;
}
}
return $contents;
}
/**Returns an array of
* all subdirectories of specified directory
*
* @param string $folder
*
* @return array
*/
public function getFolders($folder = '')
{
$folders = [];
$listObject = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($this->storage_path.'/'.$folder, \RecursiveDirectoryIterator::SKIP_DOTS),
\RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($listObject as $fileinfo) {
if($fileinfo->isDir()) $folders[] = $fileinfo->getRealPath();
}
return $folders;
}
/**
* @param bool $basename
* @return array
*/
public function getFolderFiles($basename = false)
{
return $this->getFiles($basename, $this->folder);
}
/**
* @param bool $basename
* @param string $folder
* @return array
*/
public function getFiles($basename = false, $folder = '')
{
$files = [];
$pattern = function_exists('config') ? config('logviewer.pattern', '*.log') : '*.log';
$fullPath = $this->storage_path.'/'.$folder;
$listObject = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($fullPath, \RecursiveDirectoryIterator::SKIP_DOTS),
\RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($listObject as $fileinfo) {
if(!$fileinfo->isDir() && strtolower(pathinfo($fileinfo->getRealPath(), PATHINFO_EXTENSION)) == explode('.', $pattern)[1])
$files[] = $basename ? basename($fileinfo->getRealPath()) : $fileinfo->getRealPath();
}
return $files;
}
/**
* @return string
*/
public function getStoragePath()
{
return $this->storage_path;
}
/**
* @param $path
*
* @return void
*/
public function setStoragePath($path)
{
$this->storage_path = $path;
}
public static function directoryTreeStructure($storage_path, array $array)
{
foreach ($array as $k => $v) {
if(is_dir( $k )) {
$exploded = explode( "\\", $k );
$show = last( $exploded );
echo '<div class="list-group folder">
<a href="?f='. \Illuminate\Support\Facades\Crypt::encrypt($k).'">
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
class="fa fa-folder"></span> '.$show.'
</a>
</div>';
if ( is_array( $v ) ) {
self::directoryTreeStructure( $storage_path, $v );
}
}
else {
$exploded = explode( "\\", $v );
$show2 = last( $exploded );
$folder = str_replace( $storage_path, "", rtrim( str_replace( $show2, "", $v ), "\\" ) );
$file = $v;
echo '<div class="list-group">
<a href="?l='.\Illuminate\Support\Facades\Crypt::encrypt($file).'&f='.\Illuminate\Support\Facades\Crypt::encrypt($folder).'">
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span
class="fa fa-file"></span> '.$show2.'
</a>
</div>';
}
}
return;
}
}

View File

@@ -1,458 +0,0 @@
<?php
namespace Spatie\String;
use ArrayAccess;
use Spatie\String\Integrations\Underscore;
use Spatie\String\Exceptions\UnsetOffsetException;
use Spatie\String\Exceptions\UnknownFunctionException;
use Spatie\String\Exceptions\ErrorCreatingStringException;
/**
* Magic methods provided by underscore are documented here.
*
* @see \Underscore\Methods\StringsMethods
*
* @method \Spatie\String\Str accord($count, $many, $one, $zero = null)
* @method \Spatie\String\Str random($length = 16)
* @method \Spatie\String\Str quickRandom($length = 16)
* @method randomStrings($words, $length = 10)
* @method bool endsWith($needles)
* @method bool isIp()
* @method bool isEmail()
* @method bool isUrl()
* @method bool startsWith()
* @method bool find($needle, $caseSensitive = false, $absolute = false)
* @method array slice($slice)
* @method \Spatie\String\Str sliceFrom($slice)
* @method \Spatie\String\Str sliceTo($slice)
* @method \Spatie\String\Str baseClass()
* @method \Spatie\String\Str prepend($with)
* @method \Spatie\String\Str append($with)
* @method \Spatie\String\Str limit($limit = 100, $end = '...')
* @method \Spatie\String\Str remove($remove)
* @method \Spatie\String\Str replace($replace, $with)
* @method \Spatie\String\Str toggle($first, $second, $loose = false)
* @method \Spatie\String\Str slugify($separator = '-')
* @method array explode($with, $limit = null)
* @method \Spatie\String\Str lower()
* @method \Spatie\String\Str plural()
* @method \Spatie\String\Str singular()
* @method \Spatie\String\Str upper()
* @method \Spatie\String\Str title()
* @method \Spatie\String\Str words($words = 100, $end = '...')
* @method \Spatie\String\Str toPascalCase()
* @method \Spatie\String\Str toSnakeCase()
* @method \Spatie\String\Str toCamelCase()
*/
class Str implements ArrayAccess
{
/**
* @var string
*/
protected $string;
/**
* @param string $string
*/
public function __construct($string = '')
{
if (is_array($string)) {
throw new ErrorCreatingStringException('Can\'t create string from an array');
}
if (is_object($string) && ! method_exists($string, '__toString')) {
throw new ErrorCreatingStringException(
'Can\'t create string from an object that doesn\'t implement __toString'
);
}
$this->string = (string) $string;
}
/**
* @return string
*/
public function __toString()
{
return $this->string;
}
/**
* Get the string between the given start and end.
*
* @param $start
* @param $end
*
* @return \Spatie\String\Str
*/
public function between($start, $end)
{
if ($start == '' && $end == '') {
return $this;
}
if ($start != '' && strpos($this->string, $start) === false) {
return new static();
}
if ($end != '' && strpos($this->string, $end) === false) {
return new static();
}
if ($start == '') {
return new static(substr($this->string, 0, strpos($this->string, $end)));
}
if ($end == '') {
return new static(substr($this->string, strpos($this->string, $start) + strlen($start)));
}
$stringWithoutStart = explode($start, $this->string)[1];
$middle = explode($end, $stringWithoutStart)[0];
return new static($middle);
}
/**
* Convert the string to uppercase.
*
* @return \Spatie\String\Str
*/
public function toUpper()
{
return new static(strtoupper($this->string));
}
/**
* Convert the string to lowercase.
*
* @return \Spatie\String\Str
*/
public function toLower()
{
return new static(strtolower($this->string));
}
/**
* Shortens a string in a pretty way. It will clean it by trimming
* it, remove all double spaces and html. If the string is then still
* longer than the specified $length it will be shortened. The end
* of the string is always a full word concatinated with the
* specified moreTextIndicator.
*
* @param int $length
* @param string $moreTextIndicator
*
* @return \Spatie\String\Str
*/
public function tease($length = 200, $moreTextIndicator = '...')
{
$sanitizedString = $this->sanitizeForTease($this->string);
if (strlen($sanitizedString) == 0) {
return new static();
}
if (strlen($sanitizedString) <= $length) {
return new static($sanitizedString);
}
$ww = wordwrap($sanitizedString, $length, "\n");
$shortenedString = substr($ww, 0, strpos($ww, "\n")).$moreTextIndicator;
return new static($shortenedString);
}
/**
* Sanitize the string for teasing.
*
* @param $string
*
* @return string
*/
private function sanitizeForTease($string)
{
$string = trim($string);
//remove html
$string = strip_tags($string);
//replace multiple spaces
$string = preg_replace("/\s+/", ' ', $string);
return $string;
}
/**
* Replace the first occurrence of a string.
*
* @param $search
* @param $replace
*
* @return \Spatie\String\Str
*/
public function replaceFirst($search, $replace)
{
if ($search == '') {
return $this;
}
$position = strpos($this->string, $search);
if ($position === false) {
return $this;
}
$resultString = substr_replace($this->string, $replace, $position, strlen($search));
return new static($resultString);
}
/**
* Replace the last occurrence of a string.
*
* @param $search
* @param $replace
*
* @return \Spatie\String\Str
*/
public function replaceLast($search, $replace)
{
if ($search == '') {
return $this;
}
$position = strrpos($this->string, $search);
if ($position === false) {
return $this;
}
$resultString = substr_replace($this->string, $replace, $position, strlen($search));
return new static($resultString);
}
/**
* Prefix a string.
*
* @param $string
*
* @return \Spatie\String\Str
*/
public function prefix($string)
{
return new static($string.$this->string);
}
/**
* Suffix a string.
*
* @param $string
*
* @return \Spatie\String\Str
*/
public function suffix($string)
{
return new static($this->string.$string);
}
/**
* Concatenate a string.
*
* @param $string
*
* @return \Spatie\String\Str
*/
public function concat($string)
{
return $this->suffix($string);
}
/**
* Get the possessive version of a string.
*
* @return \Spatie\String\Str
*/
public function possessive()
{
if ($this->string == '') {
return new static();
}
$noApostropheEdgeCases = ['it'];
if (in_array($this->string, $noApostropheEdgeCases)) {
return new static($this->string.'s');
}
return new static($this->string.'\''.($this->string[strlen($this->string) - 1] != 's' ? 's' : ''));
}
/**
* Get a segment from a string based on a delimiter.
* Returns an empty string when the offset doesn't exist.
* Use a negative index to start counting from the last element.
*
* @param string $delimiter
* @param int $index
*
* @return \Spatie\String\Str
*/
public function segment($delimiter, $index)
{
$segments = explode($delimiter, $this->string);
if ($index < 0) {
$segments = array_reverse($segments);
$index = abs($index) - 1;
}
$segment = isset($segments[$index]) ? $segments[$index] : '';
return new static($segment);
}
/**
* Get the first segment from a string based on a delimiter.
*
* @param string $delimiter
*
* @return \Spatie\String\Str
*/
public function firstSegment($delimiter)
{
return (new static($this->string))->segment($delimiter, 0);
}
/**
* Get the last segment from a string based on a delimiter.
*
* @param string $delimiter
*
* @return \Spatie\String\Str
*/
public function lastSegment($delimiter)
{
return (new static($this->string))->segment($delimiter, -1);
}
/**
* Pop (remove) the last segment of a string based on a delimiter.
*
* @param string $delimiter
*
* @return \Spatie\String\Str
*/
public function pop($delimiter)
{
return (new static($this->string))->replaceLast($delimiter.$this->lastSegment($delimiter), '');
}
/**
* Strip whitespace (or other characters) from the beginning and end of a string.
*
* @param string $characterMask
*
* @return \Spatie\String\Str
*/
public function trim($characterMask = " \t\n\r\0\x0B")
{
return new static(trim($this->string, $characterMask));
}
/**
* Alias for find.
*
* @param array|string $needle
* @param bool $caseSensitive
* @param bool $absolute
*
* @return bool
*/
public function contains($needle, $caseSensitive = false, $absolute = false)
{
return $this->find($needle, $caseSensitive, $absolute);
}
/**
* Unknown methods calls will be handled by various integrations.
*
* @param $method
* @param $args
*
* @throws UnknownFunctionException
*
* @return mixed|\Spatie\String\Str
*/
public function __call($method, $args)
{
$underscore = new Underscore();
if ($underscore->isSupportedMethod($method)) {
return $underscore->call($this, $method, $args);
}
throw new UnknownFunctionException(sprintf('String function %s does not exist', $method));
}
/**
* Whether a offset exists.
*
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
*
* @param mixed $offset An offset to check for.
*
* @return bool true on success or false on failure.
* The return value will be casted to boolean if non-boolean was returned.
*/
public function offsetExists($offset)
{
return strlen($this->string) >= ($offset + 1);
}
/**
* Offset to retrieve.
*
* @link http://php.net/manual/en/arrayaccess.offsetget.php
*
* @param mixed $offset The offset to retrieve.
*
* @return mixed Can return all value types.
*/
public function offsetGet($offset)
{
$character = substr($this->string, $offset, 1);
return new static($character ?: '');
}
/**
* Offset to set.
*
* @link http://php.net/manual/en/arrayaccess.offsetset.php
*
* @param mixed $offset The offset to assign the value to.
* @param mixed $value The value to set.
*/
public function offsetSet($offset, $value)
{
$this->string[$offset] = $value;
}
/**
* Offset to unset.
*
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
*
* @param mixed $offset The offset to unset.
*
* @throws UnsetOffsetException
*/
public function offsetUnset($offset)
{
throw new UnsetOffsetException();
}
}

View File

@@ -1,342 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Console\Descriptor;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
/**
* Text descriptor.
*
* @author Jean-François Simon <contact@jfsimon.fr>
*
* @internal
*/
class TextDescriptor extends Descriptor
{
/**
* {@inheritdoc}
*/
protected function describeInputArgument(InputArgument $argument, array $options = [])
{
if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
} else {
$default = '';
}
$totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName());
$spacingWidth = $totalWidth - \strlen($argument->getName());
$this->writeText(sprintf(' <info>%s</info> %s%s%s',
$argument->getName(),
str_repeat(' ', $spacingWidth),
// + 4 = 2 spaces before <info>, 2 spaces after </info>
preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()),
$default
), $options);
}
/**
* {@inheritdoc}
*/
protected function describeInputOption(InputOption $option, array $options = [])
{
if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
} else {
$default = '';
}
$value = '';
if ($option->acceptValue()) {
$value = '='.strtoupper($option->getName());
if ($option->isValueOptional()) {
$value = '['.$value.']';
}
}
$totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]);
$synopsis = sprintf('%s%s',
$option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ',
sprintf('--%s%s', $option->getName(), $value)
);
$spacingWidth = $totalWidth - Helper::strlen($synopsis);
$this->writeText(sprintf(' <info>%s</info> %s%s%s%s',
$synopsis,
str_repeat(' ', $spacingWidth),
// + 4 = 2 spaces before <info>, 2 spaces after </info>
preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()),
$default,
$option->isArray() ? '<comment> (multiple values allowed)</comment>' : ''
), $options);
}
/**
* {@inheritdoc}
*/
protected function describeInputDefinition(InputDefinition $definition, array $options = [])
{
$totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions());
foreach ($definition->getArguments() as $argument) {
$totalWidth = max($totalWidth, Helper::strlen($argument->getName()));
}
if ($definition->getArguments()) {
$this->writeText('<comment>Arguments:</comment>', $options);
$this->writeText("\n");
foreach ($definition->getArguments() as $argument) {
$this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth]));
$this->writeText("\n");
}
}
if ($definition->getArguments() && $definition->getOptions()) {
$this->writeText("\n");
}
if ($definition->getOptions()) {
$laterOptions = [];
$this->writeText('<comment>Options:</comment>', $options);
foreach ($definition->getOptions() as $option) {
if (\strlen($option->getShortcut()) > 1) {
$laterOptions[] = $option;
continue;
}
$this->writeText("\n");
$this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
}
foreach ($laterOptions as $option) {
$this->writeText("\n");
$this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
}
}
}
/**
* {@inheritdoc}
*/
protected function describeCommand(Command $command, array $options = [])
{
$command->getSynopsis(true);
$command->getSynopsis(false);
$command->mergeApplicationDefinition(false);
$this->writeText('<comment>Usage:</comment>', $options);
foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) {
$this->writeText("\n");
$this->writeText(' '.OutputFormatter::escape($usage), $options);
}
$this->writeText("\n");
$definition = $command->getNativeDefinition();
if ($definition->getOptions() || $definition->getArguments()) {
$this->writeText("\n");
$this->describeInputDefinition($definition, $options);
$this->writeText("\n");
}
if ($help = $command->getProcessedHelp()) {
$this->writeText("\n");
$this->writeText('<comment>Help:</comment>', $options);
$this->writeText("\n");
$this->writeText(' '.str_replace("\n", "\n ", $help), $options);
$this->writeText("\n");
}
}
/**
* {@inheritdoc}
*/
protected function describeApplication(Application $application, array $options = [])
{
$describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
$description = new ApplicationDescription($application, $describedNamespace);
if (isset($options['raw_text']) && $options['raw_text']) {
$width = $this->getColumnWidth($description->getCommands());
foreach ($description->getCommands() as $command) {
$this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
$this->writeText("\n");
}
} else {
if ('' != $help = $application->getHelp()) {
$this->writeText("$help\n\n", $options);
}
$this->writeText("<comment>Usage:</comment>\n", $options);
$this->writeText(" command [options] [arguments]\n\n", $options);
$this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options);
$this->writeText("\n");
$this->writeText("\n");
$commands = $description->getCommands();
$namespaces = $description->getNamespaces();
if ($describedNamespace && $namespaces) {
// make sure all alias commands are included when describing a specific namespace
$describedNamespaceInfo = reset($namespaces);
foreach ($describedNamespaceInfo['commands'] as $name) {
$commands[$name] = $description->getCommand($name);
}
}
// calculate max. width based on available commands per namespace
$width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
return array_intersect($namespace['commands'], array_keys($commands));
}, array_values($namespaces))));
if ($describedNamespace) {
$this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);
} else {
$this->writeText('<comment>Available commands:</comment>', $options);
}
foreach ($namespaces as $namespace) {
$namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) {
return isset($commands[$name]);
});
if (!$namespace['commands']) {
continue;
}
if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
$this->writeText("\n");
$this->writeText(' <comment>'.$namespace['id'].'</comment>', $options);
}
foreach ($namespace['commands'] as $name) {
$this->writeText("\n");
$spacingWidth = $width - Helper::strlen($name);
$command = $commands[$name];
$commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : '';
$this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options);
}
}
$this->writeText("\n");
}
}
/**
* {@inheritdoc}
*/
private function writeText($content, array $options = [])
{
$this->write(
isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content,
isset($options['raw_output']) ? !$options['raw_output'] : true
);
}
/**
* Formats command aliases to show them in the command description.
*
* @return string
*/
private function getCommandAliasesText(Command $command)
{
$text = '';
$aliases = $command->getAliases();
if ($aliases) {
$text = '['.implode('|', $aliases).'] ';
}
return $text;
}
/**
* Formats input option/argument default value.
*
* @param mixed $default
*
* @return string
*/
private function formatDefaultValue($default)
{
if (\INF === $default) {
return 'INF';
}
if (\is_string($default)) {
$default = OutputFormatter::escape($default);
} elseif (\is_array($default)) {
foreach ($default as $key => $value) {
if (\is_string($value)) {
$default[$key] = OutputFormatter::escape($value);
}
}
}
return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
}
/**
* @param (Command|string)[] $commands
*
* @return int
*/
private function getColumnWidth(array $commands)
{
$widths = [];
foreach ($commands as $command) {
if ($command instanceof Command) {
$widths[] = Helper::strlen($command->getName());
foreach ($command->getAliases() as $alias) {
$widths[] = Helper::strlen($alias);
}
} else {
$widths[] = Helper::strlen($command);
}
}
return $widths ? max($widths) + 2 : 0;
}
/**
* @param InputOption[] $options
*
* @return int
*/
private function calculateTotalWidthForOptions(array $options)
{
$totalWidth = 0;
foreach ($options as $option) {
// "-" + shortcut + ", --" + name
$nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName());
if ($option->acceptValue()) {
$valueLength = 1 + Helper::strlen($option->getName()); // = + value
$valueLength += $option->isValueOptional() ? 2 : 0; // [ + ]
$nameLength += $valueLength;
}
$totalWidth = max($totalWidth, $nameLength);
}
return $totalWidth;
}
}

View File

@@ -1,138 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Console\Helper;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
* Helper is the base class for all helper classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class Helper implements HelperInterface
{
protected $helperSet = null;
/**
* {@inheritdoc}
*/
public function setHelperSet(HelperSet $helperSet = null)
{
$this->helperSet = $helperSet;
}
/**
* {@inheritdoc}
*/
public function getHelperSet()
{
return $this->helperSet;
}
/**
* Returns the length of a string, using mb_strwidth if it is available.
*
* @param string $string The string to check its length
*
* @return int The length of the string
*/
public static function strlen($string)
{
if (false === $encoding = mb_detect_encoding($string, null, true)) {
return \strlen($string);
}
return mb_strwidth($string, $encoding);
}
/**
* Returns the subset of a string, using mb_substr if it is available.
*
* @param string $string String to subset
* @param int $from Start offset
* @param int|null $length Length to read
*
* @return string The string subset
*/
public static function substr($string, $from, $length = null)
{
if (false === $encoding = mb_detect_encoding($string, null, true)) {
return substr($string, $from, $length);
}
return mb_substr($string, $from, $length, $encoding);
}
public static function formatTime($secs)
{
static $timeFormats = [
[0, '< 1 sec'],
[1, '1 sec'],
[2, 'secs', 1],
[60, '1 min'],
[120, 'mins', 60],
[3600, '1 hr'],
[7200, 'hrs', 3600],
[86400, '1 day'],
[172800, 'days', 86400],
];
foreach ($timeFormats as $index => $format) {
if ($secs >= $format[0]) {
if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0])
|| $index == \count($timeFormats) - 1
) {
if (2 == \count($format)) {
return $format[1];
}
return floor($secs / $format[2]).' '.$format[1];
}
}
}
}
public static function formatMemory($memory)
{
if ($memory >= 1024 * 1024 * 1024) {
return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
}
if ($memory >= 1024 * 1024) {
return sprintf('%.1f MiB', $memory / 1024 / 1024);
}
if ($memory >= 1024) {
return sprintf('%d KiB', $memory / 1024);
}
return sprintf('%d B', $memory);
}
public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
{
return self::strlen(self::removeDecoration($formatter, $string));
}
public static function removeDecoration(OutputFormatterInterface $formatter, $string)
{
$isDecorated = $formatter->isDecorated();
$formatter->setDecorated(false);
// remove <...> formatting
$string = $formatter->format($string);
// remove already formatted characters
$string = preg_replace("/\033\[[^m]*m/", '', $string);
$formatter->setDecorated($isDecorated);
return $string;
}
}

View File

@@ -1,108 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Console\Helper;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidArgumentException;
/**
* HelperSet represents a set of helpers to be used with a command.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class HelperSet implements \IteratorAggregate
{
/**
* @var Helper[]
*/
private $helpers = [];
private $command;
/**
* @param Helper[] $helpers An array of helper
*/
public function __construct(array $helpers = [])
{
foreach ($helpers as $alias => $helper) {
$this->set($helper, \is_int($alias) ? null : $alias);
}
}
/**
* Sets a helper.
*
* @param HelperInterface $helper The helper instance
* @param string $alias An alias
*/
public function set(HelperInterface $helper, $alias = null)
{
$this->helpers[$helper->getName()] = $helper;
if (null !== $alias) {
$this->helpers[$alias] = $helper;
}
$helper->setHelperSet($this);
}
/**
* Returns true if the helper if defined.
*
* @param string $name The helper name
*
* @return bool true if the helper is defined, false otherwise
*/
public function has($name)
{
return isset($this->helpers[$name]);
}
/**
* Gets a helper value.
*
* @param string $name The helper name
*
* @return HelperInterface The helper instance
*
* @throws InvalidArgumentException if the helper is not defined
*/
public function get($name)
{
if (!$this->has($name)) {
throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
}
return $this->helpers[$name];
}
public function setCommand(Command $command = null)
{
$this->command = $command;
}
/**
* Gets the command associated with this helper set.
*
* @return Command A Command instance
*/
public function getCommand()
{
return $this->command;
}
/**
* @return Helper[]
*/
public function getIterator()
{
return new \ArrayIterator($this->helpers);
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,751 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder;
use Symfony\Component\Finder\Comparator\DateComparator;
use Symfony\Component\Finder\Comparator\NumberComparator;
use Symfony\Component\Finder\Iterator\CustomFilterIterator;
use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
use Symfony\Component\Finder\Iterator\FilecontentFilterIterator;
use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
use Symfony\Component\Finder\Iterator\SortableIterator;
/**
* Finder allows to build rules to find files and directories.
*
* It is a thin wrapper around several specialized iterator classes.
*
* All rules may be invoked several times.
*
* All methods return the current Finder object to allow easy chaining:
*
* $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Finder implements \IteratorAggregate, \Countable
{
const IGNORE_VCS_FILES = 1;
const IGNORE_DOT_FILES = 2;
private $mode = 0;
private $names = array();
private $notNames = array();
private $exclude = array();
private $filters = array();
private $depths = array();
private $sizes = array();
private $followLinks = false;
private $sort = false;
private $ignore = 0;
private $dirs = array();
private $dates = array();
private $iterators = array();
private $contains = array();
private $notContains = array();
private $paths = array();
private $notPaths = array();
private $ignoreUnreadableDirs = false;
private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg');
public function __construct()
{
$this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
}
/**
* Creates a new Finder.
*
* @return static
*/
public static function create()
{
return new static();
}
/**
* Restricts the matching to directories only.
*
* @return $this
*/
public function directories()
{
$this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
return $this;
}
/**
* Restricts the matching to files only.
*
* @return $this
*/
public function files()
{
$this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
return $this;
}
/**
* Adds tests for the directory depth.
*
* Usage:
*
* $finder->depth('> 1') // the Finder will start matching at level 1.
* $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
*
* @param string|int $level The depth level expression
*
* @return $this
*
* @see DepthRangeFilterIterator
* @see NumberComparator
*/
public function depth($level)
{
$this->depths[] = new Comparator\NumberComparator($level);
return $this;
}
/**
* Adds tests for file dates (last modified).
*
* The date must be something that strtotime() is able to parse:
*
* $finder->date('since yesterday');
* $finder->date('until 2 days ago');
* $finder->date('> now - 2 hours');
* $finder->date('>= 2005-10-15');
*
* @param string $date A date range string
*
* @return $this
*
* @see strtotime
* @see DateRangeFilterIterator
* @see DateComparator
*/
public function date($date)
{
$this->dates[] = new Comparator\DateComparator($date);
return $this;
}
/**
* Adds rules that files must match.
*
* You can use patterns (delimited with / sign), globs or simple strings.
*
* $finder->name('*.php')
* $finder->name('/\.php$/') // same as above
* $finder->name('test.php')
*
* @param string $pattern A pattern (a regexp, a glob, or a string)
*
* @return $this
*
* @see FilenameFilterIterator
*/
public function name($pattern)
{
$this->names[] = $pattern;
return $this;
}
/**
* Adds rules that files must not match.
*
* @param string $pattern A pattern (a regexp, a glob, or a string)
*
* @return $this
*
* @see FilenameFilterIterator
*/
public function notName($pattern)
{
$this->notNames[] = $pattern;
return $this;
}
/**
* Adds tests that file contents must match.
*
* Strings or PCRE patterns can be used:
*
* $finder->contains('Lorem ipsum')
* $finder->contains('/Lorem ipsum/i')
*
* @param string $pattern A pattern (string or regexp)
*
* @return $this
*
* @see FilecontentFilterIterator
*/
public function contains($pattern)
{
$this->contains[] = $pattern;
return $this;
}
/**
* Adds tests that file contents must not match.
*
* Strings or PCRE patterns can be used:
*
* $finder->notContains('Lorem ipsum')
* $finder->notContains('/Lorem ipsum/i')
*
* @param string $pattern A pattern (string or regexp)
*
* @return $this
*
* @see FilecontentFilterIterator
*/
public function notContains($pattern)
{
$this->notContains[] = $pattern;
return $this;
}
/**
* Adds rules that filenames must match.
*
* You can use patterns (delimited with / sign) or simple strings.
*
* $finder->path('some/special/dir')
* $finder->path('/some\/special\/dir/') // same as above
*
* Use only / as dirname separator.
*
* @param string $pattern A pattern (a regexp or a string)
*
* @return $this
*
* @see FilenameFilterIterator
*/
public function path($pattern)
{
$this->paths[] = $pattern;
return $this;
}
/**
* Adds rules that filenames must not match.
*
* You can use patterns (delimited with / sign) or simple strings.
*
* $finder->notPath('some/special/dir')
* $finder->notPath('/some\/special\/dir/') // same as above
*
* Use only / as dirname separator.
*
* @param string $pattern A pattern (a regexp or a string)
*
* @return $this
*
* @see FilenameFilterIterator
*/
public function notPath($pattern)
{
$this->notPaths[] = $pattern;
return $this;
}
/**
* Adds tests for file sizes.
*
* $finder->size('> 10K');
* $finder->size('<= 1Ki');
* $finder->size(4);
*
* @param string|int $size A size range string or an integer
*
* @return $this
*
* @see SizeRangeFilterIterator
* @see NumberComparator
*/
public function size($size)
{
$this->sizes[] = new Comparator\NumberComparator($size);
return $this;
}
/**
* Excludes directories.
*
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
*
* $finder->in(__DIR__)->exclude('ruby');
*
* @param string|array $dirs A directory path or an array of directories
*
* @return $this
*
* @see ExcludeDirectoryFilterIterator
*/
public function exclude($dirs)
{
$this->exclude = array_merge($this->exclude, (array) $dirs);
return $this;
}
/**
* Excludes "hidden" directories and files (starting with a dot).
*
* This option is enabled by default.
*
* @param bool $ignoreDotFiles Whether to exclude "hidden" files or not
*
* @return $this
*
* @see ExcludeDirectoryFilterIterator
*/
public function ignoreDotFiles($ignoreDotFiles)
{
if ($ignoreDotFiles) {
$this->ignore |= static::IGNORE_DOT_FILES;
} else {
$this->ignore &= ~static::IGNORE_DOT_FILES;
}
return $this;
}
/**
* Forces the finder to ignore version control directories.
*
* This option is enabled by default.
*
* @param bool $ignoreVCS Whether to exclude VCS files or not
*
* @return $this
*
* @see ExcludeDirectoryFilterIterator
*/
public function ignoreVCS($ignoreVCS)
{
if ($ignoreVCS) {
$this->ignore |= static::IGNORE_VCS_FILES;
} else {
$this->ignore &= ~static::IGNORE_VCS_FILES;
}
return $this;
}
/**
* Adds VCS patterns.
*
* @see ignoreVCS()
*
* @param string|string[] $pattern VCS patterns to ignore
*/
public static function addVCSPattern($pattern)
{
foreach ((array) $pattern as $p) {
self::$vcsPatterns[] = $p;
}
self::$vcsPatterns = array_unique(self::$vcsPatterns);
}
/**
* Sorts files and directories by an anonymous function.
*
* The anonymous function receives two \SplFileInfo instances to compare.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sort(\Closure $closure)
{
$this->sort = $closure;
return $this;
}
/**
* Sorts files and directories by name.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sortByName()
{
$this->sort = Iterator\SortableIterator::SORT_BY_NAME;
return $this;
}
/**
* Sorts files and directories by type (directories before files), then by name.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sortByType()
{
$this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
return $this;
}
/**
* Sorts files and directories by the last accessed time.
*
* This is the time that the file was last accessed, read or written to.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sortByAccessedTime()
{
$this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
return $this;
}
/**
* Sorts files and directories by the last inode changed time.
*
* This is the time that the inode information was last modified (permissions, owner, group or other metadata).
*
* On Windows, since inode is not available, changed time is actually the file creation time.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sortByChangedTime()
{
$this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
return $this;
}
/**
* Sorts files and directories by the last modified time.
*
* This is the last time the actual contents of the file were last modified.
*
* This can be slow as all the matching files and directories must be retrieved for comparison.
*
* @return $this
*
* @see SortableIterator
*/
public function sortByModifiedTime()
{
$this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
return $this;
}
/**
* Filters the iterator with an anonymous function.
*
* The anonymous function receives a \SplFileInfo and must return false
* to remove files.
*
* @return $this
*
* @see CustomFilterIterator
*/
public function filter(\Closure $closure)
{
$this->filters[] = $closure;
return $this;
}
/**
* Forces the following of symlinks.
*
* @return $this
*/
public function followLinks()
{
$this->followLinks = true;
return $this;
}
/**
* Tells finder to ignore unreadable directories.
*
* By default, scanning unreadable directories content throws an AccessDeniedException.
*
* @param bool $ignore
*
* @return $this
*/
public function ignoreUnreadableDirs($ignore = true)
{
$this->ignoreUnreadableDirs = (bool) $ignore;
return $this;
}
/**
* Searches files and directories which match defined rules.
*
* @param string|array $dirs A directory path or an array of directories
*
* @return $this
*
* @throws \InvalidArgumentException if one of the directories does not exist
*/
public function in($dirs)
{
$resolvedDirs = array();
foreach ((array) $dirs as $dir) {
if (is_dir($dir)) {
$resolvedDirs[] = $this->normalizeDir($dir);
} elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
$resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob));
} else {
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
}
}
$this->dirs = array_merge($this->dirs, $resolvedDirs);
return $this;
}
/**
* Returns an Iterator for the current Finder configuration.
*
* This method implements the IteratorAggregate interface.
*
* @return \Iterator|SplFileInfo[] An iterator
*
* @throws \LogicException if the in() method has not been called
*/
public function getIterator()
{
if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
}
if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
return $this->searchInDirectory($this->dirs[0]);
}
$iterator = new \AppendIterator();
foreach ($this->dirs as $dir) {
$iterator->append($this->searchInDirectory($dir));
}
foreach ($this->iterators as $it) {
$iterator->append($it);
}
return $iterator;
}
/**
* Appends an existing set of files/directories to the finder.
*
* The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
*
* @param iterable $iterator
*
* @return $this
*
* @throws \InvalidArgumentException when the given argument is not iterable
*/
public function append($iterator)
{
if ($iterator instanceof \IteratorAggregate) {
$this->iterators[] = $iterator->getIterator();
} elseif ($iterator instanceof \Iterator) {
$this->iterators[] = $iterator;
} elseif ($iterator instanceof \Traversable || \is_array($iterator)) {
$it = new \ArrayIterator();
foreach ($iterator as $file) {
$it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file));
}
$this->iterators[] = $it;
} else {
throw new \InvalidArgumentException('Finder::append() method wrong argument type.');
}
return $this;
}
/**
* Check if the any results were found.
*
* @return bool
*/
public function hasResults()
{
foreach ($this->getIterator() as $_) {
return true;
}
return false;
}
/**
* Counts all the results collected by the iterators.
*
* @return int
*/
public function count()
{
return iterator_count($this->getIterator());
}
/**
* @param string $dir
*
* @return \Iterator
*/
private function searchInDirectory($dir)
{
if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) {
$this->exclude = array_merge($this->exclude, self::$vcsPatterns);
}
if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) {
$this->notPaths[] = '#(^|/)\..+(/|$)#';
}
$minDepth = 0;
$maxDepth = PHP_INT_MAX;
foreach ($this->depths as $comparator) {
switch ($comparator->getOperator()) {
case '>':
$minDepth = $comparator->getTarget() + 1;
break;
case '>=':
$minDepth = $comparator->getTarget();
break;
case '<':
$maxDepth = $comparator->getTarget() - 1;
break;
case '<=':
$maxDepth = $comparator->getTarget();
break;
default:
$minDepth = $maxDepth = $comparator->getTarget();
}
}
$flags = \RecursiveDirectoryIterator::SKIP_DOTS;
if ($this->followLinks) {
$flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
}
$iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
if ($this->exclude) {
$iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude);
}
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
if ($minDepth > 0 || $maxDepth < PHP_INT_MAX) {
$iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
}
if ($this->mode) {
$iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode);
}
if ($this->names || $this->notNames) {
$iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
}
if ($this->contains || $this->notContains) {
$iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
}
if ($this->sizes) {
$iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
}
if ($this->dates) {
$iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
}
if ($this->filters) {
$iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
}
if ($this->paths || $this->notPaths) {
$iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $this->notPaths);
}
if ($this->sort) {
$iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort);
$iterator = $iteratorAggregate->getIterator();
}
return $iterator;
}
/**
* Normalizes given directory names by removing trailing slashes.
*
* Excluding: (s)ftp:// wrapper
*
* @param string $dir
*
* @return string
*/
private function normalizeDir($dir)
{
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
if (preg_match('#^s?ftp://#', $dir)) {
$dir .= '/';
}
return $dir;
}
}

View File

@@ -1,58 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
use Symfony\Component\Finder\Comparator\DateComparator;
/**
* DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DateRangeFilterIterator extends FilterIterator
{
private $comparators = array();
/**
* @param \Iterator $iterator The Iterator to filter
* @param DateComparator[] $comparators An array of DateComparator instances
*/
public function __construct(\Iterator $iterator, array $comparators)
{
$this->comparators = $comparators;
parent::__construct($iterator);
}
/**
* Filters the iterator values.
*
* @return bool true if the value should be kept, false otherwise
*/
public function accept()
{
$fileinfo = $this->current();
if (!file_exists($fileinfo->getPathname())) {
return false;
}
$filedate = $fileinfo->getMTime();
foreach ($this->comparators as $compare) {
if (!$compare->test($filedate)) {
return false;
}
}
return true;
}
}

View File

@@ -1,45 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* DepthRangeFilterIterator limits the directory depth.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class DepthRangeFilterIterator extends FilterIterator
{
private $minDepth = 0;
/**
* @param \RecursiveIteratorIterator $iterator The Iterator to filter
* @param int $minDepth The min depth
* @param int $maxDepth The max depth
*/
public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = PHP_INT_MAX)
{
$this->minDepth = $minDepth;
$iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
parent::__construct($iterator);
}
/**
* Filters the iterator values.
*
* @return bool true if the value should be kept, false otherwise
*/
public function accept()
{
return $this->getInnerIterator()->getDepth() >= $this->minDepth;
}
}

View File

@@ -1,84 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* ExcludeDirectoryFilterIterator filters out directories.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ExcludeDirectoryFilterIterator extends FilterIterator implements \RecursiveIterator
{
private $iterator;
private $isRecursive;
private $excludedDirs = array();
private $excludedPattern;
/**
* @param \Iterator $iterator The Iterator to filter
* @param array $directories An array of directories to exclude
*/
public function __construct(\Iterator $iterator, array $directories)
{
$this->iterator = $iterator;
$this->isRecursive = $iterator instanceof \RecursiveIterator;
$patterns = array();
foreach ($directories as $directory) {
$directory = rtrim($directory, '/');
if (!$this->isRecursive || false !== strpos($directory, '/')) {
$patterns[] = preg_quote($directory, '#');
} else {
$this->excludedDirs[$directory] = true;
}
}
if ($patterns) {
$this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#';
}
parent::__construct($iterator);
}
/**
* Filters the iterator values.
*
* @return bool True if the value should be kept, false otherwise
*/
public function accept()
{
if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
return false;
}
if ($this->excludedPattern) {
$path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
$path = str_replace('\\', '/', $path);
return !preg_match($this->excludedPattern, $path);
}
return true;
}
public function hasChildren()
{
return $this->isRecursive && $this->iterator->hasChildren();
}
public function getChildren()
{
$children = new self($this->iterator->getChildren(), array());
$children->excludedDirs = $this->excludedDirs;
$children->excludedPattern = $this->excludedPattern;
return $children;
}
}

View File

@@ -1,53 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* FileTypeFilterIterator only keeps files, directories, or both.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FileTypeFilterIterator extends FilterIterator
{
const ONLY_FILES = 1;
const ONLY_DIRECTORIES = 2;
private $mode;
/**
* @param \Iterator $iterator The Iterator to filter
* @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
*/
public function __construct(\Iterator $iterator, $mode)
{
$this->mode = $mode;
parent::__construct($iterator);
}
/**
* Filters the iterator values.
*
* @return bool true if the value should be kept, false otherwise
*/
public function accept()
{
$fileinfo = $this->current();
if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
return false;
} elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
return false;
}
return true;
}
}

View File

@@ -1,47 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
use Symfony\Component\Finder\Glob;
/**
* FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FilenameFilterIterator extends MultiplePcreFilterIterator
{
/**
* Filters the iterator values.
*
* @return bool true if the value should be kept, false otherwise
*/
public function accept()
{
return $this->isAccepted($this->current()->getFilename());
}
/**
* Converts glob to regexp.
*
* PCRE patterns are left unchanged.
* Glob strings are transformed with Glob::toRegex().
*
* @param string $str Pattern: glob or regexp
*
* @return string regexp corresponding to a given glob or regexp
*/
protected function toRegex($str)
{
return $this->isRegex($str) ? $str : Glob::toRegex($str);
}
}

View File

@@ -1,60 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* This iterator just overrides the rewind method in order to correct a PHP bug,
* which existed before version 5.5.23/5.6.7.
*
* @see https://bugs.php.net/68557
*
* @author Alex Bogomazov
*
* @deprecated since 3.4, to be removed in 4.0.
*/
abstract class FilterIterator extends \FilterIterator
{
/**
* This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after
* rewind in some cases.
*
* @see FilterIterator::rewind()
*/
public function rewind()
{
if (\PHP_VERSION_ID > 50607 || (\PHP_VERSION_ID > 50523 && \PHP_VERSION_ID < 50600)) {
parent::rewind();
return;
}
$iterator = $this;
while ($iterator instanceof \OuterIterator) {
$innerIterator = $iterator->getInnerIterator();
if ($innerIterator instanceof RecursiveDirectoryIterator) {
// this condition is necessary for iterators to work properly with non-local filesystems like ftp
if ($innerIterator->isRewindable()) {
$innerIterator->next();
$innerIterator->rewind();
}
} elseif ($innerIterator instanceof \FilesystemIterator) {
$innerIterator->next();
$innerIterator->rewind();
}
$iterator = $innerIterator;
}
parent::rewind();
}
}

View File

@@ -1,56 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* PathFilterIterator filters files by path patterns (e.g. some/special/dir).
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
*/
class PathFilterIterator extends MultiplePcreFilterIterator
{
/**
* Filters the iterator values.
*
* @return bool true if the value should be kept, false otherwise
*/
public function accept()
{
$filename = $this->current()->getRelativePathname();
if ('\\' === \DIRECTORY_SEPARATOR) {
$filename = str_replace('\\', '/', $filename);
}
return $this->isAccepted($filename);
}
/**
* Converts strings to regexp.
*
* PCRE patterns are left unchanged.
*
* Default conversion:
* 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
*
* Use only / as directory separator (on Windows also).
*
* @param string $str Pattern: regexp or dirname
*
* @return string regexp corresponding to a given string or regexp
*/
protected function toRegex($str)
{
return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
}
}

View File

@@ -1,154 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
use Symfony\Component\Finder\Exception\AccessDeniedException;
use Symfony\Component\Finder\SplFileInfo;
/**
* Extends the \RecursiveDirectoryIterator to support relative paths.
*
* @author Victor Berchet <victor@suumit.com>
*/
class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
{
/**
* @var bool
*/
private $ignoreUnreadableDirs;
/**
* @var bool
*/
private $rewindable;
// these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
private $rootPath;
private $subPath;
private $directorySeparator = '/';
/**
* @param string $path
* @param int $flags
* @param bool $ignoreUnreadableDirs
*
* @throws \RuntimeException
*/
public function __construct($path, $flags, $ignoreUnreadableDirs = false)
{
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
throw new \RuntimeException('This iterator only support returning current as fileinfo.');
}
parent::__construct($path, $flags);
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
$this->rootPath = $path;
if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
$this->directorySeparator = \DIRECTORY_SEPARATOR;
}
}
/**
* Return an instance of SplFileInfo with support for relative paths.
*
* @return SplFileInfo File information
*/
public function current()
{
// the logic here avoids redoing the same work in all iterations
if (null === $subPathname = $this->subPath) {
$subPathname = $this->subPath = (string) $this->getSubPath();
}
if ('' !== $subPathname) {
$subPathname .= $this->directorySeparator;
}
$subPathname .= $this->getFilename();
return new SplFileInfo($this->rootPath.$this->directorySeparator.$subPathname, $this->subPath, $subPathname);
}
/**
* @return \RecursiveIterator
*
* @throws AccessDeniedException
*/
public function getChildren()
{
try {
$children = parent::getChildren();
if ($children instanceof self) {
// parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
$children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
// performance optimization to avoid redoing the same work in all children
$children->rewindable = &$this->rewindable;
$children->rootPath = $this->rootPath;
}
return $children;
} catch (\UnexpectedValueException $e) {
if ($this->ignoreUnreadableDirs) {
// If directory is unreadable and finder is set to ignore it, a fake empty content is returned.
return new \RecursiveArrayIterator(array());
} else {
throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
}
}
}
/**
* Do nothing for non rewindable stream.
*/
public function rewind()
{
if (false === $this->isRewindable()) {
return;
}
// @see https://bugs.php.net/68557
if (\PHP_VERSION_ID < 50523 || \PHP_VERSION_ID >= 50600 && \PHP_VERSION_ID < 50607) {
parent::next();
}
parent::rewind();
}
/**
* Checks if the stream is rewindable.
*
* @return bool true when the stream is rewindable, false otherwise
*/
public function isRewindable()
{
if (null !== $this->rewindable) {
return $this->rewindable;
}
// workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed
if ('' === $this->getPath()) {
return $this->rewindable = false;
}
if (false !== $stream = @opendir($this->getPath())) {
$infos = stream_get_meta_data($stream);
closedir($stream);
if ($infos['seekable']) {
return $this->rewindable = true;
}
}
return $this->rewindable = false;
}
}

View File

@@ -1,80 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Finder\Iterator;
/**
* SortableIterator applies a sort on a given Iterator.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SortableIterator implements \IteratorAggregate
{
const SORT_BY_NAME = 1;
const SORT_BY_TYPE = 2;
const SORT_BY_ACCESSED_TIME = 3;
const SORT_BY_CHANGED_TIME = 4;
const SORT_BY_MODIFIED_TIME = 5;
private $iterator;
private $sort;
/**
* @param \Traversable $iterator The Iterator to filter
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
*
* @throws \InvalidArgumentException
*/
public function __construct(\Traversable $iterator, $sort)
{
$this->iterator = $iterator;
if (self::SORT_BY_NAME === $sort) {
$this->sort = function ($a, $b) {
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_TYPE === $sort) {
$this->sort = function ($a, $b) {
if ($a->isDir() && $b->isFile()) {
return -1;
} elseif ($a->isFile() && $b->isDir()) {
return 1;
}
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
$this->sort = function ($a, $b) {
return $a->getATime() - $b->getATime();
};
} elseif (self::SORT_BY_CHANGED_TIME === $sort) {
$this->sort = function ($a, $b) {
return $a->getCTime() - $b->getCTime();
};
} elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
$this->sort = function ($a, $b) {
return $a->getMTime() - $b->getMTime();
};
} elseif (\is_callable($sort)) {
$this->sort = $sort;
} else {
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
}
}
public function getIterator()
{
$array = iterator_to_array($this->iterator, true);
uasort($array, $this->sort);
return new \ArrayIterator($array);
}
}

View File

@@ -1,168 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
/**
* Represents an Accept-* header.
*
* An accept header is compound with a list of items,
* sorted by descending quality.
*
* @author Jean-François Simon <contact@jfsimon.fr>
*/
class AcceptHeader
{
/**
* @var AcceptHeaderItem[]
*/
private $items = array();
/**
* @var bool
*/
private $sorted = true;
/**
* @param AcceptHeaderItem[] $items
*/
public function __construct(array $items)
{
foreach ($items as $item) {
$this->add($item);
}
}
/**
* Builds an AcceptHeader instance from a string.
*
* @param string $headerValue
*
* @return self
*/
public static function fromString($headerValue)
{
$index = 0;
return new self(array_map(function ($itemValue) use (&$index) {
$item = AcceptHeaderItem::fromString($itemValue);
$item->setIndex($index++);
return $item;
}, preg_split('/\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)));
}
/**
* Returns header value's string representation.
*
* @return string
*/
public function __toString()
{
return implode(',', $this->items);
}
/**
* Tests if header has given value.
*
* @param string $value
*
* @return bool
*/
public function has($value)
{
return isset($this->items[$value]);
}
/**
* Returns given value's item, if exists.
*
* @param string $value
*
* @return AcceptHeaderItem|null
*/
public function get($value)
{
return isset($this->items[$value]) ? $this->items[$value] : null;
}
/**
* Adds an item.
*
* @return $this
*/
public function add(AcceptHeaderItem $item)
{
$this->items[$item->getValue()] = $item;
$this->sorted = false;
return $this;
}
/**
* Returns all items.
*
* @return AcceptHeaderItem[]
*/
public function all()
{
$this->sort();
return $this->items;
}
/**
* Filters items on their value using given regex.
*
* @param string $pattern
*
* @return self
*/
public function filter($pattern)
{
return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) {
return preg_match($pattern, $item->getValue());
}));
}
/**
* Returns first item.
*
* @return AcceptHeaderItem|null
*/
public function first()
{
$this->sort();
return !empty($this->items) ? reset($this->items) : null;
}
/**
* Sorts items by descending quality.
*/
private function sort()
{
if (!$this->sorted) {
uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) {
$qA = $a->getQuality();
$qB = $b->getQuality();
if ($qA === $qB) {
return $a->getIndex() > $b->getIndex() ? 1 : -1;
}
return $qA > $qB ? -1 : 1;
});
$this->sorted = true;
}
}
}

View File

@@ -1,144 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* FileBag is a container for uploaded files.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Bulat Shakirzyanov <mallluhuct@gmail.com>
*/
class FileBag extends ParameterBag
{
private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
/**
* @param array $parameters An array of HTTP files
*/
public function __construct(array $parameters = array())
{
$this->replace($parameters);
}
/**
* {@inheritdoc}
*/
public function replace(array $files = array())
{
$this->parameters = array();
$this->add($files);
}
/**
* {@inheritdoc}
*/
public function set($key, $value)
{
if (!\is_array($value) && !$value instanceof UploadedFile) {
throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
}
parent::set($key, $this->convertFileInformation($value));
}
/**
* {@inheritdoc}
*/
public function add(array $files = array())
{
foreach ($files as $key => $file) {
$this->set($key, $file);
}
}
/**
* Converts uploaded files to UploadedFile instances.
*
* @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information
*
* @return UploadedFile[]|UploadedFile|null A (multi-dimensional) array of UploadedFile instances
*/
protected function convertFileInformation($file)
{
if ($file instanceof UploadedFile) {
return $file;
}
$file = $this->fixPhpFilesArray($file);
if (\is_array($file)) {
$keys = array_keys($file);
sort($keys);
if ($keys == self::$fileKeys) {
if (UPLOAD_ERR_NO_FILE == $file['error']) {
$file = null;
} else {
$file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']);
}
} else {
$file = array_map(array($this, 'convertFileInformation'), $file);
if (array_keys($keys) === $keys) {
$file = array_filter($file);
}
}
}
return $file;
}
/**
* Fixes a malformed PHP $_FILES array.
*
* PHP has a bug that the format of the $_FILES array differs, depending on
* whether the uploaded file fields had normal field names or array-like
* field names ("normal" vs. "parent[child]").
*
* This method fixes the array to look like the "normal" $_FILES array.
*
* It's safe to pass an already converted array, in which case this method
* just returns the original array unmodified.
*
* @return array
*/
protected function fixPhpFilesArray($data)
{
if (!\is_array($data)) {
return $data;
}
$keys = array_keys($data);
sort($keys);
if (self::$fileKeys != $keys || !isset($data['name']) || !\is_array($data['name'])) {
return $data;
}
$files = $data;
foreach (self::$fileKeys as $k) {
unset($files[$k]);
}
foreach ($data['name'] as $key => $name) {
$files[$key] = $this->fixPhpFilesArray(array(
'error' => $data['error'][$key],
'name' => $name,
'type' => $data['type'][$key],
'tmp_name' => $data['tmp_name'][$key],
'size' => $data['size'][$key],
));
}
return $files;
}
}

View File

@@ -1,331 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
/**
* HeaderBag is a container for HTTP headers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class HeaderBag implements \IteratorAggregate, \Countable
{
protected $headers = array();
protected $cacheControl = array();
/**
* @param array $headers An array of HTTP headers
*/
public function __construct(array $headers = array())
{
foreach ($headers as $key => $values) {
$this->set($key, $values);
}
}
/**
* Returns the headers as a string.
*
* @return string The headers
*/
public function __toString()
{
if (!$headers = $this->all()) {
return '';
}
ksort($headers);
$max = max(array_map('strlen', array_keys($headers))) + 1;
$content = '';
foreach ($headers as $name => $values) {
$name = implode('-', array_map('ucfirst', explode('-', $name)));
foreach ($values as $value) {
$content .= sprintf("%-{$max}s %s\r\n", $name.':', $value);
}
}
return $content;
}
/**
* Returns the headers.
*
* @return array An array of headers
*/
public function all()
{
return $this->headers;
}
/**
* Returns the parameter keys.
*
* @return array An array of parameter keys
*/
public function keys()
{
return array_keys($this->all());
}
/**
* Replaces the current HTTP headers by a new set.
*
* @param array $headers An array of HTTP headers
*/
public function replace(array $headers = array())
{
$this->headers = array();
$this->add($headers);
}
/**
* Adds new headers the current HTTP headers set.
*
* @param array $headers An array of HTTP headers
*/
public function add(array $headers)
{
foreach ($headers as $key => $values) {
$this->set($key, $values);
}
}
/**
* Returns a header value by name.
*
* @param string $key The header name
* @param string|string[]|null $default The default value
* @param bool $first Whether to return the first value or all header values
*
* @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise
*/
public function get($key, $default = null, $first = true)
{
$key = str_replace('_', '-', strtolower($key));
$headers = $this->all();
if (!array_key_exists($key, $headers)) {
if (null === $default) {
return $first ? null : array();
}
return $first ? $default : array($default);
}
if ($first) {
return \count($headers[$key]) ? $headers[$key][0] : $default;
}
return $headers[$key];
}
/**
* Sets a header by name.
*
* @param string $key The key
* @param string|string[] $values The value or an array of values
* @param bool $replace Whether to replace the actual value or not (true by default)
*/
public function set($key, $values, $replace = true)
{
$key = str_replace('_', '-', strtolower($key));
if (\is_array($values)) {
$values = array_values($values);
if (true === $replace || !isset($this->headers[$key])) {
$this->headers[$key] = $values;
} else {
$this->headers[$key] = array_merge($this->headers[$key], $values);
}
} else {
if (true === $replace || !isset($this->headers[$key])) {
$this->headers[$key] = array($values);
} else {
$this->headers[$key][] = $values;
}
}
if ('cache-control' === $key) {
$this->cacheControl = $this->parseCacheControl(implode(', ', $this->headers[$key]));
}
}
/**
* Returns true if the HTTP header is defined.
*
* @param string $key The HTTP header
*
* @return bool true if the parameter exists, false otherwise
*/
public function has($key)
{
return array_key_exists(str_replace('_', '-', strtolower($key)), $this->all());
}
/**
* Returns true if the given HTTP header contains the given value.
*
* @param string $key The HTTP header name
* @param string $value The HTTP value
*
* @return bool true if the value is contained in the header, false otherwise
*/
public function contains($key, $value)
{
return \in_array($value, $this->get($key, null, false));
}
/**
* Removes a header.
*
* @param string $key The HTTP header name
*/
public function remove($key)
{
$key = str_replace('_', '-', strtolower($key));
unset($this->headers[$key]);
if ('cache-control' === $key) {
$this->cacheControl = array();
}
}
/**
* Returns the HTTP header value converted to a date.
*
* @param string $key The parameter key
* @param \DateTime $default The default value
*
* @return \DateTime|null The parsed DateTime or the default value if the header does not exist
*
* @throws \RuntimeException When the HTTP header is not parseable
*/
public function getDate($key, \DateTime $default = null)
{
if (null === $value = $this->get($key)) {
return $default;
}
if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) {
throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value));
}
return $date;
}
/**
* Adds a custom Cache-Control directive.
*
* @param string $key The Cache-Control directive name
* @param mixed $value The Cache-Control directive value
*/
public function addCacheControlDirective($key, $value = true)
{
$this->cacheControl[$key] = $value;
$this->set('Cache-Control', $this->getCacheControlHeader());
}
/**
* Returns true if the Cache-Control directive is defined.
*
* @param string $key The Cache-Control directive
*
* @return bool true if the directive exists, false otherwise
*/
public function hasCacheControlDirective($key)
{
return array_key_exists($key, $this->cacheControl);
}
/**
* Returns a Cache-Control directive value by name.
*
* @param string $key The directive name
*
* @return mixed|null The directive value if defined, null otherwise
*/
public function getCacheControlDirective($key)
{
return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null;
}
/**
* Removes a Cache-Control directive.
*
* @param string $key The Cache-Control directive
*/
public function removeCacheControlDirective($key)
{
unset($this->cacheControl[$key]);
$this->set('Cache-Control', $this->getCacheControlHeader());
}
/**
* Returns an iterator for headers.
*
* @return \ArrayIterator An \ArrayIterator instance
*/
public function getIterator()
{
return new \ArrayIterator($this->headers);
}
/**
* Returns the number of headers.
*
* @return int The number of headers
*/
public function count()
{
return \count($this->headers);
}
protected function getCacheControlHeader()
{
$parts = array();
ksort($this->cacheControl);
foreach ($this->cacheControl as $key => $value) {
if (true === $value) {
$parts[] = $key;
} else {
if (preg_match('#[^a-zA-Z0-9._-]#', $value)) {
$value = '"'.$value.'"';
}
$parts[] = "$key=$value";
}
}
return implode(', ', $parts);
}
/**
* Parses a Cache-Control HTTP header.
*
* @param string $header The value of the Cache-Control HTTP header
*
* @return array An array representing the attribute values
*/
protected function parseCacheControl($header)
{
$cacheControl = array();
preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true);
}
return $cacheControl;
}
}

View File

@@ -1,234 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
/**
* ParameterBag is a container for key/value pairs.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParameterBag implements \IteratorAggregate, \Countable
{
/**
* Parameter storage.
*/
protected $parameters;
/**
* @param array $parameters An array of parameters
*/
public function __construct(array $parameters = array())
{
$this->parameters = $parameters;
}
/**
* Returns the parameters.
*
* @return array An array of parameters
*/
public function all()
{
return $this->parameters;
}
/**
* Returns the parameter keys.
*
* @return array An array of parameter keys
*/
public function keys()
{
return array_keys($this->parameters);
}
/**
* Replaces the current parameters by a new set.
*
* @param array $parameters An array of parameters
*/
public function replace(array $parameters = array())
{
$this->parameters = $parameters;
}
/**
* Adds parameters.
*
* @param array $parameters An array of parameters
*/
public function add(array $parameters = array())
{
$this->parameters = array_replace($this->parameters, $parameters);
}
/**
* Returns a parameter by name.
*
* @param string $key The key
* @param mixed $default The default value if the parameter key does not exist
*
* @return mixed
*/
public function get($key, $default = null)
{
return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default;
}
/**
* Sets a parameter by name.
*
* @param string $key The key
* @param mixed $value The value
*/
public function set($key, $value)
{
$this->parameters[$key] = $value;
}
/**
* Returns true if the parameter is defined.
*
* @param string $key The key
*
* @return bool true if the parameter exists, false otherwise
*/
public function has($key)
{
return array_key_exists($key, $this->parameters);
}
/**
* Removes a parameter.
*
* @param string $key The key
*/
public function remove($key)
{
unset($this->parameters[$key]);
}
/**
* Returns the alphabetic characters of the parameter value.
*
* @param string $key The parameter key
* @param string $default The default value if the parameter key does not exist
*
* @return string The filtered value
*/
public function getAlpha($key, $default = '')
{
return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default));
}
/**
* Returns the alphabetic characters and digits of the parameter value.
*
* @param string $key The parameter key
* @param string $default The default value if the parameter key does not exist
*
* @return string The filtered value
*/
public function getAlnum($key, $default = '')
{
return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default));
}
/**
* Returns the digits of the parameter value.
*
* @param string $key The parameter key
* @param string $default The default value if the parameter key does not exist
*
* @return string The filtered value
*/
public function getDigits($key, $default = '')
{
// we need to remove - and + because they're allowed in the filter
return str_replace(array('-', '+'), '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT));
}
/**
* Returns the parameter value converted to integer.
*
* @param string $key The parameter key
* @param int $default The default value if the parameter key does not exist
*
* @return int The filtered value
*/
public function getInt($key, $default = 0)
{
return (int) $this->get($key, $default);
}
/**
* Returns the parameter value converted to boolean.
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
*
* @return bool The filtered value
*/
public function getBoolean($key, $default = false)
{
return $this->filter($key, $default, FILTER_VALIDATE_BOOLEAN);
}
/**
* Filter key.
*
* @param string $key Key
* @param mixed $default Default = null
* @param int $filter FILTER_* constant
* @param mixed $options Filter options
*
* @see http://php.net/manual/en/function.filter-var.php
*
* @return mixed
*/
public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array())
{
$value = $this->get($key, $default);
// Always turn $options into an array - this allows filter_var option shortcuts.
if (!\is_array($options) && $options) {
$options = array('flags' => $options);
}
// Add a convenience check for arrays.
if (\is_array($value) && !isset($options['flags'])) {
$options['flags'] = FILTER_REQUIRE_ARRAY;
}
return filter_var($value, $filter, $options);
}
/**
* Returns an iterator for parameters.
*
* @return \ArrayIterator An \ArrayIterator instance
*/
public function getIterator()
{
return new \ArrayIterator($this->parameters);
}
/**
* Returns the number of parameters.
*
* @return int The number of parameters
*/
public function count()
{
return \count($this->parameters);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,340 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
/**
* ResponseHeaderBag is a container for Response HTTP headers.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ResponseHeaderBag extends HeaderBag
{
const COOKIES_FLAT = 'flat';
const COOKIES_ARRAY = 'array';
const DISPOSITION_ATTACHMENT = 'attachment';
const DISPOSITION_INLINE = 'inline';
protected $computedCacheControl = array();
protected $cookies = array();
protected $headerNames = array();
public function __construct(array $headers = array())
{
parent::__construct($headers);
if (!isset($this->headers['cache-control'])) {
$this->set('Cache-Control', '');
}
/* RFC2616 - 14.18 says all Responses need to have a Date */
if (!isset($this->headers['date'])) {
$this->initDate();
}
}
/**
* Returns the headers, with original capitalizations.
*
* @return array An array of headers
*/
public function allPreserveCase()
{
$headers = array();
foreach ($this->all() as $name => $value) {
$headers[isset($this->headerNames[$name]) ? $this->headerNames[$name] : $name] = $value;
}
return $headers;
}
public function allPreserveCaseWithoutCookies()
{
$headers = $this->allPreserveCase();
if (isset($this->headerNames['set-cookie'])) {
unset($headers[$this->headerNames['set-cookie']]);
}
return $headers;
}
/**
* {@inheritdoc}
*/
public function replace(array $headers = array())
{
$this->headerNames = array();
parent::replace($headers);
if (!isset($this->headers['cache-control'])) {
$this->set('Cache-Control', '');
}
if (!isset($this->headers['date'])) {
$this->initDate();
}
}
/**
* {@inheritdoc}
*/
public function all()
{
$headers = parent::all();
foreach ($this->getCookies() as $cookie) {
$headers['set-cookie'][] = (string) $cookie;
}
return $headers;
}
/**
* {@inheritdoc}
*/
public function set($key, $values, $replace = true)
{
$uniqueKey = str_replace('_', '-', strtolower($key));
if ('set-cookie' === $uniqueKey) {
if ($replace) {
$this->cookies = array();
}
foreach ((array) $values as $cookie) {
$this->setCookie(Cookie::fromString($cookie));
}
$this->headerNames[$uniqueKey] = $key;
return;
}
$this->headerNames[$uniqueKey] = $key;
parent::set($key, $values, $replace);
// ensure the cache-control header has sensible defaults
if (\in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'), true)) {
$computed = $this->computeCacheControlValue();
$this->headers['cache-control'] = array($computed);
$this->headerNames['cache-control'] = 'Cache-Control';
$this->computedCacheControl = $this->parseCacheControl($computed);
}
}
/**
* {@inheritdoc}
*/
public function remove($key)
{
$uniqueKey = str_replace('_', '-', strtolower($key));
unset($this->headerNames[$uniqueKey]);
if ('set-cookie' === $uniqueKey) {
$this->cookies = array();
return;
}
parent::remove($key);
if ('cache-control' === $uniqueKey) {
$this->computedCacheControl = array();
}
if ('date' === $uniqueKey) {
$this->initDate();
}
}
/**
* {@inheritdoc}
*/
public function hasCacheControlDirective($key)
{
return array_key_exists($key, $this->computedCacheControl);
}
/**
* {@inheritdoc}
*/
public function getCacheControlDirective($key)
{
return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null;
}
public function setCookie(Cookie $cookie)
{
$this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie;
$this->headerNames['set-cookie'] = 'Set-Cookie';
}
/**
* Removes a cookie from the array, but does not unset it in the browser.
*
* @param string $name
* @param string $path
* @param string $domain
*/
public function removeCookie($name, $path = '/', $domain = null)
{
if (null === $path) {
$path = '/';
}
unset($this->cookies[$domain][$path][$name]);
if (empty($this->cookies[$domain][$path])) {
unset($this->cookies[$domain][$path]);
if (empty($this->cookies[$domain])) {
unset($this->cookies[$domain]);
}
}
if (empty($this->cookies)) {
unset($this->headerNames['set-cookie']);
}
}
/**
* Returns an array with all cookies.
*
* @param string $format
*
* @return Cookie[]
*
* @throws \InvalidArgumentException When the $format is invalid
*/
public function getCookies($format = self::COOKIES_FLAT)
{
if (!\in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) {
throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY))));
}
if (self::COOKIES_ARRAY === $format) {
return $this->cookies;
}
$flattenedCookies = array();
foreach ($this->cookies as $path) {
foreach ($path as $cookies) {
foreach ($cookies as $cookie) {
$flattenedCookies[] = $cookie;
}
}
}
return $flattenedCookies;
}
/**
* Clears a cookie in the browser.
*
* @param string $name
* @param string $path
* @param string $domain
* @param bool $secure
* @param bool $httpOnly
*/
public function clearCookie($name, $path = '/', $domain = null, $secure = false, $httpOnly = true)
{
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly));
}
/**
* Generates a HTTP Content-Disposition field-value.
*
* @param string $disposition One of "inline" or "attachment"
* @param string $filename A unicode string
* @param string $filenameFallback A string containing only ASCII characters that
* is semantically equivalent to $filename. If the filename is already ASCII,
* it can be omitted, or just copied from $filename
*
* @return string A string suitable for use as a Content-Disposition field-value
*
* @throws \InvalidArgumentException
*
* @see RFC 6266
*/
public function makeDisposition($disposition, $filename, $filenameFallback = '')
{
if (!\in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) {
throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE));
}
if ('' == $filenameFallback) {
$filenameFallback = $filename;
}
// filenameFallback is not ASCII.
if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) {
throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.');
}
// percent characters aren't safe in fallback.
if (false !== strpos($filenameFallback, '%')) {
throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.');
}
// path separators aren't allowed in either.
if (false !== strpos($filename, '/') || false !== strpos($filename, '\\') || false !== strpos($filenameFallback, '/') || false !== strpos($filenameFallback, '\\')) {
throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.');
}
$output = sprintf('%s; filename="%s"', $disposition, str_replace('"', '\\"', $filenameFallback));
if ($filename !== $filenameFallback) {
$output .= sprintf("; filename*=utf-8''%s", rawurlencode($filename));
}
return $output;
}
/**
* Returns the calculated value of the cache-control header.
*
* This considers several other headers and calculates or modifies the
* cache-control header to a sensible, conservative value.
*
* @return string
*/
protected function computeCacheControlValue()
{
if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) {
return 'no-cache, private';
}
if (!$this->cacheControl) {
// conservative by default
return 'private, must-revalidate';
}
$header = $this->getCacheControlHeader();
if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) {
return $header;
}
// public if s-maxage is defined, private otherwise
if (!isset($this->cacheControl['s-maxage'])) {
return $header.', private';
}
return $header;
}
private function initDate()
{
$now = \DateTime::createFromFormat('U', time());
$now->setTimezone(new \DateTimeZone('UTC'));
$this->set('Date', $now->format('D, d M Y H:i:s').' GMT');
}
}

View File

@@ -1,51 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Exception;
/**
* HttpException.
*
* @author Kris Wallsmith <kris@symfony.com>
*/
class HttpException extends \RuntimeException implements HttpExceptionInterface
{
private $statusCode;
private $headers;
public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = array(), $code = 0)
{
$this->statusCode = $statusCode;
$this->headers = $headers;
parent::__construct($message, $code, $previous);
}
public function getStatusCode()
{
return $this->statusCode;
}
public function getHeaders()
{
return $this->headers;
}
/**
* Set response headers.
*
* @param array $headers Response headers
*/
public function setHeaders(array $headers)
{
$this->headers = $headers;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,169 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Routing;
/**
* CompiledRoutes are returned by the RouteCompiler class.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class CompiledRoute implements \Serializable
{
private $variables;
private $tokens;
private $staticPrefix;
private $regex;
private $pathVariables;
private $hostVariables;
private $hostRegex;
private $hostTokens;
/**
* @param string $staticPrefix The static prefix of the compiled route
* @param string $regex The regular expression to use to match this route
* @param array $tokens An array of tokens to use to generate URL for this route
* @param array $pathVariables An array of path variables
* @param string|null $hostRegex Host regex
* @param array $hostTokens Host tokens
* @param array $hostVariables An array of host variables
* @param array $variables An array of variables (variables defined in the path and in the host patterns)
*/
public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array())
{
$this->staticPrefix = (string) $staticPrefix;
$this->regex = $regex;
$this->tokens = $tokens;
$this->pathVariables = $pathVariables;
$this->hostRegex = $hostRegex;
$this->hostTokens = $hostTokens;
$this->hostVariables = $hostVariables;
$this->variables = $variables;
}
/**
* {@inheritdoc}
*/
public function serialize()
{
return serialize(array(
'vars' => $this->variables,
'path_prefix' => $this->staticPrefix,
'path_regex' => $this->regex,
'path_tokens' => $this->tokens,
'path_vars' => $this->pathVariables,
'host_regex' => $this->hostRegex,
'host_tokens' => $this->hostTokens,
'host_vars' => $this->hostVariables,
));
}
/**
* {@inheritdoc}
*/
public function unserialize($serialized)
{
if (\PHP_VERSION_ID >= 70000) {
$data = unserialize($serialized, array('allowed_classes' => false));
} else {
$data = unserialize($serialized);
}
$this->variables = $data['vars'];
$this->staticPrefix = $data['path_prefix'];
$this->regex = $data['path_regex'];
$this->tokens = $data['path_tokens'];
$this->pathVariables = $data['path_vars'];
$this->hostRegex = $data['host_regex'];
$this->hostTokens = $data['host_tokens'];
$this->hostVariables = $data['host_vars'];
}
/**
* Returns the static prefix.
*
* @return string The static prefix
*/
public function getStaticPrefix()
{
return $this->staticPrefix;
}
/**
* Returns the regex.
*
* @return string The regex
*/
public function getRegex()
{
return $this->regex;
}
/**
* Returns the host regex.
*
* @return string|null The host regex or null
*/
public function getHostRegex()
{
return $this->hostRegex;
}
/**
* Returns the tokens.
*
* @return array The tokens
*/
public function getTokens()
{
return $this->tokens;
}
/**
* Returns the host tokens.
*
* @return array The tokens
*/
public function getHostTokens()
{
return $this->hostTokens;
}
/**
* Returns the variables.
*
* @return array The variables
*/
public function getVariables()
{
return $this->variables;
}
/**
* Returns the path variables.
*
* @return array The variables
*/
public function getPathVariables()
{
return $this->pathVariables;
}
/**
* Returns the host variables.
*
* @return array The variables
*/
public function getHostVariables()
{
return $this->hostVariables;
}
}

Some files were not shown because too many files have changed in this diff Show More