Hi Robert

If you're using PHP 5, use type hinting.

class tSecurity
{
  public function __construct(tDatabase $ADatabase)
  {
    $this->database=$ADatabase;
  }
}

Todd


> Hi
> 
> I have a class  (tDatabase) that I create and pass into another Class 
> (tSecurity) and use in it.
> 
> My IDE does code prompting / completion on the $database instance when 
> in the same function where it is created ($database = new tDatabase) 
> however within my tSecurity class I cant as it doesn't know that 
> $this->database (set in constructor, $security = new 
> tSecurity($database)) is of type tDatabase.  Is there a way to flag a 
> class property is a specific data type so that my code completion can work ?
> 
> Cheers
> Rob
> 
> _______________________________________________
> NZ Borland Developers Group Offtopic mailing list
> Post: [email protected]
> Admin: http://delphi.org.nz/mailman/listinfo/offtopic
> Unsubscribe: send an email to [email protected] with 
> Subject: unsubscribe


-- 
<b>Passion</b> is no substitute for <b>reason</b>
_______________________________________________
NZ Borland Developers Group Offtopic mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/offtopic
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to