PDO class ¿wrapper?











up vote
0
down vote

favorite












I'm writing one custom class for PDO connection.



I want these advantages:




  • Protect credentials: user, password ...

  • Facilitate maintenance: facing future password changes for example

  • Facilitate connection: $pdo=new MyPDO();

  • Provide my class with all the PDO functionalities


I write my class as you can see here:



For protect credentials i saved them into a ini file:



<?php return; ?>
; credentials
host=localhost
user=myUser
pass="my/very/secure/password.../UqMsN[)VPn&gunmv3KzE?3Q&Qw/..."
dbname=myDataBase


The class



class MyPDO extends PDO
{

public function __construct()
{
$iniData = parse_ini_file("//home/.credentials/db.php.ini");
$host=$iniData["host"];
$dbname=$iniData["dbname"];
$user=$iniData["user"];
$pass=$iniData["pass"];
$dsn = "mysql:host=$host;dbname=$dbname";


$options = array(
PDO::ATTR_PERSISTENT => FALSE,
PDO::ATTR_EMULATE_PREPARES => FALSE,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
);

try {
parent::__construct($dsn, $user, $pass, $options);
} catch (PDOException $e) {
error_log($this->error = $e->getMessage(),0);
}
}
}
?>




Usage example



include_once('MyPDO.php');
$pdo=new MyPDO();
/*Use any PDO method*/

$pdo->query(...);
$pdo->prepare(...);
$pdo->execute(...);









share|improve this question







New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
    – Your Common Sense
    12 hours ago






  • 1




    @YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
    – A. Cedano
    12 hours ago

















up vote
0
down vote

favorite












I'm writing one custom class for PDO connection.



I want these advantages:




  • Protect credentials: user, password ...

  • Facilitate maintenance: facing future password changes for example

  • Facilitate connection: $pdo=new MyPDO();

  • Provide my class with all the PDO functionalities


I write my class as you can see here:



For protect credentials i saved them into a ini file:



<?php return; ?>
; credentials
host=localhost
user=myUser
pass="my/very/secure/password.../UqMsN[)VPn&gunmv3KzE?3Q&Qw/..."
dbname=myDataBase


The class



class MyPDO extends PDO
{

public function __construct()
{
$iniData = parse_ini_file("//home/.credentials/db.php.ini");
$host=$iniData["host"];
$dbname=$iniData["dbname"];
$user=$iniData["user"];
$pass=$iniData["pass"];
$dsn = "mysql:host=$host;dbname=$dbname";


$options = array(
PDO::ATTR_PERSISTENT => FALSE,
PDO::ATTR_EMULATE_PREPARES => FALSE,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
);

try {
parent::__construct($dsn, $user, $pass, $options);
} catch (PDOException $e) {
error_log($this->error = $e->getMessage(),0);
}
}
}
?>




Usage example



include_once('MyPDO.php');
$pdo=new MyPDO();
/*Use any PDO method*/

$pdo->query(...);
$pdo->prepare(...);
$pdo->execute(...);









share|improve this question







New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
    – Your Common Sense
    12 hours ago






  • 1




    @YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
    – A. Cedano
    12 hours ago















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm writing one custom class for PDO connection.



I want these advantages:




  • Protect credentials: user, password ...

  • Facilitate maintenance: facing future password changes for example

  • Facilitate connection: $pdo=new MyPDO();

  • Provide my class with all the PDO functionalities


I write my class as you can see here:



For protect credentials i saved them into a ini file:



<?php return; ?>
; credentials
host=localhost
user=myUser
pass="my/very/secure/password.../UqMsN[)VPn&gunmv3KzE?3Q&Qw/..."
dbname=myDataBase


The class



class MyPDO extends PDO
{

public function __construct()
{
$iniData = parse_ini_file("//home/.credentials/db.php.ini");
$host=$iniData["host"];
$dbname=$iniData["dbname"];
$user=$iniData["user"];
$pass=$iniData["pass"];
$dsn = "mysql:host=$host;dbname=$dbname";


$options = array(
PDO::ATTR_PERSISTENT => FALSE,
PDO::ATTR_EMULATE_PREPARES => FALSE,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
);

try {
parent::__construct($dsn, $user, $pass, $options);
} catch (PDOException $e) {
error_log($this->error = $e->getMessage(),0);
}
}
}
?>




Usage example



include_once('MyPDO.php');
$pdo=new MyPDO();
/*Use any PDO method*/

$pdo->query(...);
$pdo->prepare(...);
$pdo->execute(...);









share|improve this question







New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm writing one custom class for PDO connection.



I want these advantages:




  • Protect credentials: user, password ...

  • Facilitate maintenance: facing future password changes for example

  • Facilitate connection: $pdo=new MyPDO();

  • Provide my class with all the PDO functionalities


I write my class as you can see here:



For protect credentials i saved them into a ini file:



<?php return; ?>
; credentials
host=localhost
user=myUser
pass="my/very/secure/password.../UqMsN[)VPn&gunmv3KzE?3Q&Qw/..."
dbname=myDataBase


The class



class MyPDO extends PDO
{

public function __construct()
{
$iniData = parse_ini_file("//home/.credentials/db.php.ini");
$host=$iniData["host"];
$dbname=$iniData["dbname"];
$user=$iniData["user"];
$pass=$iniData["pass"];
$dsn = "mysql:host=$host;dbname=$dbname";


$options = array(
PDO::ATTR_PERSISTENT => FALSE,
PDO::ATTR_EMULATE_PREPARES => FALSE,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
);

try {
parent::__construct($dsn, $user, $pass, $options);
} catch (PDOException $e) {
error_log($this->error = $e->getMessage(),0);
}
}
}
?>




Usage example



include_once('MyPDO.php');
$pdo=new MyPDO();
/*Use any PDO method*/

$pdo->query(...);
$pdo->prepare(...);
$pdo->execute(...);






php pdo






share|improve this question







New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 13 hours ago









A. Cedano

1011




1011




New contributor




A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






A. Cedano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
    – Your Common Sense
    12 hours ago






  • 1




    @YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
    – A. Cedano
    12 hours ago




















  • So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
    – Your Common Sense
    12 hours ago






  • 1




    @YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
    – A. Cedano
    12 hours ago


















So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
– Your Common Sense
12 hours ago




So you actually exposed your credentials to anyone who wold have a whim of navigating to .credentials/db.php.ini
– Your Common Sense
12 hours ago




1




1




@YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
– A. Cedano
12 hours ago






