Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Kohana]Odwołanie do rodzica
henio
post
Post #1





Grupa: Zarejestrowani
Postów: 237
Pomógł: 1
Dołączył: 15.10.2004
Skąd: Lublin

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


Może i powinienem umieścić to w przedszkolu, ale w końcu ma to związek z Kohaną...
Główny konstruktor
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2. class Glowna_Controller extends Controller {
  3.  
  4.    public function __construct()
  5.    {
  6.    parent :: __construct( );
  7.  
  8.    new Session;
  9.    new Profiler;
  10.    $this -> auth = Auth :: instance( );
  11.    }
  12. ...
  13. ?>


Inny konstruktor
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2. class News_Controller extends Glowna_Controller {
  3.  
  4.    public function __construct()
  5.    {
  6.    parent::__construct();
  7.    }
  8. ?>


Niby się odwołuje do konstruktora rodzica, no ale
Undefined property: News_Controller::$auth
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 20.12.2025 - 18:31