Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Niewidoczna metoda w klasie
arzach
post
Post #1





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 27.11.2008

Ostrzeżenie: (0%)
-----


Witam mam taki prosty kod
  1. class eps {
  2. private $_point_system_cat = array('A' => 4, 'F' => 6);
  3.  
  4. public function setPoint_system($point_cat){
  5.  
  6. if(!verification_point_cat($point_cat)) {
  7.  
  8. throw new Exception("Niepoprawna wartosc zmiennej point_cat");
  9.  
  10. } else {
  11.  
  12. $this->_point = $this->_point_system_cat[$point_cat];
  13.  
  14. }
  15.  
  16. function verification_point_cat($point_cat){
  17. if(preg_match("/^[A-Z]{1}+$/", $point_cat) && isset($this->_point_system_cat[$point_cat])) {
  18. return true;
  19. } else {
  20. return false;
  21. }
  22. }
  23. }
  24. }
  25. try {
  26. $point = new eps();
  27. $point->setPoint_system('F');
  28. } catch (Exception $error) {
  29. echo $error->getMessage();
  30. }


I dla czego wywala błąd Call to undefined function verification_point_cat()

Mimo że metoda jest napisana questionmark.gif Nie rozumiem tego może mi ktoś wyjaśnić głowie się z tym już jakiś czas.

Ten post edytował arzach 23.07.2011, 09:26:49
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 13:20