PHP Класс Jarves\Jarves

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$configs Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]
$utils Utils

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Returns the normalize jarves_admin_prefix parameter.
public getAdminPrefix ( ) : string
Результат string

getBundle() публичный Метод

public getBundle ( string $bundleName ) : Symfony\Component\HttpKernel\Bundle\BundleInterface | null
$bundleName string
Результат Symfony\Component\HttpKernel\Bundle\BundleInterface | null

getBundleDir() публичный Метод

public getBundleDir ( string $bundleName ) : string | null
$bundleName string full className or bundleName or short bundleName
Результат string | null with leading / relative to root folder

getBundleFromPath() публичный Метод

public getBundleFromPath ( string $path, string &$bundleName = '' ) : null | Symfony\Component\HttpKernel\Bundle\BundleInterface
$path string
$bundleName string will be modified when found
Результат null | Symfony\Component\HttpKernel\Bundle\BundleInterface

getBundleName() публичный Метод

Jarves\JarvesBundle => JarvesBundle
public getBundleName ( string $bundleClass ) : string
$bundleClass string
Результат string

getBundles() публичный Метод

Returns all Symfony Bundles.
public getBundles ( ) : Symfony\Component\HttpKernel\Bundle\BundleInterface[]
Результат Symfony\Component\HttpKernel\Bundle\BundleInterface[]

getCache() публичный Метод

public getCache ( )

getCacheDir() публичный Метод

public getCacheDir ( ) : string
Результат string

getConfig() публичный Метод

Returns a configuration for a bundle.
public getConfig ( $bundleName ) : Bundle | null
$bundleName
Результат Jarves\Configuration\Bundle | null

getConfigs() публичный Метод

Returns all configurations for all registered bundles.
public getConfigs ( ) : Configs | Bundle[]
Результат Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]

getFieldTypes() публичный Метод

public getFieldTypes ( ) : FieldTypes
Результат Jarves\Admin\FieldTypes\FieldTypes

getId() публичный Метод

Returns the installation id.
public getId ( ) : string
Результат string

getOrCreateConfig() публичный Метод

public getOrCreateConfig ( string $bundleName ) : Bundle | null
$bundleName string
Результат Jarves\Configuration\Bundle | null

getRealConfig() публичный Метод

When no configurations are found, it returns a completely new Jarves\Configuration\Bundle object.
public getRealConfig ( string $bundleName ) : Bundle
$bundleName string
Результат Jarves\Configuration\Bundle

getRequest() публичный Метод

Устаревший: use pageStack->getCurrentRequest
public getRequest ( ) : Request
Результат Symfony\Component\HttpFoundation\Request

getRoot() публичный Метод

public getRoot ( ) : string
Результат string

getRootDir() публичный Метод

public getRootDir ( ) : string
Результат string

getShortBundleName() публичный Метод

It's used for example in the web/bundles/ directory.
public getShortBundleName ( string $bundleName ) : string
$bundleName string
Результат string

getSystemConfig() публичный Метод

Устаревший: use jarvesConfig->getSystemConfig
public getSystemConfig ( ) : SystemConfig
Результат Jarves\Configuration\SystemConfig

getWebCacheDir() публичный Метод

public getWebCacheDir ( ) : string
Результат string

isActiveBundle() публичный Метод

Checks if a (jarves) bundle is activated.
public isActiveBundle ( string $bundleName ) : boolean
$bundleName string
Результат boolean

isDebugMode() публичный Метод

public isDebugMode ( ) : boolean
Результат boolean

isJarvesBundle() публичный Метод

public isJarvesBundle ( string $bundleName ) : boolean
$bundleName string
Результат boolean

loadBundleConfigs() публичный Метод

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

reset() публичный Метод

Resets current PageResponse;
public reset ( )

resolveInternalPublicPath() публичный Метод

('@JarvesBundle/admin/js/test.js') => /var/www/jarves/src/Jarves/Resources/public/admin/js/test.js
public resolveInternalPublicPath ( string $path ) : mixed
$path string
Результат mixed

resolvePath() публичный Метод

('@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
Результат string without trailing slash when relative

resolvePublicWebPath() публичный Метод

('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
Результат string

resolveWebPath() публичный Метод

('images/test.png') => web/images/webtest.png
public resolveWebPath ( string $path ) : string
$path string
Результат string

setConfigs() публичный Метод

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

terminate() публичный Метод

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

Описание свойств

$configs защищенное свойство

protected Configs,Jarves\Configuration|Bundle[],Jarves\Configuration $configs
Результат Jarves\Configuration\Configs | Jarves\Configuration\Bundle[]

$utils защищенное свойство

protected Utils,jarves $utils
Результат Utils