Created
February 8, 2011 23:38
-
-
Save remcoros/817533 to your computer and use it in GitHub Desktop.
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
BlogFrontpage.php: (view) | |
<h1> | |
<?= Model->Blog->Name ?> | |
</h1> | |
<h2> | |
<?= Model->Blog->TagLine ?> | |
</h2> | |
---- | |
BlogPost.php: (view) | |
<h1> | |
<?= Model->PostTitle ?> | |
</h1> | |
<h2> | |
<?= Helper->FormatNiceDateTime( Model->PostDate ) ?> | |
</h2> | |
---- | |
BlogController.php: (controller) | |
class BlogController | |
{ | |
// www....nl/ | |
public function Index() | |
{ | |
var blogData = BlogDatabase->GetBlogInfo(); | |
RenderView(blogData); | |
} | |
// www....nl/2010/blablabla_post | |
public function ViewPost(string $slug) | |
{ | |
var postData = BlogDatabase->GetBlogPost($slug); | |
RenderView(postData); | |
} | |
} | |
---- | |
BlogInfo.php (model): | |
class BlogInfo | |
{ | |
public $Name; | |
public $TagLine; | |
} | |
---- | |
BlogPost.php (model): | |
class BlogInfo | |
{ | |
public $PostTitle; | |
public $PostDate; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment