/home/glasmfgl/sensationfilms.xyz/engine/app/Http/Controllers/TMDB/TMDB.php
public static function getPeoplePopular($page = 1)
{
$result = self::_call('person/popular', '&page='. $page);
return new WithPagination($result, 'people');
}
public static function getPeople($id, $page = 1)
{
$appendToResponse = self::_APPENDER_PEOPLE_;
$result = self::_call('person/'.$id, $appendToResponse);
return new Person($result);
}
public static function getGenreLists()
{
$result = self::_call('genre/movie/list');
$genres = [];
foreach ($result['genres'] as $data) {
$genres[] = new Genre($data);
}
return $genres;
}
public function getSearch($keyword = '', $page = 1)
{
$result = self::_call('search/movie', '&page='. $page.'&query='.$keyword);
return new WithPagination($result, 'movie');
}
public static function _call($action, $appendToResponse = '', $options = [])
{
$url = self::_API_URL_.$action .'?api_key='. config('tmdb.api_key') .'&append_to_response='. implode(',', (array) $appendToResponse) .'&include_adult='. self::_ADULT_ .'&include_image_language=en,null';
if (!empty($options)) {
$url = $url.'&'.http_build_query($options);
}else{
$options = ['language' => request()->segment(1) ];
Arguments
"Undefined index: genres"
/home/glasmfgl/sensationfilms.xyz/engine/app/Http/Controllers/TMDB/TMDB.php
public static function getPeoplePopular($page = 1)
{
$result = self::_call('person/popular', '&page='. $page);
return new WithPagination($result, 'people');
}
public static function getPeople($id, $page = 1)
{
$appendToResponse = self::_APPENDER_PEOPLE_;
$result = self::_call('person/'.$id, $appendToResponse);
return new Person($result);
}
public static function getGenreLists()
{
$result = self::_call('genre/movie/list');
$genres = [];
foreach ($result['genres'] as $data) {
$genres[] = new Genre($data);
}
return $genres;
}
public function getSearch($keyword = '', $page = 1)
{
$result = self::_call('search/movie', '&page='. $page.'&query='.$keyword);
return new WithPagination($result, 'movie');
}
public static function _call($action, $appendToResponse = '', $options = [])
{
$url = self::_API_URL_.$action .'?api_key='. config('tmdb.api_key') .'&append_to_response='. implode(',', (array) $appendToResponse) .'&include_adult='. self::_ADULT_ .'&include_image_language=en,null';
if (!empty($options)) {
$url = $url.'&'.http_build_query($options);
}else{
$options = ['language' => request()->segment(1) ];
Arguments
8
"Undefined index: genres"
"/home/glasmfgl/sensationfilms.xyz/engine/app/Http/Controllers/TMDB/TMDB.php"
99
array:2 [
"result" => []
"genres" => []
]
/home/glasmfgl/sensationfilms.xyz/engine/app/Http/Controllers/Frontend.php
$title = $data->getName();
$this->getSEOMeta(
title_case($title),
title_case($title)
);
return view(config('tmdb.theme').'.people', compact('data', 'title'));
}
public function genreLists()
{
$tmdb = new TMDB;
if ($this->isCache()) {
$data = Cache::remember('genre-lists-'.$this->getLanguage(), config('tmdb.cache_exp'), function () use ($tmdb) {
return $tmdb->getGenreLists();
});
}else{
$data = $tmdb->getGenreLists();
}
return $data;
}
public function isCache()
{
return config('tmdb.is_cache');
}
private function paginate($results, $total, $perPage, $currentPage)
{
return new LengthAwarePaginator($results, $total, $perPage, $currentPage);
}
public function getLanguage()
{
return request()->segment(1);
}
/home/glasmfgl/sensationfilms.xyz/engine/app/Providers/AppServiceProvider.php
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
app()->setLocale(request()->segment(1));
Paginator::defaultView(config('tmdb.theme').'.pagination');
$frontend = new Frontend;
view()->share('genre_list', $frontend->genreLists());
}
}
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
* 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
*
* @throws \ReflectionException
* @throws \InvalidArgumentException
*/
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
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
* 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
*
* @throws \ReflectionException
* @throws \InvalidArgumentException
*/
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
Arguments
array:2 [
0 => AppServiceProvider {#104}
1 => "boot"
]
[]
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
* @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
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
* @param \Illuminate\Container\Container $container
* @param callable|string $callback
* @param array $parameters
* @param string|null $defaultMethod
* @return mixed
*
* @throws \ReflectionException
* @throws \InvalidArgumentException
*/
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.
Arguments
Application {#2}
array:2 [
0 => AppServiceProvider {#104}
1 => "boot"
]
Closure() {#43 …4}
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Container/Container.php
* @return \Closure
*/
public function wrap(Closure $callback, array $parameters = [])
{
return function () use ($callback, $parameters) {
return $this->call($callback, $parameters);
};
}
/**
* Call the given Closure / class@method and inject its dependencies.
*
* @param callable|string $callback
* @param array $parameters
* @param string|null $defaultMethod
* @return mixed
*/
public function call($callback, array $parameters = [], $defaultMethod = null)
{
return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
}
/**
* Get a closure to resolve the given type from the container.
*
* @param string $abstract
* @return \Closure
*/
public function factory($abstract)
{
return function () use ($abstract) {
return $this->make($abstract);
};
}
/**
* An alias function name for make().
*
* @param string $abstract
* @param array $parameters
Arguments
Application {#2}
array:2 [
0 => AppServiceProvider {#104}
1 => "boot"
]
[]
null
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
}
/**
* Boot the given service provider.
*
* @param \Illuminate\Support\ServiceProvider $provider
* @return mixed
*/
protected function bootProvider(ServiceProvider $provider)
{
if (method_exists($provider, 'boot')) {
return $this->call([$provider, 'boot']);
}
}
/**
* Register a new boot listener.
*
* @param callable $callback
* @return void
*/
public function booting($callback)
{
$this->bootingCallbacks[] = $callback;
}
/**
* Register a new "booted" listener.
*
* @param callable $callback
* @return void
*/
Arguments
array:2 [
0 => AppServiceProvider {#104}
1 => "boot"
]
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
}
/**
* Boot the application's service providers.
*
* @return void
*/
public function boot()
{
if ($this->booted) {
return;
}
// Once the application has booted we will also fire some "booted" callbacks
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
}
/**
* Boot the given service provider.
*
* @param \Illuminate\Support\ServiceProvider $provider
* @return mixed
*/
protected function bootProvider(ServiceProvider $provider)
{
if (method_exists($provider, 'boot')) {
return $this->call([$provider, 'boot']);
}
}
Arguments
AppServiceProvider {#104}
[internal]
Arguments
AppServiceProvider {#104}
19
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
/**
* Boot the application's service providers.
*
* @return void
*/
public function boot()
{
if ($this->booted) {
return;
}
// Once the application has booted we will also fire some "booted" callbacks
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
}
/**
* Boot the given service provider.
*
* @param \Illuminate\Support\ServiceProvider $provider
* @return mixed
*/
protected function bootProvider(ServiceProvider $provider)
{
if (method_exists($provider, 'boot')) {
return $this->call([$provider, 'boot']);
}
}
/**
Arguments
array:25 [
0 => EventServiceProvider {#7}
1 => LogServiceProvider {#9}
2 => RoutingServiceProvider {#11}
3 => AuthServiceProvider {#51}
4 => CookieServiceProvider {#58}
5 => DatabaseServiceProvider {#60}
6 => EncryptionServiceProvider {#67}
7 => FilesystemServiceProvider {#69}
8 => FormRequestServiceProvider {#75}
9 => FoundationServiceProvider {#74}
10 => NotificationServiceProvider {#78}
11 => PaginationServiceProvider {#80}
12 => SessionServiceProvider {#84}
13 => ViewServiceProvider {#88}
14 => ServiceProvider {#92}
15 => TrustedProxyServiceProvider {#93}
16 => DumpServerServiceProvider {#94}
17 => MopieServiceProvider {#102}
18 => TMDBServiceProvider {#103}
19 => AppServiceProvider {#104}
20 => AuthServiceProvider {#105}
21 => EventServiceProvider {#106}
22 => RouteServiceProvider {#107}
23 => TranslationServiceProvider {#120}
24 => HashServiceProvider {#147}
]
Closure($p) {#45 …4}
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php
<?php
namespace Illuminate\Foundation\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
class BootProviders
{
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->boot();
}
}
/home/glasmfgl/sensationfilms.xyz/engine/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.
Arguments
/home/glasmfgl/sensationfilms.xyz/engine/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.
*
Arguments
array:6 [
0 => "Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables"
1 => "Illuminate\Foundation\Bootstrap\LoadConfiguration"
2 => "Illuminate\Foundation\Bootstrap\HandleExceptions"
3 => "Illuminate\Foundation\Bootstrap\RegisterFacades"
4 => "Illuminate\Foundation\Bootstrap\RegisterProviders"
5 => "Illuminate\Foundation\Bootstrap\BootProviders"
]
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$this->app['events']->dispatch(
new Events\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());
}
}
/**
/home/glasmfgl/sensationfilms.xyz/engine/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$router->middlewareGroup($key, $middleware);
}
foreach ($this->routeMiddleware as $key => $middleware) {
$router->aliasMiddleware($key, $middleware);
}
}
/**
* 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 (Exception $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
} catch (Throwable $e) {
$this->reportException($e = new FatalThrowableError($e));
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new Events\RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
Arguments
Request {#44
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
+attributes: ParameterBag {#46}
+request: ParameterBag {#52}
+query: ParameterBag {#52}
+server: ServerBag {#48}
+files: FileBag {#49}
+cookies: ParameterBag {#47}
+headers: HeaderBag {#50}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: "/uk/movie/8536/superman-ii"
#requestUri: "/uk/movie/8536/superman-ii"
#baseUrl: ""
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-isHostValid: true
-isForwardedValid: true
basePath: ""
method: "GET"
format: "html"
}
/home/glasmfgl/sensationfilms.xyz/index.php
$app->bind('path.public', function() {
return __DIR__;
});
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Arguments
Request {#44
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
+attributes: ParameterBag {#46}
+request: ParameterBag {#52}
+query: ParameterBag {#52}
+server: ServerBag {#48}
+files: FileBag {#49}
+cookies: ParameterBag {#47}
+headers: HeaderBag {#50}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: "/uk/movie/8536/superman-ii"
#requestUri: "/uk/movie/8536/superman-ii"
#baseUrl: ""
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-isHostValid: true
-isForwardedValid: true
basePath: ""
method: "GET"
format: "html"
}