Re: [PHP] PDO: extend or encapsulate?

2012-07-12 Thread ma...@behnke.biz
tamouse mailing lists hat am 13. Juli 2012 um 07:06 geschrieben: > It's Friday, so... > > Yes, it's true, I have just started looking at using PDO instead of > mysqli -- a bit behind the times... > > My question at this stage, is do people tend to extend the PDO class > for their own use, or e

[PHP] PDO: extend or encapsulate?

2012-07-12 Thread tamouse mailing lists
It's Friday, so... Yes, it's true, I have just started looking at using PDO instead of mysqli -- a bit behind the times... My question at this stage, is do people tend to extend the PDO class for their own use, or encapsulate it in a class (or do most people use it mostly in procedural code?) --

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 9:23 PM, Nathan Nobbe wrote: > On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham wrote: > >> On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe >> wrote: >> > Hi all, >> > >> > Strangely PHP seems to let each class have its own layer of private >> scope >> > for member variables. I

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham wrote: > On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe > wrote: > > Hi all, > > > > Strangely PHP seems to let each class have its own layer of private scope > > for member variables. If a subclass defines a member variable of the > same > > name as o

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Tommy Pham
On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe wrote: > Hi all, > > Strangely PHP seems to let each class have its own layer of private scope > for member variables. If a subclass defines a member variable of the same > name as one defined in the parent the values are maintained independently > in

[PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
Hi all, Strangely PHP seems to let each class have its own layer of private scope for member variables. If a subclass defines a member variable of the same name as one defined in the parent the values are maintained independently in instances of the child class. First off a simple class with a

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Matijn Woudt
On Fri, Jul 13, 2012 at 12:41 AM, Paul M Foster wrote: > On Fri, Jul 13, 2012 at 12:26:33AM +0200, Timmy Sjöstedt wrote: > > > [snip] > >> >> The Controllers also doesn't care if the data is stored in MySQL, >> Postgres, in RAM or on butterflies or anything else, as long as data >> is returned in

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Fri, Jul 13, 2012 at 12:26:33AM +0200, Timmy Sjöstedt wrote: [snip] > > The Controllers also doesn't care if the data is stored in MySQL, > Postgres, in RAM or on butterflies or anything else, as long as data > is returned in an expected format. I can attest that attempting to store data on

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Thu, Jul 12, 2012 at 02:44:12PM -0700, Daevid Vincent wrote: > > -Original Message- > > From: Simon Dániel [mailto:simondan...@gmail.com] > > Sent: Thursday, July 12, 2012 1:21 PM > > Subject: [PHP] Entry point of an MVC framework > > > > I have started to develop a simple MVC framewor

Re: [PHP] vCard Image

2012-07-12 Thread Matijn Woudt
On Thu, Jul 12, 2012 at 5:51 PM, Floyd Resler wrote: > I'm trying to extract the image from a vCard and display it. I'm not having > any luck. I saw a sample of putting an image into a vCard via PHP and use > base64_encode. So I thought base64_decode would work. However, still no > luck. A

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Timmy Sjöstedt
On 07/12/2012 10:21 PM, Simon Dániel wrote: Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there is a controller for manag

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread admin
-Original Message- From: Timmy Sjöstedt [mailto:m...@iostream.se] Sent: Thursday, July 12, 2012 6:01 PM To: php-general@lists.php.net Subject: Re: [PHP] Entry point of an MVC framework On 07/12/2012 11:44 PM, Daevid Vincent wrote: >> -Original Message- >> From: Simon Dániel [mai

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Timmy Sjöstedt
On 07/12/2012 11:44 PM, Daevid Vincent wrote: -Original Message- From: Simon Dániel [mailto:simondan...@gmail.com] Sent: Thursday, July 12, 2012 1:21 PM Subject: [PHP] Entry point of an MVC framework I have started to develop a simple MVC framework. Yeah! Just what PHP needs, another

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Thu, Jul 12, 2012 at 10:21:21PM +0200, Simon Dániel wrote: > Hi, > > I have started to develop a simple MVC framework. > > I have a base controller class which is abstract and all of the > controllers are inherited from that. Every controller contains actions > represented by methods. (E. g.

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Griffiths
I totally disagree with this! (more exclamation marks) ! (see) !!! (and some more) ! Learning how to put design patterns into practice in your chosen language is a great skill to have as a programmer. I personally use various frameworks, however the existence of them does not st

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 14:44, "Daevid Vincent" wrote: >Personally I *hate* frameworks with a passion, but if you're going to use >one, then why not just build with one that is already out there and well >supported. http://www.phpframeworks.com/ to start with. I wouldn't suggest most people try to build one

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Ashley Sheridan
On Thu, 2012-07-12 at 14:44 -0700, Daevid Vincent wrote: > > -Original Message- > > From: Simon Dániel [mailto:simondan...@gmail.com] > > Sent: Thursday, July 12, 2012 1:21 PM > > Subject: [PHP] Entry point of an MVC framework > > > > I have started to develop a simple MVC framework. > >

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Daevid Vincent
> -Original Message- > From: Simon Dániel [mailto:simondan...@gmail.com] > Sent: Thursday, July 12, 2012 1:21 PM > Subject: [PHP] Entry point of an MVC framework > > I have started to develop a simple MVC framework. Yeah! Just what PHP needs, another MVC framework NOT. Why are you r

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 13:21, "Simon Dániel" wrote: >And I can't do it with the constructor of the inherited >class, becouse this way I would overwrite the parent constructor. Just call to the parent constructor from the child: public function __construct() { parent::__construct(); //do whatever }

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Al
On 7/12/2012 3:58 PM, David OBrien wrote: On Jul 12, 2012, at 2:17 PM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Al
On 7/12/2012 3:09 PM, Jim Lucas wrote: On 07/12/2012 11:17 AM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER[

[PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Dániel
Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there is a controller for managing product items in a webshop, and there are

Re: [PHP] Reverse DNS testing

2012-07-12 Thread David OBrien
On Jul 12, 2012, at 2:17 PM, Al wrote: > I want to do a rDNS check on a admin entered host name to insure in-coming > mail servers don't reject mail, sent by my app, because the rDNS doesn't > exist or doesn't match. > > Here is the fundamental code: > > $host = $_SERVER['SERVER_NAME']; //sit

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Jim Lucas
On 07/12/2012 11:17 AM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER['SERVER_NAME']; //site name shared or not

[PHP] Reverse DNS testing

2012-07-12 Thread Al
I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER['SERVER_NAME']; //site name shared or not $ip = gethostbyname($host); $hos

[PHP] vCard Image

2012-07-12 Thread Floyd Resler
I'm trying to extract the image from a vCard and display it. I'm not having any luck. I saw a sample of putting an image into a vCard via PHP and use base64_encode. So I thought base64_decode would work. However, still no luck. Anyone have any ideas? Thanks! Floyd

Re: [PHP] database hell

2012-07-12 Thread Ashley Sheridan
"ma...@behnke.biz" wrote: > > > >Nick Edwards hat am 12. Juli 2012 um 14:00 >geschrieben: > >> On 7/12/12, Gibbs wrote: >> >> > mysql_query("DELETE from userprefs where clientr='$User'", >$connmy); > > >Sidenote: And don't forget to validate user input and make use of mysql >escape >and prepa

Re: [PHP] database hell

2012-07-12 Thread ma...@behnke.biz
Nick Edwards hat am 12. Juli 2012 um 14:00 geschrieben: > On 7/12/12, Gibbs wrote: > > > mysql_query("DELETE from userprefs where clientr='$User'", $connmy); Sidenote: And don't forget to validate user input and make use of mysql escape and prepared statements ;) -- PHP General Mailing L

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Gibbs wrote: >>> $connmy=mysql_connect("host","user","pass", TRUE); >>> >>> http://php.net/manual/en/function.mysql-connect.php >>> >> >> Thanks, will give that a shot >> > I forgot to add your queries will need the new link too. So > > mysql_query("DELETE from userprefs where clientr

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Adam Nicholls wrote: > > >> -Original Message- >> From: Nick Edwards [mailto:nick.z.edwa...@gmail.com] >> Sent: 12 July 2012 12:30 >> To: php-general@lists.php.net >> Subject: [PHP] database hell >> >> Hi >> >> We have a program that manages users, throughout all database calls

Re: [PHP] database hell

2012-07-12 Thread Gibbs
On 12/07/12 12:38, Nick Edwards wrote: On 7/12/12, Gibbs wrote: On 12/07/12 12:29, Nick Edwards wrote: Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query("Delete from clients where id=$User"); A

RE: [PHP] database hell

2012-07-12 Thread Adam Nicholls
> -Original Message- > From: Nick Edwards [mailto:nick.z.edwa...@gmail.com] > Sent: 12 July 2012 12:30 > To: php-general@lists.php.net > Subject: [PHP] database hell > > Hi > > We have a program that manages users, throughout all database calls > > created as: > $connect = mysql_connec

Re: [PHP] database hell

2012-07-12 Thread Stuart Dallas
On 12 Jul 2012, at 12:29, Nick Edwards wrote: > We have a program that manages users, throughout all database calls > > created as: > $connect = mysql_connect($db_host--other variables); > mysql_query("Delete from clients where id=$User"); > > All this works good, but, we need, in the delete fun

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Gibbs wrote: > On 12/07/12 12:29, Nick Edwards wrote: >> Hi >> >> We have a program that manages users, throughout all database calls >> >> created as: >> $connect = mysql_connect($db_host--other variables); >> mysql_query("Delete from clients where id=$User"); >> >> All this works goo

Re: [PHP] database hell

2012-07-12 Thread Gibbs
On 12/07/12 12:29, Nick Edwards wrote: Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query("Delete from clients where id=$User"); All this works good, but, we need, in the delete function to delete

[PHP] database hell

2012-07-12 Thread Nick Edwards
Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query("Delete from clients where id=$User"); All this works good, but, we need, in the delete function to delete from another database $connmy=mysql_conn

Re: [PHP] Contribute to PHP

2012-07-12 Thread Mihamina Rakotomandimby
On 07/12/2012 10:45 AM, Sebastian Krebs wrote: Nowadays contributing to an OSS-project is (thankfully) often just a matter of creating a github account and sending a pull request. Clone, commit, pull, push then send the pull request. Also note that "contributing" to PHP" means "contributing to

Re: [PHP] Contribute to PHP

2012-07-12 Thread Sebastian Krebs
Hi, Nowadays contributing to an OSS-project is (thankfully) often just a matter of creating a github account and sending a pull request. Because you mentioned the ZF, have a look at it's github mirror [1]. There is also a section about contributing in the readme-file. Other projects have similar d

Re: [PHP] Contribute to PHP

2012-07-12 Thread Ziad Jammal
thx Matin and apologies all for my email. I will check with the other list. Regards, Ziad On Jul 12, 2012, at 10:52 AM, Matijn Woudt wrote: > On Thu, Jul 12, 2012 at 8:45 AM, Ziad Jammal wrote: >> Deal all phpiers, >> >> It took me a while before I hit the send key. >> I have been a php develo