Welcome Guest, Not a member yet? Register   Sign In
Call extend class.
#1

[eluser]Lazos[/eluser]
If I want to use the Content library I load it from the controller or the autoload file and then just write $this->Class->method();

If I want to call the extend class of the Content class how I do it?

Code:
<?php

class Content {
    
    var $userid;
    var $contenttype;
    var $title;
    var $menutext;
    var $parent;
    var $content;
    var $active;
    var $showinmenu;
    var $target;
    var $pagealias;
    var $description;
    var $editors;
    var $modified_date;
    var $modified_user;
    var $root;
    
    function __construct() {
        $this->SetInitialValues();    
        
    }
    
    function SetInitialValues() {
    
        $this->title = "";
        $this->menutext = "";
        $this->parent = "";
        $this->content = "";
        $this->active = "";
        $this->showinmenu = "";
        $this->target = "";
        $this->pagealias = "";
        $this->description = "";
        $this->editors = array();
        $this->modified_date = getdate();
        $this->modified_user = "";    
    }

    function getContentTypes($root){
        $this->root = $root;
        $dh = @opendir($root.'/application/views/admin/content/');
        $i = 0;
        while (false !== ($file = readdir($dh))){
            $filename = strtolower(substr($file, 0, strpos($file, '.')));
                if(!is_dir($file)){    
                $array['repeat_type'][$i]['V_CONTENT_TYPE_NAME'] = ucwords($filename);
                $i++;
            }        
        }
        closedir( $dh );
        $this->contenttype = $array;
        return $array;
    }
}

class Newcontent extends Content {
    
        function __construct() {
        }
        
        function getDate() {
         return $this->modified_date;
        }
        
}
?>


Messages In This Thread
Call extend class. - by El Forum - 11-15-2008, 07:24 AM
Call extend class. - by El Forum - 11-15-2008, 08:07 PM
Call extend class. - by El Forum - 11-15-2008, 10:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB