...

View Full Version : function argument



paperino00
10-30-2012, 08:00 PM
Hello, what kind of argument is there in this function ? I don't understand PhingFile...
thanks



public function setFile(PhingFile $file) {
$this->file = $file;
}

Fou-Lu
10-30-2012, 08:31 PM
Its a typehint. It will only accept objects of datatype PhingFile into the function arguments.

paperino00
10-31-2012, 04:33 PM
what you mean by object of datatype ?

Fou-Lu
10-31-2012, 04:58 PM
what you mean by object of datatype ?



$thatObject->setFile(new PhingFile());



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum