Help please - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: Help please (/showthread.php?tid=19556) |
Help please - fl3x - 06-13-2011 https://subversion.assembla.com/svn/open_cms/ Check that out with svn then look at the code, why isn't the $sanitizer object available in the User and Session classes? I'm curious when they should have inherited control through the config file. Please help RE: Help please - 0xE9 - 06-13-2011 To use a Class from inside another class you need to declare the class you want to use as global inside the function you want to use it in. So say i have: class lulz { public function lolz($lol) { return $lol; } } class rofl { public function roflz($lul) { return $lul; } } to call $lulz->lolz inside of roflz I would do this: class rofl { public function roflz($lul) { global $lulz $lul = $lulz->lolz; return $lul; } } RE: Help please - -Dreams - 06-13-2011 Very interesting... I will help if you need PM me. RE: Help please - fl3x - 06-14-2011 (06-13-2011, 08:10 PM)0xE9 Wrote: To use a Class from inside another class you need to declare the class you want to use as global inside the function you want to use it in. Wow, maybe if you didn't name it so idiotically... RE: Help please - 0xE9 - 06-14-2011 (06-14-2011, 11:22 AM)๖ۣۜMitchell Wrote: Wow, maybe if you didn't name it so idiotically...Next time I won't help you :\ RE: Help please - ๖ۣۜDunsparth - 06-14-2011 (06-14-2011, 11:22 AM)๖ۣۜMitchell Wrote: Wow, maybe if you didn't name it so idiotically... Name it yourself derp Itleast he took the time to help u so why are u complaining? RE: Help please - fl3x - 06-15-2011 (06-14-2011, 02:08 PM)ILOVEW33D™ Wrote: Name it yourself derp Because he didn't help me? Most of that is wrong wrong wrong. RE: Help please - ๖ۣۜDunsparth - 06-15-2011 (06-15-2011, 08:01 PM)๖ۣۜMitchell Wrote: Because he didn't help me? Most of that is wrong wrong wrong. How about u use yahoo answer's? that usually helps if SF cant help u. RE: Help please - 0xE9 - 06-16-2011 (06-15-2011, 08:01 PM)๖ۣۜMitchell Wrote: Because he didn't help me? Most of that is wrong wrong wrong.What I explained was 100% correct. Did you even try and global it? -.- I use it on my website to use classes from within another. If it doesn't work for you maybe you should go back to learning. This is a function I was testing, It makes calls to my sql class ($db) from withing the class $security and works fine. RE: Help please - Carbon Host - 08-02-2011 i just googls stuff like this |