PHP Classes

File: examples/cms/app/blog/models/postsModel.php

Recommend this page to a friend!
  Packages of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/cms/app/blog/models/postsModel.php   Download  
File: examples/cms/app/blog/models/postsModel.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 10 years ago
Size: 961 bytes
 

Contents

Class file image Download
<?php

class postsModel {
    public $permalink = '';
    public $title = '';
    public $date = '';
    public $content = '';
    
    function listAll(){
        return array(
            0 => array(
                'permalink' => 'posts/1/',
                'title' => 'First title here!',
                'date' => '01-01-08',
                'content' => 'Hello world this is your first post',
                'excerpt' => 'Hello world this is the summery odf the first article',
                ),
            1 => array(
                'permalink' => 'posts/2/',
                'title' => 'The second title',
                'date' => '02-01-08',
                'content' => 'Hello world this is your second post',
                'excerpt' => 'Hello world this is the summery of the second article',
                ),
            );
    }
    
    function single(){
        return array(
            0 => array(
                'permalink' => '/examples/blog/posts/1/',
                'title' => 'The first title',
                'date' => '01-01-08',
                'content' => 'Hello world this is your first post',
                'excerpt' => 'Hello world this is the summery of the first article',
                ),    
            );
    }
    
}