NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help with a self:: ish problem

Cliff Hirsch cliff at pinestream.com
Thu Dec 6 10:19:31 EST 2007


>> class actions {
>>  
>>  private function update(){
>>   echo 'Update being executed!';
>>   return TRUE;
>>  }
>>  
>> //public functions ==================================
>>     public function do_action($table,$data){
>>      //direct action activity
>>      //assumption: $data['action'] will contain action definition
>>      $this->_table=$table;
>>      $this->_aData=$data;
>>      
>>      $completed=self::update();  //<==  THIS IS THE PROBLEM LINE
>>      

Try $completed=$this->update()

Update is not a static function. If you want to use self, use static
function update().....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071206/c3c1a5db/attachment.html>


More information about the talk mailing list