Bug Report #1271

Non-Final Kohana Class / Move Bootstrap to application folder

Added by Colin Mollenhour almost 3 years ago. Updated over 2 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Jeremy Bush % Done:

100%

Category:Core
Target version:2.4
Resolution:fixed Points:

Description

Kohana does not need to be final, here is a simple patch to change it.

nonfinal_patch.diff (1.2 kB) Colin Mollenhour, 04/19/2009 08:10 pm

Kohana.diff (18.4 kB) Kiall Mac Innes, 08/02/2009 09:57 am


Related issues

related to Kohana v2.x - Bug Report #1695: Kohana::include_path() forces APPPATH first in the hierarchy 2.4 Closed 05/24/2009
duplicated by Kohana v2.x - Bug Report #1839: Private member variables should be protected 2.4 Closed 07/12/2009

Associated revisions

Revision 4507
Added by Kiall Mac Innes over 2 years ago

Followup to r4501 Fixes #1271

History

Updated by Jeremy Bush almost 3 years ago

  • Resolution set to fixed

Fixed in r4231.

Updated by Ben Rogers almost 3 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

I'm confused at the point of this patch. By making Kohana abstract, with a core suffix, then doing a forceful final class Kohana extends Kohana_Core. there is no real gain here. you still cannot transparently extend the kohana instance, because you would be redeclaring the Kohana class. I guess you could extend Kohana with a different name, but all the references to the class itself(from inside and outside of the class) reference the name "Kohana"

so what does this actually accomplish?

Updated by Jeremy Bush almost 3 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

You extend the kohana class by modifying the APPPATH.'Bootstrap.php' file.

There's nothing special about the Boostrap file that required it to be in SYSPATH.

Updated by Colin Mollenhour almost 3 years ago

Thanks for accepting the patch, I like the committed version even better though with Bootstrap.php in the application folder, kinda like KO3. Very nice.

Updated by Kiall Mac Innes over 2 years ago

  • File Kohana.diff added
  • Status changed from Closed to Feedback
  • 11 set to 2.3.4

Most of the private properties should probably be switched to protected, and self:: replaced with Kohana::..

The attached patch is untested - hence I haven't committed it!

Updated by Kiall Mac Innes over 2 years ago

Fixed in r4501

Updated by Kiall Mac Innes over 2 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Applied in changeset r4507.

Also available in: Atom PDF