PHP Class Jarves\Jarves

Afficher le fichier Open project: jarves/jarves Class Usage Examples

Protected Properties

Свойство Type Description
$configs Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]
$utils Utils

Méthodes publiques

Méthode 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 méthode

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 méthode

Returns the normalize jarves_admin_prefix parameter.
public getAdminPrefix ( ) : string
Résultat string

getBundle() public méthode

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

getBundleDir() public méthode

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

getBundleFromPath() public méthode

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

getBundleName() public méthode

Jarves\JarvesBundle => JarvesBundle
public getBundleName ( string $bundleClass ) : string
$bundleClass string
Résultat string

getBundles() public méthode

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

getCache() public méthode

public getCache ( )

getCacheDir() public méthode

public getCacheDir ( ) : string
Résultat string

getConfig() public méthode

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

getConfigs() public méthode

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

getFieldTypes() public méthode

public getFieldTypes ( ) : FieldTypes
Résultat Jarves\Admin\FieldTypes\FieldTypes

getId() public méthode

Returns the installation id.
public getId ( ) : string
Résultat string

getOrCreateConfig() public méthode

public getOrCreateConfig ( string $bundleName ) : Bundle | null
$bundleName string
Résultat Jarves\Configuration\Bundle | null

getRealConfig() public méthode

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

getRequest() public méthode

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

getRoot() public méthode

public getRoot ( ) : string
Résultat string

getRootDir() public méthode

public getRootDir ( ) : string
Résultat string

getShortBundleName() public méthode

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

getSystemConfig() public méthode

Deprecation: use jarvesConfig->getSystemConfig
public getSystemConfig ( ) : SystemConfig
Résultat Jarves\Configuration\SystemConfig

getWebCacheDir() public méthode

public getWebCacheDir ( ) : string
Résultat string

isActiveBundle() public méthode

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

isDebugMode() public méthode

public isDebugMode ( ) : boolean
Résultat boolean

isJarvesBundle() public méthode

public isJarvesBundle ( string $bundleName ) : boolean
$bundleName string
Résultat boolean

loadBundleConfigs() public méthode

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

reset() public méthode

Resets current PageResponse;
public reset ( )

resolveInternalPublicPath() public méthode

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

resolvePath() public méthode

('@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
Résultat string without trailing slash when relative

resolvePublicWebPath() public méthode

('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
Résultat string

resolveWebPath() public méthode

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

setConfigs() public méthode

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

terminate() public méthode

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

Property Details

$configs protected_oe property

protected Configs,Jarves\Configuration|Bundle[],Jarves\Configuration $configs
Résultat Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]

$utils protected_oe property

protected Utils,jarves $utils
Résultat Utils