Welcome Guest, Not a member yet? Register   Sign In
Problem with CodeIgniter benchmarking and profiling
#1

[eluser]wstevens[/eluser]
I have some PHP classes that exist outside of the MVC classes. They are used and called by the controllers. It appears I cannot use the benchmarking functionality within these classes functions because they are not specifically model, view, or controller classes. Is there any way around this? Thanks
#2

[eluser]Aken[/eluser]
What do you mean you can't use it? What is the actual use-case you're trying to do?
#3

[eluser]wstevens[/eluser]
I am just trying to test functionality within a function within a class that is not located in the application/controllers, application/views, and application/models folders. These seem to be working only within those folders:

http://ellislab.com/codeigniter/user-gui...iling.html

http://ellislab.com/codeigniter/user-gui...hmark.html

The actual folder the class is found in is application/classes
#4

[eluser]Aken[/eluser]
I don't know why you assume that these items are constrained to only controllers/models/views, but okay then.

You can use the CI super-object by using get_instance(). See this page.

You can also instantiate a new CI_Benchmark class manually.
#5

[eluser]wstevens[/eluser]
Ah ok yes I was using "this" rather than doing that. I thank you for that.

Admittedly I just started using CI a few weeks ago so I'm still a beginner.




Theme © iAndrew 2016 - Forum software by © MyBB