@YourCommonSense thaks for your comment. The credentials are not exposed. 1º. The folder is out of public_html, then, non navigation possible (i'm using shared hosting). 2º. The first line: <?php return; ?> prevents to show the file content in case of access to fila via browser. I think the info is protected so.
– A. Cedano
12 hours ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













There are several areas for improvement.




  • First of all, it violates the Liskov substitution principle. I am guilty for doing it too, so I cannot blame you too much but if you want your code to follow the best practices, it's better to make your class not extend PDO but either make a PDO instance a property of your class publicly accessible through a property or a method, or you can re-create in your class all the functionality supported by PDO.


  • Next, error reporting for the connection is rather inflexible. An exception is a precious thing that can be handled in many different ways, logging included. So I would rather re-throw a new exception, like



    try {
    parent::__construct($dsn, $user, $pass, $options);
    } catch (PDOException $e) {
    throw new PDOException($e->getMessage(), (int)$e->getCode());
    }


    so it can be caught elsewhere or simply logged if a corresponding PHP configuration directive says so.



  • Connection encoding is better to be set in the DSN, as it's going to be more generic and supported by all drivers.

  • reading the configuration right in the class violates the Single responsibility principle. I would make this class to accept an array of parameters, as to where these parameters are taken from - from .ini, .yml or .env file - is a distinct matter.

  • And all the hassle related to protecting the configuration should be delegated elsewhere. After all, database credentials are not only settings that have to be protected - there are admin email, salt, API keys, etc.

  • protecting an ini file adding .php as one of its extensions is too risky. it would work merely by accident. Why not to name it straight settings.php and thus make sure it will be always interpreted as PHP as long as it is called through a web-server with PHP support.

  • I would also add a possibility to add/override the PDO options


So I would make your class



class DB
{
protected $connection;
public function __construct($config)
{
$dsn = "mysql:host=$config[host];dbname=$config[dbname];charset=$config[charset]";

$options = array(
PDO::ATTR_PERSISTENT => FALSE,
PDO::ATTR_EMULATE_PREPARES => FALSE,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
);
if (isset($config['options'])) {
$options = array_merge($options, $config['options']);
}

try {
$this->connection = new PDO ($dsn, $config['user'], $config['pass'], $options);
} catch (PDOException $e) {
throw new PDOException($e->getMessage(), (int)$e->getCode());
}
}
public function conn() {
return $this->connection;
}
}


used as



$db = new DB($config);
$stmt = $db->conn()->query('SELECT * FROM users');





share|improve this answer























    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "196"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    A. Cedano is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f209517%2fpdo-class-wrapper%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    There are several areas for improvement.




    • First of all, it violates the Liskov substitution principle. I am guilty for doing it too, so I cannot blame you too much but if you want your code to follow the best practices, it's better to make your class not extend PDO but either make a PDO instance a property of your class publicly accessible through a property or a method, or you can re-create in your class all the functionality supported by PDO.


    • Next, error reporting for the connection is rather inflexible. An exception is a precious thing that can be handled in many different ways, logging included. So I would rather re-throw a new exception, like



      try {
      parent::__construct($dsn, $user, $pass, $options);
      } catch (PDOException $e) {
      throw new PDOException($e->getMessage(), (int)$e->getCode());
      }


      so it can be caught elsewhere or simply logged if a corresponding PHP configuration directive says so.



    • Connection encoding is better to be set in the DSN, as it's going to be more generic and supported by all drivers.

    • reading the configuration right in the class violates the Single responsibility principle. I would make this class to accept an array of parameters, as to where these parameters are taken from - from .ini, .yml or .env file - is a distinct matter.

    • And all the hassle related to protecting the configuration should be delegated elsewhere. After all, database credentials are not only settings that have to be protected - there are admin email, salt, API keys, etc.

    • protecting an ini file adding .php as one of its extensions is too risky. it would work merely by accident. Why not to name it straight settings.php and thus make sure it will be always interpreted as PHP as long as it is called through a web-server with PHP support.

    • I would also add a possibility to add/override the PDO options


    So I would make your class



    class DB
    {
    protected $connection;
    public function __construct($config)
    {
    $dsn = "mysql:host=$config[host];dbname=$config[dbname];charset=$config[charset]";

    $options = array(
    PDO::ATTR_PERSISTENT => FALSE,
    PDO::ATTR_EMULATE_PREPARES => FALSE,
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
    );
    if (isset($config['options'])) {
    $options = array_merge($options, $config['options']);
    }

    try {
    $this->connection = new PDO ($dsn, $config['user'], $config['pass'], $options);
    } catch (PDOException $e) {
    throw new PDOException($e->getMessage(), (int)$e->getCode());
    }
    }
    public function conn() {
    return $this->connection;
    }
    }


    used as



    $db = new DB($config);
    $stmt = $db->conn()->query('SELECT * FROM users');





    share|improve this answer



























      up vote
      0
      down vote













      There are several areas for improvement.




      • First of all, it violates the Liskov substitution principle. I am guilty for doing it too, so I cannot blame you too much but if you want your code to follow the best practices, it's better to make your class not extend PDO but either make a PDO instance a property of your class publicly accessible through a property or a method, or you can re-create in your class all the functionality supported by PDO.


      • Next, error reporting for the connection is rather inflexible. An exception is a precious thing that can be handled in many different ways, logging included. So I would rather re-throw a new exception, like



        try {
        parent::__construct($dsn, $user, $pass, $options);
        } catch (PDOException $e) {
        throw new PDOException($e->getMessage(), (int)$e->getCode());
        }


        so it can be caught elsewhere or simply logged if a corresponding PHP configuration directive says so.



      • Connection encoding is better to be set in the DSN, as it's going to be more generic and supported by all drivers.

      • reading the configuration right in the class violates the Single responsibility principle. I would make this class to accept an array of parameters, as to where these parameters are taken from - from .ini, .yml or .env file - is a distinct matter.

      • And all the hassle related to protecting the configuration should be delegated elsewhere. After all, database credentials are not only settings that have to be protected - there are admin email, salt, API keys, etc.

      • protecting an ini file adding .php as one of its extensions is too risky. it would work merely by accident. Why not to name it straight settings.php and thus make sure it will be always interpreted as PHP as long as it is called through a web-server with PHP support.

      • I would also add a possibility to add/override the PDO options


      So I would make your class



      class DB
      {
      protected $connection;
      public function __construct($config)
      {
      $dsn = "mysql:host=$config[host];dbname=$config[dbname];charset=$config[charset]";

      $options = array(
      PDO::ATTR_PERSISTENT => FALSE,
      PDO::ATTR_EMULATE_PREPARES => FALSE,
      PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
      );
      if (isset($config['options'])) {
      $options = array_merge($options, $config['options']);
      }

      try {
      $this->connection = new PDO ($dsn, $config['user'], $config['pass'], $options);
      } catch (PDOException $e) {
      throw new PDOException($e->getMessage(), (int)$e->getCode());
      }
      }
      public function conn() {
      return $this->connection;
      }
      }


      used as



      $db = new DB($config);
      $stmt = $db->conn()->query('SELECT * FROM users');





      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        There are several areas for improvement.




        • First of all, it violates the Liskov substitution principle. I am guilty for doing it too, so I cannot blame you too much but if you want your code to follow the best practices, it's better to make your class not extend PDO but either make a PDO instance a property of your class publicly accessible through a property or a method, or you can re-create in your class all the functionality supported by PDO.


        • Next, error reporting for the connection is rather inflexible. An exception is a precious thing that can be handled in many different ways, logging included. So I would rather re-throw a new exception, like



          try {
          parent::__construct($dsn, $user, $pass, $options);
          } catch (PDOException $e) {
          throw new PDOException($e->getMessage(), (int)$e->getCode());
          }


          so it can be caught elsewhere or simply logged if a corresponding PHP configuration directive says so.



        • Connection encoding is better to be set in the DSN, as it's going to be more generic and supported by all drivers.

        • reading the configuration right in the class violates the Single responsibility principle. I would make this class to accept an array of parameters, as to where these parameters are taken from - from .ini, .yml or .env file - is a distinct matter.

        • And all the hassle related to protecting the configuration should be delegated elsewhere. After all, database credentials are not only settings that have to be protected - there are admin email, salt, API keys, etc.

        • protecting an ini file adding .php as one of its extensions is too risky. it would work merely by accident. Why not to name it straight settings.php and thus make sure it will be always interpreted as PHP as long as it is called through a web-server with PHP support.

        • I would also add a possibility to add/override the PDO options


        So I would make your class



        class DB
        {
        protected $connection;
        public function __construct($config)
        {
        $dsn = "mysql:host=$config[host];dbname=$config[dbname];charset=$config[charset]";

        $options = array(
        PDO::ATTR_PERSISTENT => FALSE,
        PDO::ATTR_EMULATE_PREPARES => FALSE,
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        );
        if (isset($config['options'])) {
        $options = array_merge($options, $config['options']);
        }

        try {
        $this->connection = new PDO ($dsn, $config['user'], $config['pass'], $options);
        } catch (PDOException $e) {
        throw new PDOException($e->getMessage(), (int)$e->getCode());
        }
        }
        public function conn() {
        return $this->connection;
        }
        }


        used as



        $db = new DB($config);
        $stmt = $db->conn()->query('SELECT * FROM users');





        share|improve this answer














        There are several areas for improvement.




        • First of all, it violates the Liskov substitution principle. I am guilty for doing it too, so I cannot blame you too much but if you want your code to follow the best practices, it's better to make your class not extend PDO but either make a PDO instance a property of your class publicly accessible through a property or a method, or you can re-create in your class all the functionality supported by PDO.


        • Next, error reporting for the connection is rather inflexible. An exception is a precious thing that can be handled in many different ways, logging included. So I would rather re-throw a new exception, like



          try {
          parent::__construct($dsn, $user, $pass, $options);
          } catch (PDOException $e) {
          throw new PDOException($e->getMessage(), (int)$e->getCode());
          }


          so it can be caught elsewhere or simply logged if a corresponding PHP configuration directive says so.



        • Connection encoding is better to be set in the DSN, as it's going to be more generic and supported by all drivers.

        • reading the configuration right in the class violates the Single responsibility principle. I would make this class to accept an array of parameters, as to where these parameters are taken from - from .ini, .yml or .env file - is a distinct matter.

        • And all the hassle related to protecting the configuration should be delegated elsewhere. After all, database credentials are not only settings that have to be protected - there are admin email, salt, API keys, etc.

        • protecting an ini file adding .php as one of its extensions is too risky. it would work merely by accident. Why not to name it straight settings.php and thus make sure it will be always interpreted as PHP as long as it is called through a web-server with PHP support.

        • I would also add a possibility to add/override the PDO options


        So I would make your class



        class DB
        {
        protected $connection;
        public function __construct($config)
        {
        $dsn = "mysql:host=$config[host];dbname=$config[dbname];charset=$config[charset]";

        $options = array(
        PDO::ATTR_PERSISTENT => FALSE,
        PDO::ATTR_EMULATE_PREPARES => FALSE,
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        );
        if (isset($config['options'])) {
        $options = array_merge($options, $config['options']);
        }

        try {
        $this->connection = new PDO ($dsn, $config['user'], $config['pass'], $options);
        } catch (PDOException $e) {
        throw new PDOException($e->getMessage(), (int)$e->getCode());
        }
        }
        public function conn() {
        return $this->connection;
        }
        }


        used as



        $db = new DB($config);
        $stmt = $db->conn()->query('SELECT * FROM users');






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 7 hours ago

























        answered 10 hours ago









        Your Common Sense

        3,291526




        3,291526






















            A. Cedano is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            A. Cedano is a new contributor. Be nice, and check out our Code of Conduct.













            A. Cedano is a new contributor. Be nice, and check out our Code of Conduct.












            A. Cedano is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Code Review Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f209517%2fpdo-class-wrapper%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mont Emei

            Province de Neuquén

            Soliste