HaLo2FrEeEk Posted June 14, 2009 Share Posted June 14, 2009 I don't know where I should post this. I wrote a PHP class that I want to make available to the PHPFreaks community. I'd also like comments on it (critique) on how to make it better and/or improve things within it. I was thinking PHP Applications, but that seems like a place to post official php stuff, not stuff that people here wrote. So, anyone know where, if anywhere, I can post this? Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/ Share on other sites More sharing options...
Daniel0 Posted June 14, 2009 Share Posted June 14, 2009 Nowhere are you allowed to advertise (except in your signature in a non-distracting manner). You can ask for comments in the beta testing forum, but if it's worded like an advertisement it will be regarded as such. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-855544 Share on other sites More sharing options...
HaLo2FrEeEk Posted June 16, 2009 Author Share Posted June 16, 2009 I'm not trying to advertise, I want to post it for people to use. You're telling me there's nowhere for people to post their own php classes? Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857012 Share on other sites More sharing options...
trq Posted June 16, 2009 Share Posted June 16, 2009 Not on this site, no. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857014 Share on other sites More sharing options...
Daniel0 Posted June 16, 2009 Share Posted June 16, 2009 It's still advertisement. The fact that it's PHP related doesn't mean it's not advertising. It doesn't matter if it's viagra, penis enlargement pills or PHP classes. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857017 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 It's still advertisement. The fact that it's PHP related doesn't mean it's not advertising. It doesn't matter if it's viagra, penis enlargement pills or PHP classes. That would be a really weird combination. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857180 Share on other sites More sharing options...
Daniel0 Posted June 16, 2009 Share Posted June 16, 2009 Well, I was just saying that if someone posted a link to their online "pharmacy" where people can buy viagra, you know for the convenience of other people so they don't have to search themselves, he likely wouldn't hesitate to call it advertising (or spam). Switching out "viagra" with "PHP classes" doesn't mean it's no longer advertising, but it just changes the advertised product. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857186 Share on other sites More sharing options...
.josh Posted June 16, 2009 Share Posted June 16, 2009 It's still advertisement. The fact that it's PHP related doesn't mean it's not advertising. It doesn't matter if it's viagra, penis enlargement pills or PHP classes. That would be a really weird combination. ...or would it? Class blah extends .... Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857203 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Or: Class Viagra extends penis { public function __construct() { if($this->erectDuration() > 4*60*60) { contactMedicalHelp(); } } } Hehehe... Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857220 Share on other sites More sharing options...
.josh Posted June 16, 2009 Share Posted June 16, 2009 You forgot the __destruct in which it just instantiates a new object from same class Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857269 Share on other sites More sharing options...
Daniel0 Posted June 16, 2009 Share Posted June 16, 2009 corbin, you need to learn proper OO design The decorator pattern is much better for this: <?php interface IPenisDecorator { public function getSize(); public function isErect(); public function getDecoratedObject(); } class Penis implements IPenisDecorator { /** * Size of penis i cm * * @var float */ private $_size; /** * @var boolean */ private $_erect = false; public function __construct($size) { $this->_size = (float) $size; } public function getSize() { return $this->_size; } public function isErect() { return $this->_erect; } public function getDecoratedObject() { return $this; } // other methods } class PenisEnlarger implements IPenisDecorator { /** * @var IPenisDecorator; */ private $_decorated; public function __construct(IPenisDecorator $decorated) { $this->_decorated = $decorated; } public function getSize() { return $this->_decorated->getSize() * 1.2; } public function isErect() { return $this->_decorated->isErect(); } public function getDecoratedObject() { return $this->_decorated; } } class Viagra implements IPenisDecorator { /** * Duration time in seconds * * @var integer */ static protected $_durationTime = 7200; /** * @var IPenisDecorator; */ private $_decorated; private $_creationTime; public function __construct(IPenisDecorator $decorated) { $this->_decorated = $decorated; $this->_creationTime = time(); } public function getSize() { return $this->_decorated->getSize(); } public function isErect() { if (time() - self::$_durationTime > $this->_creationTime) { return true; } else { return $this->_decorated->isErect(); } } public function getDecoratedObject() { return $this->_decorated; } } $penis = new PenisEnlarger(new Penis(15)); echo $penis->getSize(); // 18 Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857277 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Something about "new Penis" made me laugh. lol. So.... Pretty much you just like to decorate your Penis? Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857281 Share on other sites More sharing options...
.josh Posted June 16, 2009 Share Posted June 16, 2009 So if you go to google images (with filtering off) you can find a guy who has his penis completely tattooed to look like a snake. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857286 Share on other sites More sharing options...
Daniel0 Posted June 16, 2009 Share Posted June 16, 2009 Why were you searching for penis images in the first place? Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857289 Share on other sites More sharing options...
ober Posted June 16, 2009 Share Posted June 16, 2009 I don't think you really want the answer to that. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857298 Share on other sites More sharing options...
.josh Posted June 16, 2009 Share Posted June 16, 2009 Haha I knew I set myself up for that the second I clicked the submit button . A while back the wife and I were looking around for inspiration for tattoos in general, as she wanted to get another tattoo. It just came up on some website showcasing some of the freakier tattoos people got. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857304 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 My girlfriend is going to get her bellybutton pierced and one day she was on my phone looking at the website of the place where she's probably going to get it done (a tattoo/piercing place). She goes "Look at this!" And I was like "Huh?" and looked. Some guy had a bar in the middle of his penis. It definitely caught me off guard lol. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857324 Share on other sites More sharing options...
ober Posted June 16, 2009 Share Posted June 16, 2009 Tell your gf that if she plans to have kids, don't get her belly button pierced. Trust me. My wife had hers pierced. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857337 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Does it stretch into an ugly scar? I doubt she's thought about that. She's 17 though, so I don't think she plans (at least I hope not!) on having kids anytime soon. Surely if the piercing grew back before one started growing from pregnancy it wouldn't leave a nasty scar... Maybe though. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857381 Share on other sites More sharing options...
ober Posted June 17, 2009 Share Posted June 17, 2009 It's not necessarily a nasty scar... but the place where the piercing was stretches out a bit and doesn't exactly go back to it's original shape. And my wife took her belly button jewelry out before she got pregnant... so it had a chance to grow back but did not. And age doesn't really matter. My wife had hers done at 19 and we had our first kid when she was 25. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857948 Share on other sites More sharing options...
.josh Posted June 17, 2009 Share Posted June 17, 2009 Dude chicks get crazy about shit like that. You're just like "so what honey, it's no big deal," but she'll make out like it's the end of the world and shit. NOT worth it. Especially when you already have to hear it about other things. Scar from c-section if applicable. Stretch marks. Looser happy no-no spot fears. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-857964 Share on other sites More sharing options...
ober Posted June 17, 2009 Share Posted June 17, 2009 Wait... are you married to my wife too? Edit: sidenote: My brother always said: "All women are monsters... it's just the kind of monster that you get." Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-858052 Share on other sites More sharing options...
.josh Posted June 17, 2009 Share Posted June 17, 2009 Wait... are you married to my wife too? Well what did you expect being a part of an open source community meant? Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-858089 Share on other sites More sharing options...
corbin Posted June 17, 2009 Share Posted June 17, 2009 Well, in that metaphor, the source is the source of babies. It all makes sense now! It's not necessarily a nasty scar... but the place where the piercing was stretches out a bit and doesn't exactly go back to it's original shape. And my wife took her belly button jewelry out before she got pregnant... so it had a chance to grow back but did not. And age doesn't really matter. My wife had hers done at 19 and we had our first kid when she was 25. Hrmmm.... That kinda sucks. Don't think it'd bother her though. I did mention it to her yesterday though, and she said she didn't think it would scar if she took it out like 6 months before she started growing. Maybe I should tell her it will probably do weird things regardless haha. Dude chicks get crazy about shit like that. You're just like "so what honey, it's no big deal," but she'll make out like it's the end of the world and shit. NOT worth it. Especially when you already have to hear it about other things. Scar from c-section if applicable. Stretch marks. Looser happy no-no spot fears. LOL! Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-858249 Share on other sites More sharing options...
.josh Posted June 17, 2009 Share Posted June 17, 2009 It doesn't really matter when she takes it out. That's not really the issue. The issue is that there's a hole there in the first place. If she gets a piercing, the hole will be there. When she starts blowing up like a balloon, it will stretch. If she takes it out before she starts expanding, she might get lucky and the hole might heal itself and therefore not stretch. But then, it might not close at all. It's not uncommon for people's piercings to never really close. I had ear piercings from when I was a teenager. I haven't worn earrings in like 12 years now, and they are still open. And they were regular free-with-purchase-of-studs piercing you get at walmart, not those stick-a-padlock-through-your-ear sized holes. Quote Link to comment https://forums.phpfreaks.com/topic/162132-where-would-i-post-this/#findComment-858259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.