How access to $this-webroot controller's variable from a model?

2012-01-02 Thread byqsri
Hi I would ask how can I access to $this-webroot controller's variable from a model? Many Thanks Marco -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: How access to $this-webroot controller's variable from a model?

2012-01-02 Thread Laerte M. Rodrigues
use Helper::url('/') 2012/1/2 byqsri marco.rizze...@gmail.com Hi I would ask how can I access to $this-webroot controller's variable from a model? Many Thanks Marco -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: How access to $this-webroot controller's variable from a model?

2012-01-02 Thread 清水紘己
Laerte M. Rodrigues You meant Router::url(), right? It will return proper value through web, but not in cli at edge cases. Recommended way is manually to use Model::set() method or receive value via property, like $Post-webroot = $this-webroot(or Post::$webroot = ...). Because testing it is

Re: How access to $this-webroot controller's variable from a model?

2012-01-02 Thread Laerte M. Rodrigues
I use Cakephp 2.0 and the static method Helper::url('/') return the URL from WebRoot 2012/1/2 清水紘己 hiromi2...@gmail.com Laerte M. Rodrigues You meant Router::url(), right? It will return proper value through web, but not in cli at edge cases. Recommended way is manually to use Model::set()

Re: How access to $this-webroot controller's variable from a model?

2012-01-02 Thread Tilen Majerle
he is probably need absolute path for webroot, not browser :) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/1/2 Laerte M. Rodrigues laertemat...@gmail.com I use Cakephp 2.0 and the static method Helper::url('/') return the URL from WebRoot 2012/1/2 清水紘己 hiromi2...@gmail.com

Re: How access to $this-webroot controller's variable from a model?

2012-01-02 Thread Laerte M. Rodrigues
if they have the absolute path, use const WEBROOT_DIR 2012/1/2 Tilen Majerle tilen.maje...@gmail.com he is probably need absolute path for webroot, not browser :) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/1/2 Laerte M. Rodrigues laertemat...@gmail.com I use Cakephp 2.0 and