PHP 클래스 FOF30\Factory\BasicFactory

상속: implements FOF30\Factory\FactoryInterface
파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$container The container we belong to
$formLookupInOtherSide Should I look for form files on the other side of the component?
$saveControllerScaffolding When enabled, FOF will commit controller scaffolding results to disk.
$saveModelScaffolding When enabled, FOF will commit model scaffolding results to disk.
$saveScaffolding When enabled, FOF will commit the scaffolding results to disk.
$saveViewScaffolding When enabled, FOF will commit view scaffolding results to disk.
$scaffolding Should I enable view scaffolding, i.e. automatic browse, read and add/edit XML form generation when there's no other view template?
$section string Section used to build the namespace prefix. We have to pass it since in CLI scaffolding we need to force the section we're in (ie Site or Admin). {@see \FOF30\Container\Container::getNamespacePrefix() } for valid values

공개 메소드들

메소드 설명
__construct ( Container $container ) Public constructor for the factory object
controller ( string $viewName, array $config = [] ) : Controller Create a new Controller object
dispatcher ( array $config = [] ) : Dispatcher Creates a new Dispatcher
form ( string $name, string $source, string $viewName, array $options = [], boolean $replace = true, boolean $xpath = false ) : Form | null Creates a new Form object
getSection ( ) : string
isSaveControllerScaffolding ( ) : boolean Should we save controller scaffolding to disk?
isSaveModelScaffolding ( ) : boolean Should we save model scaffolding to disk?
isSaveScaffolding ( ) : boolean Is saving the scaffolding result to disk enabled?
isSaveViewScaffolding ( ) : boolean Should we save view scaffolding to disk?
isScaffolding ( ) : boolean Is scaffolding enabled?
model ( string $viewName, array $config = [] ) : Model Create a new Model object
setSaveControllerScaffolding ( boolean $state ) Should we save controller to disk?
setSaveModelScaffolding ( boolean $state ) Should we save model to disk?
setSaveScaffolding ( boolean $saveScaffolding ) Set the status of saving the scaffolding result to disk.
setSaveViewScaffolding ( boolean $state ) Should we save view to disk?
setScaffolding ( boolean $scaffolding ) Set the scaffolding status
setSection ( string $section )
toolbar ( array $config = [] ) : Toolbar Creates a new Toolbar
transparentAuthentication ( array $config = [] ) : TransparentAuthentication Creates a new TransparentAuthentication handler
view ( string $viewName, string $viewType = 'html', array $config = [] ) : View Create a new View object
viewFinder ( View $view, array $config = [] ) : mixed Creates a view template finder object for a specific View

보호된 메소드들

메소드 설명
createController ( string $controllerClass, array $config = [] ) : Controller Creates a Controller object
createDispatcher ( string $dispatcherClass, array $config = [] ) : Dispatcher Creates a Dispatcher object
createModel ( string $modelClass, array $config = [] ) : Model Creates a Model object
createToolbar ( string $toolbarClass, array $config = [] ) : Toolbar Creates a Toolbar object
createTransparentAuthentication ( string $authClass, array $config ) : TransparentAuthentication Creates a TransparentAuthentication object
createView ( string $viewClass, array $config = [] ) : Model Creates a View object
getFormFilename ( string $source, string $viewName = null ) : string | boolean Tries to find the absolute file path for an abstract form filename. For example, it may convert form.default to home/myuser/mysite/components/com_foobar/View/tmpl/form.default.xml.

메소드 상세

__construct() 공개 메소드

Public constructor for the factory object
public __construct ( Container $container )
$container FOF30\Container\Container The container we belong to

controller() 공개 메소드

Create a new Controller object
public controller ( string $viewName, array $config = [] ) : Controller
$viewName string The name of the view we're getting a Controller for.
$config array Optional MVC configuration values for the Controller object.
리턴 FOF30\Controller\Controller

createController() 보호된 메소드

Creates a Controller object
protected createController ( string $controllerClass, array $config = [] ) : Controller
$controllerClass string The fully qualified class name for the Controller
$config array Optional MVC configuration values for the Controller object.
리턴 FOF30\Controller\Controller

createDispatcher() 보호된 메소드

Creates a Dispatcher object
protected createDispatcher ( string $dispatcherClass, array $config = [] ) : Dispatcher
$dispatcherClass string The fully qualified class name for the Dispatcher
$config array The configuration values for the Dispatcher object
리턴 FOF30\Dispatcher\Dispatcher

createModel() 보호된 메소드

Creates a Model object
protected createModel ( string $modelClass, array $config = [] ) : Model
$modelClass string The fully qualified class name for the Model
$config array Optional MVC configuration values for the Model object.
리턴 FOF30\Model\Model

createToolbar() 보호된 메소드

Creates a Toolbar object
protected createToolbar ( string $toolbarClass, array $config = [] ) : Toolbar
$toolbarClass string The fully qualified class name for the Toolbar
$config array The configuration values for the Toolbar object
리턴 FOF30\Toolbar\Toolbar

createTransparentAuthentication() 보호된 메소드

Creates a TransparentAuthentication object
protected createTransparentAuthentication ( string $authClass, array $config ) : TransparentAuthentication
$authClass string The fully qualified class name for the TransparentAuthentication
$config array The configuration values for the TransparentAuthentication object
리턴 FOF30\TransparentAuthentication\TransparentAuthentication

createView() 보호된 메소드

Creates a View object
protected createView ( string $viewClass, array $config = [] ) : Model
$viewClass string The fully qualified class name for the View
$config array Optional MVC configuration values for the View object.
리턴 FOF30\Model\Model

dispatcher() 공개 메소드

