PHP Class Jarves\Jarves

Mostrar archivo Open project: jarves/jarves Class Usage Examples

Protected Properties

Property Type Description
$configs Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]
$utils Utils

Public Methods

Method Description
__construct ( JarvesConfig $jarvesConfig, string $adminPrefix, string $cacheDir, string $rootDir, string $environment, string $debugMode, Symfony\Component\HttpKernel\KernelInterface $kernel, Symfony\Component\HttpFoundation\RequestStack $requestStack, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, FieldTypes $fieldTypes )
getAdminPrefix ( ) : string Returns the normalize jarves_admin_prefix parameter.
getBundle ( string $bundleName ) : Symfony\Component\HttpKernel\Bundle\BundleInterface | null
getBundleDir ( string $bundleName ) : string | null
getBundleFromPath ( string $path, string &$bundleName = '' ) : null | Symfony\Component\HttpKernel\Bundle\BundleInterface
getBundleName ( string $bundleClass ) : string Returns the bundle name.
getBundles ( ) : Symfony\Component\HttpKernel\Bundle\BundleInterface[] Returns all Symfony Bundles.
getCache ( )
getCacheDir ( ) : string
getConfig ( $bundleName ) : Bundle | null Returns a configuration for a bundle.
getConfigs ( ) : Configs | Bundle[] Returns all configurations for all registered bundles.
getFieldTypes ( ) : FieldTypes
getId ( ) : string Returns the installation id.
getOrCreateConfig ( string $bundleName ) : Bundle | null
getRealConfig ( string $bundleName ) : Bundle Returns a real Bundle config object, which is being read from the configurations files without bootstrap. So this configuration does not contain any changes from autoCrud, object-attributes, field modifications and other configuration manipulations from the bootstrap.
getRequest ( ) : Request
getRoot ( ) : string
getRootDir ( ) : string
getShortBundleName ( string $bundleName ) : string Returns the short bundle name of $bundleName.
getSystemConfig ( ) : SystemConfig
getWebCacheDir ( ) : string
isActiveBundle ( string $bundleName ) : boolean Checks if a (jarves) bundle is activated.
isDebugMode ( ) : boolean
isJarvesBundle ( string $bundleName ) : boolean
loadBundleConfigs ( Cacher $cacher ) : null | callable Loads all configurations from all registered bundles (BundleName/Resources/config/jarves*.xml)
reset ( ) Resets current PageResponse;
resolveInternalPublicPath ( string $path ) : mixed Shortcut for $this->resolvePath($path, 'Resources/public')
resolvePath ( string $path, string $suffix = '', boolean $relativePath = false ) : string ('@JarvesBundle/Resources/public/test.png') => /var/www/jarves/src/Jarves/Resources/public/test.png ('@JarvesBundle/Resources/public/test.png', '', true) => src/Jarves/Resources/public/test.png
resolvePublicWebPath ( string $path ) : string ('@JarvesBundle/admin/js/test.js') => bundles/jarves/admin/js/test.js
resolveWebPath ( string $path ) : string ('@JarvesBundle/admin/js/test.js') => web/bundles/jarves/admin/js/test.js
setConfigs ( Configs $configs )
terminate ( ) Terminates everything, each post request event.

Method Details

__construct() public method

public __construct ( JarvesConfig $jarvesConfig, string $adminPrefix, string $cacheDir, string $rootDir, string $environment, string $debugMode, Symfony\Component\HttpKernel\KernelInterface $kernel, Symfony\Component\HttpFoundation\RequestStack $requestStack, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, FieldTypes $fieldTypes )
$jarvesConfig JarvesConfig
$adminPrefix string
$cacheDir string
$rootDir string
$environment string
$debugMode string
$kernel Symfony\Component\HttpKernel\KernelInterface
$requestStack Symfony\Component\HttpFoundation\RequestStack
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$fieldTypes Jarves\Admin\FieldTypes\FieldTypes

getAdminPrefix() public method

Returns the normalize jarves_admin_prefix parameter.
public getAdminPrefix ( ) : string
return string

getBundle() public method

public getBundle ( string $bundleName ) : Symfony\Component\HttpKernel\Bundle\BundleInterface | null
$bundleName string
return Symfony\Component\HttpKernel\Bundle\BundleInterface | null

getBundleDir() public method

public getBundleDir ( string $bundleName ) : string | null
$bundleName string full className or bundleName or short bundleName
return string | null with leading / relative to root folder

getBundleFromPath() public method

