Mvc\Micro::setService

public Phalcon\Di\ServiceInterface setService (string $serviceName, mixed $definition, [boolean $shared]) Sets a service from the DI

Mvc\Micro\Collection

implements Phalcon\Mvc\Micro\CollectionInterface Source on GitHub Groups Micro-Mvc handlers as controllers $app = new \Phalcon\Mvc\Micro(); $collection = new Collection(); $collection->setHandler(new PostsController()); $collection->get('/posts/edit/{id}', 'edit'); $app->mount($collection); Methods protected _addMap (string | array $method, string $routePattern, mixed $handler, string $name) Internal function to add a handler to the group public setPrefix (mixed $prefix) Sets

Mvc\Micro::setDI

public setDI (Phalcon\DiInterface $dependencyInjector) Sets the DependencyInjector container

Mvc\Micro::post

public Phalcon\Mvc\Router\RouteInterface post (string $routePattern, callable $handler) Maps a route to a handler that only matches if the HTTP method is POST

Mvc\Micro::offsetGet

public mixed offsetGet (string $alias) Allows to obtain a shared service in the internal services container using the array syntax var_dump($di['request']);

Mvc\Micro::patch

public Phalcon\Mvc\Router\RouteInterface patch (string $routePattern, callable $handler) Maps a route to a handler that only matches if the HTTP method is PATCH

Mvc\Micro::offsetUnset

public offsetUnset (string $alias) Removes a service from the internal services container using the array syntax

Mvc\Micro::offsetSet

public offsetSet (string $alias, mixed $definition) Allows to register a shared service in the internal services container using the array syntax $app['request'] = new \Phalcon\Http\Request();

Mvc\Micro::options

public Phalcon\Mvc\Router\RouteInterface options (string $routePattern, callable $handler) Maps a route to a handler that only matches if the HTTP method is OPTIONS

Mvc\Micro::hasService

public hasService (mixed $serviceName) Checks if a service is registered in the DI