Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating custom View #5

Closed
theDisco opened this issue Aug 8, 2012 · 2 comments
Closed

Creating custom View #5

theDisco opened this issue Aug 8, 2012 · 2 comments

Comments

@theDisco
Copy link

theDisco commented Aug 8, 2012

I was just trying to implement a custom view, which didn't work out that well :)

I used Reflection to create the stub of the \Yaf\View_Interface (https://github.com/theDisco/yaf-playground/blob/master/stub/yaf/View_Interface.php). I've then implemented the interface and set the view in the bootstrap by calling \Yaf\Dispatcher::setView. When I request the page in the browser the response is empty. It also seems that any of the methods in my custom view are called.

Any idea what am I doing wrong? Is it possible to implement custom views at the moment at all? I've noticed that \Yaf\Controller_Abstract is trying to determine the path independently from the view. I still get no errors/exceptions about the path not found.

@laruence
Copy link
Owner

Hi, please look at this example: https://github.com/laruence/yaf-examples/tree/master/custom-view

@theDisco
Copy link
Author

Hi, thanks for the link, the problem was on my side though. I was running 2.1.11 version and after upgrading to 2.1.18 everything works as expected. I guess it had something to do with the segfault you have fixed in 2.1.16 and 2.1.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants