Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Factory
  • FactorySpec
  • Overview
  • Namespace
  • Class
  • Tree

Class Factory

Factory to build handlers

Namespace: Xoops\Core\Handler
Package: Xoops\Core
Category: Xoops\Core\Handler\Factory
Copyright: 2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at oops_lib/Xoops/Core/Handler/Factory.php
Methods summary
public static Xoops\Core\Handler\Factory
# getInstance( )

Returns the Singleton instance of this class.

Returns the Singleton instance of this class.

Returns

Xoops\Core\Handler\Factory
the singleton instance.
protected
# __construct( )

Protected constructor to prevent creating a new instance of the Singleton via the new operator from outside of this class.

Protected constructor to prevent creating a new instance of the Singleton via the new operator from outside of this class.

public XoopsObjectHandler|null
# create( string $name, string|null $dirname = null, boolean $optional = false )

Parameters

$name

Handler name - well known kernel handler name - FQN of handler class, PSR4 loadable - Full class name, to be located in a module namespace - legacy class file name (no extension) in module/dirname/class - a registered scheme name, i.e. scheme:classname

$dirname
$optional

Returns

XoopsObjectHandler|null
public
# registerScheme( string $name, string $className )

Parameters

$name
scheme name
$className

fully qualified name of class that implements the scheme. this class must implement the SchemeInterface

public static Xoops\Core\Handler\FactorySpec
# newSpec( )

Returns

Xoops\Core\Handler\FactorySpec
public XoopsObjectHandler
# build( Xoops\Core\Handler\FactorySpec $spec )

Build dispatches the appropriate scheme class to instantiate a handler based on the specification

Build dispatches the appropriate scheme class to instantiate a handler based on the specification

Parameters

$spec
specification for requested handler

Returns

XoopsObjectHandler
handler object

Throws

Xoops\Core\Exception\InvalidHandlerSpecException
Xoops\Core\Exception\NoHandlerException
public Xoops\Core\Database\Connection
# db( )

Returns

Xoops\Core\Database\Connection
API documentation generated by ApiGen