Guys in the past I have used interfaces and have do not recall hitting
this issue.
I have the following interface
<?php
interface Pagable
{
private function getPreviousPage();
private function getNextPage();
private function getCurrentPage();
private function getStartPage();
private function getLastPage();
private function getTotalPages();
public function getPageString();
public function getTotalResults();
}
class YP_Listing_Handler implements Pagable
{
...
private function getPreviousPage()
{
return $this->getCurrentPage() - 1;
}
...
}
I keep getting this error.
Fatal error: Access type for interface method
Pagable::getPreviousPage() must be omitted in /Applications/MAMP/
htdocs/yp/inc/Pagable.php on line 5
I am not sure what is causing it but if I remove the private keyword
then it complains that it must be declared public in the class.
Is there a reason I cannot declare a method as being private in the
interface?
Thanks,
Joseph Crawford
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/show_participation.php