Skip to content

Commit

Permalink
delete Filesystem, fixed bug regarding extending (head/body files cac…
Browse files Browse the repository at this point in the history
…hing)
  • Loading branch information
vagrant committed Dec 19, 2019
1 parent 22e048f commit 4e2fbfc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 152 deletions.
121 changes: 0 additions & 121 deletions src/Filesystem/Filesystem.php

This file was deleted.

32 changes: 1 addition & 31 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function render(string $templateName, string $part = null): string
}

// Load the requested source
$source = $this->loader->get($templateKey);
$source = $this->loader->get($templateName);

// Evaluate the source
$result = $this->engine->evaluate($source);
Expand All @@ -97,36 +97,6 @@ public function render(string $templateName, string $part = null): string

// Execute from cache
return $this->execute($this->loader->getCacheKey($templateKey));

/*
$filename = $this->config->get('directory').'/'.$templateName.'.'.$this->config->get('extension');
$cacheFilename = $this->config->get('cache_directory').'/'.($part ? $part.'/' : '').md5($tplName).'.'.$this->config->get('extension').'.'.$this->config->get('cache_extension');
if (!$this->filesystem->exists($filename)) {
throw new AegisError('File not found '.$filename);
}
if (
!$this->filesystem->exists($cacheFilename) ||
$this->filesystem->modificationTime($filename) >= $this->filesystem->modificationTime($cacheFilename) ||
$this->config->get('debug')
) {
$result = $this->engine->evaluate($this->filesystem->get($filename));
switch ($part) {
case 'head':
$result = $this->engine->getCompiler()->getHead();
break;
case 'body':
$result = $this->engine->getCompiler()->getBody();
break;
}
$this->filesystem->put($cacheFilename, $result);
}
return $this->execute($cacheFilename);
*/
}

/**
Expand Down

0 comments on commit 4e2fbfc

Please sign in to comment.