Page MenuHomePhabricator

D633.id2011.diff
No OneTemporary

D633.id2011.diff

diff --git a/mvc/View.php b/mvc/View.php
--- a/mvc/View.php
+++ b/mvc/View.php
@@ -83,11 +83,6 @@
if (file_exists($filename)) { $this->layout = new Layout($filename); }
else { throw new FileNotFoundException('File ' . $filename . ' not found. View can\'t use it as layout'); }
}
-
- public function element($file) {
- $candidates = $this->app->getTemplateLocator()->element($file, 'php');
- return new ViewElement($candidates, $this->data);
- }
public function setRenderTemplate($set) {
if ($set === false) {
diff --git a/mvc/ViewElement.php b/mvc/ViewElement.php
deleted file mode 100644
--- a/mvc/ViewElement.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php namespace spitfire\mvc;
-
-use spitfire\mvc\MVC;
-
-class ViewElement extends \spitfire\io\template\Template
-{
- private $file;
- private $data;
-
- public function __construct($file, $data = []) {
- parent::__construct($file);
- $this->data = $data;
- }
-
- public function set ($key, $value) {
- $this->data[$key] = $value;
- return $this;
- }
-
- public function render ($__data) {
- echo '<!-- Started: ' . $this->file .' -->' . PHP_EOL;
- return parent::render(array_merge($this->data, $__data));
- }
-
- public function __toString() {
- return $this->render($this->data);
- }
-}
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 13, 7:01 AM (4 w, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5980
Default Alt Text
D633.id2011.diff (1 KB)

Event Timeline