Overview

Namespaces

  • Core
    • Auth
    • Exceptions
    • Helpers
    • Providers
  • Kernel
    • Dispatch
    • Providers
  • None
  • Vendor
    • ExampleVendor

Classes

  • Controller
  • ErrorController
  • HomeController
  • HomeModel
  • LoginController
  • LoginModel
  • Model

Functions

  • _die
  • asset
  • clock_end
  • clock_start
  • clock_time
  • config
  • ddie
  • deleteDir
  • email_png
  • env
  • folder_action
  • folder_recurse
  • generateFile
  • getClientIP
  • getClientUserAgent
  • getVersion
  • isAjax
  • isAuth
  • isDev
  • isLocalServer
  • isProd
  • nocache
  • php
  • ppie
  • query
  • queryIndexed
  • save_ini_file
  • t
  • versioning
  • view
  • write_ini
  • Overview
  • Namespace
  • Class
  • Download

Class Controller

Class Controller acts as a stepping stone (or "intermediate agent") between the user-defined code (/src/controllers/) and the system-defined code (ParentController) that helps to better structure the code. See @example

Core\ParentController
Extended by Controller

Direct known subclasses

HomeController
Example:
// To avoid:
FooController->showProducts();
// and
BarController->showProducts();
// to be defined twice (one in each controller) or once (in ParentController, bad code practices)
Controller->showProducts();
// can be defined and thus accessed from both <b>Foo</b> and <b>Bar</b> Controllers.

Located at src/controllers/Controller.php
Methods summary
public static Controller
# singleton( )

Returns a Controller instance, creating it if it did not exist.

Returns a Controller instance, creating it if it did not exist.

Returns

Controller

Overrides

Core\ParentController::singleton()
public
# __construct( )

Every Controller that extends ParentController must explicitly

Every Controller that extends ParentController must explicitly

Overrides

Core\ParentController::__construct()
Methods inherited from Core\ParentController
add(), addFooter(), addHeader(), addJSVar(), addScript(), addStyle(), asset(), cache(), compressWithMinify(), get(), getGet(), getModel(), getPost(), header(), json(), minimize(), minimizeURL(), path(), redirect(), setFavicon(), setTitle(), show(), url()
Properties summary
protected Model $model

The instance of Model.

The instance of Model.

#
Properties inherited from Core\ParentController
$ajax, $config, $hooks, $path, $templatePath, $vars, $viewPath
Ribosome API documentation generated by ApiGen