This file contains 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)); | |
} |
This file contains 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 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 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 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 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 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
/** | |
* Same as fetch_all except you can pass a where clause | |
* | |
* @param array $where the where clause | |
* @param string $order_by a column to order on | |
* @param string $direction the direction to sort | |
* @param string $type the type of where to run | |
* | |
* @return Database_Result | |
*/ |
This file contains 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
module Picombo | |
module Controllers | |
class Tournament < Picombo::Controllers::Template | |
def initialize | |
super | |
end | |
def index | |
@@template[:body] = Picombo::Stache::Tournament_Index.render |
This file contains 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
module Picombo | |
module Models | |
class User < Picombo::Model | |
storage_names[:default] = 'users' | |
property :id, Serial, :key => true | |
property :email, String | |
property :password, String | |
property :first_name, String | |
property :last_name, String |
This file contains 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
module Picombo | |
module Models | |
class Feed_Post < Picombo::Model | |
storage_names[:default] = 'feed_posts' | |
property :id, Serial, :key => true | |
property :content, String | |
belongs_to :user, :model => 'Picombo::Models::User' | |
end |
OlderNewer