문제

I have own project and i would like add for this class same as in Jobeet tutorial: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/05

I copied exactly same as in this article, but i have error:

Fatal error: Call to undefined method Jobeet::slugify()

Any own class for /lib is not included in my actions, but methods getTable, from Doctrine etc working. Not working only my class for all folder /lib. Why? How can i enable this?

도움이 되었습니까?

해결책

First, do you have this file: Jobeet.class.php ?

Second, this is strange because by default, classes stored in the following directories in your projects benefit from the autoloading automatically:

  • myproject/lib/
  • myproject/lib/model
  • myproject/apps/frontend/lib/
  • myproject/apps/frontend/modules/mymodule/lib

You can force the autoload when you need to load lib from other folders. Check the doc for that (this is for sf1.2 but it's work for 1.4).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top