NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
code insight and class problems


Joined: 19 Dec 2006
Posts: 94
Reply with quote
is there anyway to declare a class variable when declaring it. i have this class
Code:

<?php
/*****************************************************************
*--KD Project Tracker is NOT free Softrware                      *
*--This software is copyrighted © 2006-2007, Kaizen Digital      *
*--Author: Ryan Zec                                     *
*--License: Read the attached file license.php                   *
******************************************************************
*--WARNING: THIS SOFTWARE MAY NOT BE COPIED, REDISTURBTED, OR    *
*--USED ANY WAY WITHOUT WRITTEN CONSENT OR PROPER LICENSE.       *
*****************************************************************/
?>
<?php
/*****************************************************************
* The global class hass functionality that all classes can use   *
* ALL classes extends from this class                      *
*****************************************************************/
class CGlobal
{
   public function GetStatusList($order_by = "", $order_way = "ASC")
   {
      if($order_by == "")
      {
         $query ="SELECT id, type
                FROM status_type
                WHERE status_id != '0'";
      }
      else
      {
         $query ="SELECT id, type
                FROM status_type
                WHERE status_id != '0'
                ORDER BY {$order_by} {$order_way}";
      }
      
      /*DEBUG CODE
      print $query;*/
      
      $all_active_status;
      
      if(count($all_active_status) > 0)
      {
         return $all_active_status;
      }
      else
      {
         return false;
      }
   }
   
   public $_mysql_connection;
}
?>


this is my abstract class that all classes extends from, it has and will continue to grow with function and variable all clases are going to need. the problem is it does not knwo that $_mysql_connection is a CMysql class type becuase i assign that is the sub classes(classes that entends of it for those who are unsure of what i mean). is there a way to let the edit know what type of class object a variable is when declaring it, i would like to get my codeinsight for it.?
View user's profileFind all posts by basireSend private message
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
Try adding a phpDocumentor comment like so:

Code:

/**
 *@var CMysql
 */
public $_mysql_connection;
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
code insight and class problems
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic