note 109878 rejected from language.oop5.traits by aharvey
| From: | aharvey@php.net | Date: | Fri, 31 Aug 2012 01:11:43 +0000 |
| Subject: | note 109878 rejected from language.oop5.traits by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190288@lists.php.net to get a copy of this message | ||
Note Submitter: Bandi
----
My problem is I can't access the traits constructor from the class constructor:
<?php
trait bar
{
public function __construct($bar) {
echo $bar;
}
}
class foo
{
use bar;
public function __construct($foo) {
//here i want to call constructor of bar trait, but how?
//parent::__construct('dasdas') ???????
//bar::__construct('dasdas') ???????
echo $foo;
}
}
?>