Coder Social home page Coder Social logo

Comments (5)

laruence avatar laruence commented on May 3, 2024

sorry, I am not sure what are you meaning here, can you give me a test script about that?

from yaf.

SpiderMatt3825U avatar SpiderMatt3825U commented on May 3, 2024

Sure, it's real simple. Take the following two custom controller classes for example:

class SharedController extends Yaf_Controller_Abstract {}
class ContactController extends SharedController {}

So when I have a route that points to the "ContactController" I receive the following error message:

Controller must be an instance of Yaf_Controller_Abstract

My goal is quite simple and is perfectly inline with the long running fundamentals of OOP and more specifically abstraction. I am simply trying to create a shared custom controller for all my site's controllers to extend so that some functionality common to every request may be only written one time. Also, to save time, this is not a scenario where the use of an external action class would make sense nor solve the problem.

from yaf.

laruence avatar laruence commented on May 3, 2024

It should work, could you please verify that no auto-loading fails ?

from yaf.

SpiderMatt3825U avatar SpiderMatt3825U commented on May 3, 2024

I already confirmed that the auto-loading is working as the middle class (the one containing the abstracted custom functionality) resides in the same location as the child class. I have tested this in the most basic of examples and still suffered the failure. Unfortunately, due to the overwhelming lack of documentation I have had to discard my current efforts in implementing the Yaf framework in my current project. I really hope it catches up relatively soon as I love the performance benchmarks of this framework but I am finding myself making far too many sacrifices compared to my normal framework environment.

from yaf.

laruence avatar laruence commented on May 3, 2024

what's your yaf version?
I confirmed this works well .

not sure what's wrong there, maybe you can send me your own demo?

thanks

from yaf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.