Creates a new Dispatcher
public dispatcher ( array $config = [] ) : Dispatcher
$config array The configuration values for the Dispatcher object
리턴 FOF30\Dispatcher\Dispatcher

form() 공개 메소드

Creates a new Form object
public form ( string $name, string $source, string $viewName, array $options = [], boolean $replace = true, boolean $xpath = false ) : Form | null
$name string The name of the form.
$source string The form source filename without path and .xml extension e.g. "form.default" OR raw XML data
$viewName string The name of the view you're getting the form for.
$options array Options to the Form object
$replace boolean Should form fields be replaced if a field already exists with the same group/name?
$xpath boolean An optional xpath to search for the fields.
리턴 FOF30\Form\Form | null The loaded form or null if the form filename doesn't exist

getFormFilename() 보호된 메소드

Tries to find the absolute file path for an abstract form filename. For example, it may convert form.default to home/myuser/mysite/components/com_foobar/View/tmpl/form.default.xml.
protected getFormFilename ( string $source, string $viewName = null ) : string | boolean
$source string The abstract form filename
$viewName string The name of the view we're getting the path for
리턴 string | boolean The fill path to the form XML file or boolean false if it's not found

getSection() 공개 메소드

public getSection ( ) : string
리턴 string

isSaveControllerScaffolding() 공개 메소드

Should we save controller scaffolding to disk?
public isSaveControllerScaffolding ( ) : boolean
리턴 boolean $state

isSaveModelScaffolding() 공개 메소드

Should we save model scaffolding to disk?
public isSaveModelScaffolding ( ) : boolean
리턴 boolean $state

isSaveScaffolding() 공개 메소드

Is saving the scaffolding result to disk enabled?
public isSaveScaffolding ( ) : boolean
리턴 boolean

isSaveViewScaffolding() 공개 메소드

Should we save view scaffolding to disk?
public isSaveViewScaffolding ( ) : boolean
리턴 boolean $state

isScaffolding() 공개 메소드

Is scaffolding enabled?
public isScaffolding ( ) : boolean
리턴 boolean

model() 공개 메소드

Create a new Model object
public model ( string $viewName, array $config = [] ) : Model
$viewName string The name of the view we're getting a Model for.
$config array Optional MVC configuration values for the Model object.
리턴 FOF30\Model\Model

setSaveControllerScaffolding() 공개 메소드

Should we save controller to disk?
public setSaveControllerScaffolding ( boolean $state )
$state boolean

setSaveModelScaffolding() 공개 메소드

Should we save model to disk?
public setSaveModelScaffolding ( boolean $state )
$state boolean

setSaveScaffolding() 공개 메소드

Set the status of saving the scaffolding result to disk.
public setSaveScaffolding ( boolean $saveScaffolding )
$saveScaffolding boolean

setSaveViewScaffolding() 공개 메소드

Should we save view to disk?
public setSaveViewScaffolding ( boolean $state )
$state boolean

setScaffolding() 공개 메소드

Set the scaffolding status
public setScaffolding ( boolean $scaffolding )
$scaffolding boolean

setSection() 공개 메소드

public setSection ( string $section )
$section string

toolbar() 공개 메소드

Creates a new Toolbar
public toolbar ( array $config = [] ) : Toolbar
$config array The configuration values for the Toolbar object
리턴 FOF30\Toolbar\Toolbar

transparentAuthentication() 공개 메소드

Creates a new TransparentAuthentication handler
public transparentAuthentication ( array $config = [] ) : TransparentAuthentication
$config array The configuration values for the TransparentAuthentication object
리턴 FOF30\TransparentAuthentication\TransparentAuthentication

view() 공개 메소드

Create a new View object
public view ( string $viewName, string $viewType = 'html', array $config = [] ) : View
$viewName string The name of the view we're getting a View object for.
$viewType string The type of the View object. By default it's "html".
$config array Optional MVC configuration values for the View object.
리턴 FOF30\View\View

viewFinder() 공개 메소드

The default configuration is: Look for .php, .blade.php files; default layout "default"; no default subtemplate; look only for the specified view; do NOT fall back to the default layout or subtemplate; look for templates ONLY in site or admin, depending on where we're running from
public viewFinder ( View $view, array $config = [] ) : mixed
$view FOF30\View\View The view this view template finder will be attached to
$config array Configuration variables for the object
리턴 mixed

프로퍼티 상세

$container 보호되어 있는 프로퍼티

The container we belong to
protected $container

$formLookupInOtherSide 보호되어 있는 프로퍼티

Should I look for form files on the other side of the component?
protected $formLookupInOtherSide

$saveControllerScaffolding 보호되어 있는 프로퍼티

When enabled, FOF will commit controller scaffolding results to disk.
protected $saveControllerScaffolding

$saveModelScaffolding 보호되어 있는 프로퍼티

When enabled, FOF will commit model scaffolding results to disk.
protected $saveModelScaffolding

$saveScaffolding 보호되어 있는 프로퍼티

When enabled, FOF will commit the scaffolding results to disk.
protected $saveScaffolding

$saveViewScaffolding 보호되어 있는 프로퍼티

When enabled, FOF will commit view scaffolding results to disk.
protected $saveViewScaffolding

$scaffolding 보호되어 있는 프로퍼티

Should I enable view scaffolding, i.e. automatic browse, read and add/edit XML form generation when there's no other view template?
protected $scaffolding

$section 보호되어 있는 프로퍼티

Section used to build the namespace prefix. We have to pass it since in CLI scaffolding we need to force the section we're in (ie Site or Admin). {@see \FOF30\Container\Container::getNamespacePrefix() } for valid values
protected string $section
리턴 string