{"id":714,"date":"2012-02-11T16:56:10","date_gmt":"2012-02-11T16:56:10","guid":{"rendered":"http:\/\/nestor.nestasoft.fr\/?p=714"},"modified":"2012-02-12T04:48:02","modified_gmt":"2012-02-12T04:48:02","slug":"programmer-en-php-dans-vs-2010","status":"publish","type":"post","link":"https:\/\/nestasoft.fr\/?p=714","title":{"rendered":"Programmer en PHP  dans VS 2010"},"content":{"rendered":"<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/VSPHP.png\"><img decoding=\"async\" class=\"alignleft  wp-image-688\" title=\"Vs PHP\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/VSPHP.png\" alt=\"Vs PHP\" width=\"200\" \/><\/a><\/p>\n<p>D\u00e9sormais, \u00a0les d\u00e9veloppeurs PHP peuvent \u00a0utiliser l\u2019IDE Visual Studio. Que se soit du PHP4 ou 5, du Zend MVC, le tout peut se faire au sein de ce \u00a0bijoux.<\/p>\n<p>Points forts:<\/p>\n<p>Vs.PHP permet\u00a0:<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0La coloration syntaxique du code<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0L\u2019auto compl\u00e9tion<br \/>\n         <!--more--><\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0Supporte les Template multiples et l&rsquo;IntelliSense pour les langages PHP, Smarty, HTML, JavaScript, CSS, XML et XSLT.<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Offre un support de XDebug<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Peut d\u00e9boguer le PHP, le JavaScript et le .Net en une seule fois<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Poss\u00e8de un serveur Apache pour effectuer des tests en local<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Exemple\u00a0:<\/strong> Application web ZendFramework MVC<br \/>\n<img decoding=\"async\" class=\"center\" title=\"Vs PHP\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/ZendPHPMVC.bmp\" alt=\"Vs PHP\" \/><\/p>\n<p><strong>Contenu de la solution<\/strong><\/p>\n<p>Voici \u00e0 quoi la solution finale doit ressembler\u00a0:<br \/>\n<img decoding=\"async\" class=\"center\" title=\"Vs PHP\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/Solution.bmp\" alt=\"Vs PHP\" \/><\/p>\n<p><strong>Dans le r\u00e9pertoire html<\/strong><\/p>\n<p><strong>\u00a0<\/strong>Ce r\u00e9pertoire contient trois fichiers\u00a0:<\/p>\n<ul>\n<li>\u00a0 \u00a0 \u00a0 \u00a0.htaccess<\/li>\n<li>\u00a0 \u00a0 \u00a0 \u00a0Index.php<\/li>\n<li>\u00a0 \u00a0 \u00a0 Config.ini<\/li>\n<\/ul>\n<div><\/div>\n<div><strong>Contenu des fichiers<\/strong><\/div>\n<p>Dans le r\u00e9pertoire HTML<br \/>\n<strong>.htaccess<\/strong><\/p>\n<pre class=\"brush: php\">RewriteEngine on\r\nRewriteRule !\\.(js|ico|gif|jpg|png|css|php)$ index.php<\/pre>\n<p><strong>config.ini<\/strong><\/p>\n<pre class=\"brush: php\">baseUrl=\/html<\/pre>\n<p><strong>index.php<\/strong><\/p>\n<pre class=\"brush: php\">&lt;?php\r\n\r\nrequire_once 'Zend\/Controller\/Front.php';\r\n\r\nrequire_once 'Zend\/Config\/Ini.php';\r\n\r\n$config = new Zend_Config_Ini(dirname(__FILE__).\"\/config.ini\");\r\n\r\n$front = Zend_Controller_Front::getInstance();\r\n\r\n$front-&gt;setControllerDirectory(dirname(dirname(__FILE__)) . '\/application\/controllers')\r\n-&gt;setBaseUrl($config-&gt;baseUrl);\r\n\r\n$front-&gt;dispatch();\r\n\r\n?&gt;<\/pre>\n<p>Dans le r\u00e9pertoire Controllers<\/p>\n<p><strong>IndexController.php<\/strong><\/p>\n<pre class=\"brush: php\">&lt;?php\r\n\r\nrequire_once 'Zend\/Controller\/Action.php';\r\n\r\nrequire_once 'Zend\/Auth.php';\r\n\r\nclass IndexController extends Zend_Controller_Action\r\n{\r\n\/**\r\n* indexAction\r\n*\r\n* @return void\r\n*\/\r\npublic function indexAction()\r\n{\r\n$this-&gt;render('Bienvenue');\r\n}\r\n}<\/pre>\n<p><strong>ErrorControler.php<\/strong><\/p>\n<pre class=\"brush: php\">&lt;?php\r\n\r\nrequire_once 'Zend\/Controller\/Action.php';\r\n\r\nclass ErrorController extends Zend_Controller_Action\r\n{\r\n\/**\r\n* Handle errors\r\n*\r\n* @return void\r\n*\/\r\npublic function errorAction()\r\n{\r\n$errors = $this-&gt;_getParam('error_handler', false);\r\nif (!$errors) {\r\n\/\/ Unknown application error\r\nreturn $this-&gt;render('500');\r\n}\r\n\r\nswitch ($errors-&gt;type) {\r\ncase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\ncase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n\/\/ Page not found (404) error\r\n$this-&gt;render('404');\r\nbreak;\r\ndefault:\r\n\/\/ Application (500) error\r\n$this-&gt;render('500');\r\nbreak;\r\n}\r\n}\r\n}\r\n\r\n?&gt;<\/pre>\n<p>Dans le r\u00e9pertoire Views\/Scripts\/Error<\/p>\n<p><strong>404.phtml<\/strong><\/p>\n<pre class=\"brush: php\">&lt;!DOCTYPE html\r\nPUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\r\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=iso-8859-1\" \/&gt;\r\n&lt;title&gt;ZendFramework MVC on Vs.PHP&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\nPage non trouv\u00e9e!\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p><strong>500.phtml<\/strong><\/p>\n<pre class=\"brush: php\">&lt;!DOCTYPE html\r\nPUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\r\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=iso-8859-1\" \/&gt;\r\n&lt;title&gt;ZendFramework MVC on Vs.PHP&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\nUne erreure est survenue dans l'application\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Dans le r\u00e9pertoire Views\/Scripts\/Index<\/p>\n<p><strong>bienvenue.phtml<\/strong><\/p>\n<pre class=\"brush: php\">&lt;!DOCTYPE html\r\nPUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\r\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=iso-8859-1\" \/&gt;\r\n&lt;title&gt;ZendFramework MVC on Vs.PHP&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;b&gt; Enfin dans l'IDE Visual Studio 2010!&lt;\/b&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p><strong>Test de la solution (En mode d\u00e9bogage) :<\/strong><br \/>\n<img decoding=\"async\" class=\"center\" title=\"Vs PHP\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/pointArret.bmp\" alt=\"Vs PHP\" \/><\/p>\n<p><strong>R\u00e9sultat<\/strong><\/p>\n<p><img decoding=\"async\" class=\"center\" title=\"Vs PHP\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/02\/Resultat.bmp\" alt=\"Vs PHP\" \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_714\" class=\"pvc_stats all  \" data-element-id=\"714\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/nestasoft.fr\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>D\u00e9sormais, \u00a0les d\u00e9veloppeurs PHP peuvent \u00a0utiliser l\u2019IDE Visual Studio. Que se soit du PHP4 ou 5, du Zend MVC, le tout peut se faire au sein de ce \u00a0bijoux. Points forts: Vs.PHP permet\u00a0: &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0La coloration syntaxique du code &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0L\u2019auto compl\u00e9tion<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_714\" class=\"pvc_stats all  \" data-element-id=\"714\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/nestasoft.fr\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-714","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=714"}],"version-history":[{"count":17,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/714\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/714\/revisions\/742"}],"wp:attachment":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}