This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mustache' | |
class Layout < Mustache | |
self.template = "Header | |
{{{yield}}} | |
Footer" | |
end | |
class Index < Mustache | |
self.template = "The Index." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Acts as an object wrapper for HTML output with embedded PHP, called "views". | |
* Variables can be assigned with the view object and referenced locally within | |
* the view. | |
* | |
* @package Kohana | |
* @category Base | |
* @author Kohana Team | |
* @copyright (c) 2010 Kohana Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Acts as an object wrapper for output with embedded PHP, called "views". | |
* Variables can be assigned with the view object and referenced locally within | |
* the view. | |
* | |
* @package Kohana | |
* @category Base | |
* @author Kohana Team | |
* @copyright (c) 2008-2009 Kohana Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class View_Complex extends Kostache | |
{ | |
public $title = 'Testing'; | |
public function loggedin_status() | |
{ | |
return Auth::logged_in() ? 'logged in as '.Auth::instance()->account->username : NULL; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Acts as an object wrapper for HTML pages with embedded PHP, called "views". | |
* Variables can be assigned with the view object and referenced locally within | |
* the view. | |
* | |
* @package Kohana | |
* @category Base | |
* @author Kohana Team | |
* @copyright (c) 2008-2009 Kohana Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class View_Complex extends View | |
{ | |
public $var_title = 'Testing'; | |
public function var_things() | |
{ | |
return Inflector::plural(get_class(new Model_Test)); | |
} |
NewerOlder