/home2/resumeca/carbazar.pk/vendor/opis/closure/src/SerializableClosure.php
<?php
/* ===========================================================================
* Copyright (c) 2018-2021 Zindex Software
*
* Licensed under the MIT License
* =========================================================================== */
namespace Opis\Closure;
use Closure;
use Serializable;
use SplObjectStorage;
use ReflectionObject;
/**
* Provides a wrapper for serialization of closures
*/
class SerializableClosure implements Serializable
{
/**
* @var Closure Wrapped closure
*
* @see \Opis\Closure\SerializableClosure::getClosure()
*/
protected $closure;
/**
* @var ReflectionClosure A reflection instance for closure
*
* @see \Opis\Closure\SerializableClosure::getReflector()
*/
protected $reflector;
/**
* @var mixed Used at deserialization to hold variables
*
* @see \Opis\Closure\SerializableClosure::unserialize()
* @see \Opis\Closure\SerializableClosure::getReflector()
*/
protected $code;
Arguments
"Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)"
/home2/resumeca/carbazar.pk/vendor/opis/closure/src/SerializableClosure.php
<?php
/* ===========================================================================
* Copyright (c) 2018-2021 Zindex Software
*
* Licensed under the MIT License
* =========================================================================== */
namespace Opis\Closure;
use Closure;
use Serializable;
use SplObjectStorage;
use ReflectionObject;
/**
* Provides a wrapper for serialization of closures
*/
class SerializableClosure implements Serializable
{
/**
* @var Closure Wrapped closure
*
* @see \Opis\Closure\SerializableClosure::getClosure()
*/
protected $closure;
/**
* @var ReflectionClosure A reflection instance for closure
*
* @see \Opis\Closure\SerializableClosure::getReflector()
*/
protected $reflector;
/**
* @var mixed Used at deserialization to hold variables
*
* @see \Opis\Closure\SerializableClosure::unserialize()
* @see \Opis\Closure\SerializableClosure::getReflector()
*/
protected $code;
/home2/resumeca/carbazar.pk/vendor/composer/ClassLoader.php
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
Arguments
"/home2/resumeca/carbazar.pk/vendor/opis/closure/src/SerializableClosure.php"
/home2/resumeca/carbazar.pk/vendor/composer/ClassLoader.php
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
*/
protected function registerEncrypter()
{
$this->app->singleton('encrypter', function ($app) {
$config = $app->make('config')->get('app');
return new Encrypter($this->parseKey($config), $config['cipher']);
});
}
/**
* Configure Opis Closure signing for security.
*
* @return void
*/
protected function registerOpisSecurityKey()
{
$config = $this->app->make('config')->get('app');
if (! class_exists(SerializableClosure::class) || empty($config['key'])) {
return;
}
SerializableClosure::setSecretKey($this->parseKey($config));
}
/**
* Parse the encryption key.
*
* @param array $config
* @return string
*/
protected function parseKey(array $config)
{
if (Str::startsWith($key = $this->key($config), $prefix = 'base64:')) {
$key = base64_decode(Str::after($key, $prefix));
}
return $key;
}
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
<?php
namespace Illuminate\Encryption;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Opis\Closure\SerializableClosure;
class EncryptionServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerEncrypter();
$this->registerOpisSecurityKey();
}
/**
* Register the encrypter.
*
* @return void
*/
protected function registerEncrypter()
{
$this->app->singleton('encrypter', function ($app) {
$config = $app->make('config')->get('app');
return new Encrypter($this->parseKey($config), $config['cipher']);
});
}
/**
* Configure Opis Closure signing for security.
*
* @return void
*/
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
* Register a service provider with the application.
*
* @param \Illuminate\Support\ServiceProvider|string $provider
* @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $force = false)
{
if (($registered = $this->getProvider($provider)) && ! $force) {
return $registered;
}
// If the given "provider" is a string, we will resolve it, passing in the
// application instance automatically for the developer. This is simply
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
}
$provider->register();
// If there are bindings / singletons set as properties on the provider we
// will spin through them and register them with the application, which
// serves as a convenience layer while registering a lot of bindings.
if (property_exists($provider, 'bindings')) {
foreach ($provider->bindings as $key => $value) {
$this->bind($key, $value);
}
}
if (property_exists($provider, 'singletons')) {
foreach ($provider->singletons as $key => $value) {
$this->singleton($key, $value);
}
}
$this->markAsRegistered($provider);
// If the application has already booted, we will call this boot method on
// the provider class so it has an opportunity to do its boot logic and
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
// 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);
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
{
return $this['env'] === 'testing';
}
/**
* Register all of the configured providers.
*
* @return void
*/
public function registerConfiguredProviders()
{
$providers = Collection::make($this->make('config')->get('app.providers'))
->partition(function ($provider) {
return strpos($provider, 'Illuminate\\') === 0;
});
$providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
(new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
->load($providers->collapse()->toArray());
}
/**
* Register a service provider with the application.
*
* @param \Illuminate\Support\ServiceProvider|string $provider
* @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $force = false)
{
if (($registered = $this->getProvider($provider)) && ! $force) {
return $registered;
}
// If the given "provider" is a string, we will resolve it, passing in the
// application instance automatically for the developer. This is simply
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php
<?php
namespace Illuminate\Foundation\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
class RegisterProviders
{
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->registerConfiguredProviders();
}
}
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
{
$this->register(new EventServiceProvider($this));
$this->register(new LogServiceProvider($this));
$this->register(new RoutingServiceProvider($this));
}
/**
* Run the given array of bootstrap classes.
*
* @param string[] $bootstrappers
* @return void
*/
public function bootstrapWith(array $bootstrappers)
{
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
/**
* Register a callback to run after loading the environment.
*
* @param \Closure $callback
* @return void
*/
public function afterLoadingEnvironment(Closure $callback)
{
return $this->afterBootstrapping(
LoadEnvironmentVariables::class, $callback
);
}
/**
* Register a callback to run before a bootstrapper.
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
*
* @return \Closure
*/
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
/home2/resumeca/carbazar.pk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
public function __construct(Application $app, Router $router)
{
$this->app = $app;
$this->router = $router;
$this->syncMiddlewareToRouter();
}
/**
* Handle an incoming HTTP request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
/home2/resumeca/carbazar.pk/public/index.php
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
$request = Request::capture()
)->send();
$kernel->terminate($request, $response);