PHP 클래스 Hostnet\Component\Webpack\Asset\Tracker

저자: Harold Iedema ([email protected])
파일 보기 프로젝트 열기: hostnet/webpack-bundle 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Hostnet\Component\Webpack\Profiler\Profiler $profiler, Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface $finder, string $root_dir, string $asset_dir, string $output_dir, array $bundle_paths = [] ) Create new Tracker.
addPath ( string $path ) : Tracker Add a path to the list of tracked paths (this can be both dir's or files).
getAliases ( ) : array Get the tracked aliases
getTemplates ( ) : string[] Returns a list of twig templates that are being tracked.
isOutdated ( ) : boolean Returns true if the cache is outdated.
resolveResourcePath ( string $path ) : string Find the full path to a requested resource, this can be bundle configurations like @BundleName/resource.twig

비공개 메소드들

메소드 설명
addTemplate ( Symfony\Component\Templating\TemplateReferenceInterface $reference ) : Tracker Adds twig templates to the tracker.
boot ( ) Runtime initialize this tracker.
resolvePath ( string $path ) : string Find the full path to a requested path, this can be bundle configurations like @BundleName/

메소드 상세

__construct() 공개 메소드

Create new Tracker.
public __construct ( Hostnet\Component\Webpack\Profiler\Profiler $profiler, Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface $finder, string $root_dir, string $asset_dir, string $output_dir, array $bundle_paths = [] )
$profiler Hostnet\Component\Webpack\Profiler\Profiler key-value store used to present 'logging' in the symfony-profiler bar.
$finder Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface used to find all the templates which needs to be tracked.
$root_dir string '%kernel.root_dir%' root directory of the application.
$asset_dir string directory to resolve assets, directory is resolved relative from the bundle path.
$output_dir string The directory where the compiled resources are stored.
$bundle_paths array the optional associative mapping between bundle names and their absolute paths.

addPath() 공개 메소드

Add a path to the list of tracked paths (this can be both dir's or files).
public addPath ( string $path ) : Tracker
$path string the path to track.
리턴 Tracker this instance.

getAliases() 공개 메소드

Get the tracked aliases
public getAliases ( ) : array
리턴 array the tracked aliases.

getTemplates() 공개 메소드

Returns a list of twig templates that are being tracked.
public getTemplates ( ) : string[]
리턴 string[] list of twig templates.

isOutdated() 공개 메소드

Returns true if the cache is outdated.
public isOutdated ( ) : boolean
리턴 boolean true, cache is outdated of non exsitant.

resolveResourcePath() 공개 메소드

Find the full path to a requested resource, this can be bundle configurations like @BundleName/resource.twig
public resolveResourcePath ( string $path ) : string
$path string the path resolve
리턴 string the full path to the requested resource or false if not found.