Overview

Namespaces

  • momentphp
    • exceptions
    • interfaces
    • middlewares
    • providers
    • traits
  • None

Classes

  • App
  • Bundle
  • Cache
  • CallableResolver
  • Config
  • Controller
  • Database
  • DebugInfo
  • Error
  • ExceptionHandler
  • FlashMessages
  • Helper
  • Log
  • Middleware
  • Model
  • ObjectCache
  • Provider
  • Registry
  • Router
  • Settings
  • SmartyViewEngine
  • Template
  • TwigViewEngine
  • View
  • Overview
  • Namespace
  • Class

Class App

App

momentphp\App uses momentphp\traits\ContainerTrait, momentphp\traits\CollectionTrait, momentphp\traits\EventsDispatcherTrait
Namespace: momentphp
Located at App.php
Methods summary
public
# __construct( array $bundles = [], array $container = [] )

Constructor

Constructor

Parameters

$bundles
$container
protected array
# defaultPaths( Illuminate\Support\Collection $bundles, string $resource )

Default paths

Default paths

Parameters

$bundles
$resource

Returns

array
public
# resource( string $key, callable $callable )

Add resource

Add resource

Parameters

$key
$callable
public array
# resourcePaths( string $key )

Return resource paths

Return resource paths

Parameters

$key

Returns

array
public static momentphp\App
# getInstance( )

Get the globally available app

Get the globally available app

Returns

momentphp\App
public static
# setInstance( momentphp\App $app )

Set the globally available app

Set the globally available app

Parameters

$app
public boolean
# registerAutoloader( )

Register autoloader

Register autoloader

Returns

boolean
public boolean
# unregisterAutoloader( )

Unregister autoloader

Unregister autoloader

Returns

boolean
protected
# loadClass( string $class )

Autoloader

Autoloader

Parameters

$class
public string
# bundleClass( null|string $relativeClass = null )

Return PHP namespace of last bundle inside collection

Return PHP namespace of last bundle inside collection

Parameters

$relativeClass
$class

Returns

string
public
# service( string $name, callable $callable )

Register service in the container (helper)

Register service in the container (helper)

Parameters

$name
$callable
public string
# url( string $name, array $data = [], array $queryParams = [] )

Build the path for a named route including the base path (helper)

Build the path for a named route including the base path (helper)

Parameters

$name
$data
$queryParams

Returns

string
public string
# fingerprint( string $glue = '_' )

Return fingerprint

Return fingerprint

Parameters

$glue

Returns

string
public Illuminate\Support\Collection|momentphp\Bundle
# bundles( null|string $alias = null )

Return bundle(s)

Return bundle(s)

Parameters

$alias

Returns

Illuminate\Support\Collection|momentphp\Bundle
public
# registerProviders( )

Register providers

Register providers

public
# registerMiddlewares( )

Register middlewares

Register middlewares

public
# registerRoutes( )

Register routes

Register routes

public
# bootBundles( )

Boot bundles

Boot bundles

public
# bootProviders( )

Boot providers

Boot providers

public
# boot( )

Boot app

Boot app

public Psr\Http\Message\ResponseInterface
# run( boolean $silent = false )

Run app

Run app

Parameters

$silent

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# visit( string $uri, string $method = 'GET' )

Simulate app request

Simulate app request

Parameters

$uri
$method

Returns

Psr\Http\Message\ResponseInterface
public mixed
# __get( string $name )

Container proxy method

Container proxy method

Parameters

$name

Returns

mixed
public mixed
# __isset( string $name )

Container proxy method

Container proxy method

Parameters

$name

Returns

mixed
public mixed
# __call( string $method, array $args = [] )

Proxy calls to underlying Slim app

Proxy calls to underlying Slim app

Parameters

$method
$args

Returns

mixed
Methods used from momentphp\traits\ContainerTrait
container()
Methods used from momentphp\traits\CollectionTrait
collection()
Methods used from momentphp\traits\EventsDispatcherTrait
bindImplementedEvents(), eventsDispatcher()
Properties summary
protected static momentphp\App $instance

Globally available app

Globally available app

#
public Slim\App $slim

Slim app

Slim app

#
public boolean $booted

Booted flag

Booted flag

# false
protected boolean $autoloaderRegistered

Autoloader registered flag

Autoloader registered flag

# false
protected array $resources

Resources

Resources

# []
protected array $providers

Providers

Providers

# []
Properties used from momentphp\traits\ContainerTrait
$app, $container
Properties used from momentphp\traits\CollectionTrait
$collection
Properties used from momentphp\traits\EventsDispatcherTrait
$eventsDispatcher
MomentPHP API documentation generated by ApiGen