public getBundleFromPath ( string $path, string &$bundleName = '' ) : null | Symfony\Component\HttpKernel\Bundle\BundleInterface
$path string
$bundleName string will be modified when found
return null | Symfony\Component\HttpKernel\Bundle\BundleInterface

getBundleName() public method

Jarves\JarvesBundle => JarvesBundle
public getBundleName ( string $bundleClass ) : string
$bundleClass string
return string

getBundles() public method

Returns all Symfony Bundles.
public getBundles ( ) : Symfony\Component\HttpKernel\Bundle\BundleInterface[]
return Symfony\Component\HttpKernel\Bundle\BundleInterface[]

getCache() public method

public getCache ( )

getCacheDir() public method

public getCacheDir ( ) : string
return string

getConfig() public method

Returns a configuration for a bundle.
public getConfig ( $bundleName ) : Bundle | null
$bundleName
return Jarves\Configuration\Bundle | null

getConfigs() public method

Returns all configurations for all registered bundles.
public getConfigs ( ) : Configs | Bundle[]
return Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]

getFieldTypes() public method

public getFieldTypes ( ) : FieldTypes
return Jarves\Admin\FieldTypes\FieldTypes

getId() public method

Returns the installation id.
public getId ( ) : string
return string

getOrCreateConfig() public method

public getOrCreateConfig ( string $bundleName ) : Bundle | null
$bundleName string
return Jarves\Configuration\Bundle | null

getRealConfig() public method

When no configurations are found, it returns a completely new Jarves\Configuration\Bundle object.
public getRealConfig ( string $bundleName ) : Bundle
$bundleName string
return Jarves\Configuration\Bundle

getRequest() public method

Deprecation: use pageStack->getCurrentRequest
public getRequest ( ) : Request
return Symfony\Component\HttpFoundation\Request

getRoot() public method

public getRoot ( ) : string
return string

getRootDir() public method

public getRootDir ( ) : string
return string

getShortBundleName() public method

It's used for example in the web/bundles/ directory.
public getShortBundleName ( string $bundleName ) : string
$bundleName string
return string

getSystemConfig() public method

Deprecation: use jarvesConfig->getSystemConfig
public getSystemConfig ( ) : SystemConfig
return Jarves\Configuration\SystemConfig

getWebCacheDir() public method

public getWebCacheDir ( ) : string
return string

isActiveBundle() public method

Checks if a (jarves) bundle is activated.
public isActiveBundle ( string $bundleName ) : boolean
$bundleName string
return boolean

isDebugMode() public method

public isDebugMode ( ) : boolean
return boolean

isJarvesBundle() public method

public isJarvesBundle ( string $bundleName ) : boolean
$bundleName string
return boolean

loadBundleConfigs() public method

Loads all configurations from all registered bundles (BundleName/Resources/config/jarves*.xml)
public loadBundleConfigs ( Cacher $cacher ) : null | callable
$cacher Jarves\Cache\Cacher
return null | callable returns a callable that should be called when config stuff have been registered

reset() public method

Resets current PageResponse;
public reset ( )

resolveInternalPublicPath() public method

('@JarvesBundle/admin/js/test.js') => /var/www/jarves/src/Jarves/Resources/public/admin/js/test.js
public resolveInternalPublicPath ( string $path ) : mixed
$path string
return mixed

resolvePath() public method

('@JarvesBundle/test.png', 'Resources/public/') => /var/www/jarves/src/Jarves/Resources/public/test.png ('@JarvesBundle/test.png') => /var/www/jarves/src/Jarves/test.png ('images/test.png') => /var/www/jarves/images/webtest.png
public resolvePath ( string $path, string $suffix = '', boolean $relativePath = false ) : string
$path string
$suffix string
$relativePath boolean
return string without trailing slash when relative

resolvePublicWebPath() public method

('images/test.png') => images/webtest.png ('routepath/do-something') => routepath/do-something ('routepath/do-something') => app_dev.php/routepath/do-something ('http://external.tld/style.css') => http://external.tld/style.css
public resolvePublicWebPath ( string $path ) : string
$path string
return string

resolveWebPath() public method

('images/test.png') => web/images/webtest.png
public resolveWebPath ( string $path ) : string
$path string
return string

setConfigs() public method

public setConfigs ( Configs $configs )
$configs Jarves\Configuration\Configs

terminate() public method

Terminates everything, each post request event.
public terminate ( )

Property Details

$configs protected_oe property

protected Configs,Jarves\Configuration|Bundle[],Jarves\Configuration $configs
return Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]

$utils protected_oe property

protected Utils,jarves $utils
return Utils