katzgrau / KLogger

A Simple Logging Class For PHP
http://codefury.net/projects/klogger/
981 stars 284 forks source link

Set some Properties and Methods from private to protected #73

Closed Sysix closed 8 years ago

Sysix commented 8 years ago

Hello Guys,

at first, thanks for this simple Class! But I have some problems with it.

I would like to extend the Class for Read the file. But some Properties and Methods are on private, so I can not use it on my child class.

Example: $fileHandle & $logFilePath

Thanks. Greetz Sysix

katzgrau commented 8 years ago

Hi Sysix. What's your particular use case? Just curious

Sysix commented 8 years ago

I want to read the file line by line. and extend the method "getLastLogLine" with it. So that fileHandle is on private i can use the core handle and must make a self alone method. Not pretty^^

ghost commented 8 years ago

:+1: Same problem here. It's not possible to add your own functions to the Klogger class because you cant extend a new class from the Klogger class. The file handle should be declared as protected so other users can extend their classes from the Klogger class.

katzgrau commented 8 years ago

How's that?

ghost commented 8 years ago

Brilliant, thanks! :)

Sysix commented 8 years ago

:+1: thanks