{"id":62,"date":"2007-08-04T00:27:00","date_gmt":"2007-08-04T00:27:00","guid":{"rendered":"http:\/\/grummfy.be\/blog\/?p=62"},"modified":"2007-08-04T00:27:00","modified_gmt":"2007-08-04T00:27:00","slug":"zend-framework-zf-geshi-comme-filtre-dans-zf","status":"publish","type":"post","link":"https:\/\/grummfy.be\/blog\/62","title":{"rendered":"Zend Framework (ZF) : Geshi comme filtre dans ZF"},"content":{"rendered":"<p>Gr\u00e2ce \u00e0 la libraire Geshi (<a href=\"http:\/\/qbnz.com\/highlighter\/\" title=\"http:\/\/qbnz.com\/highlighter\/\">http:\/\/qbnz.com\/highlighter\/<\/a>) et \u00e0 l&rsquo;ing\u00e9niosit\u00e9 de ZF, colorer tout vos code, facilement, via ce nouveau filtre.<\/p>\n<p>Pour l&rsquo;utiliser, T\u00e9l\u00e9charger la libraire geshi et d\u00e9compresser l\u00e0 (dans l&rsquo;exemple dans .\/..\/site\/lib\/geshi\/, donc le fichier geshi.php se trouve dans se r\u00e9pertoire et .\/..\/site\/lib\/geshi\/geshi\/ contient les fichiers de langues)<\/p>\n<pre class=\"php\"><span style=\"color: #000000; font-weight: bold;\">&lt;?php<\/span> Zend_Loader::<span style=\"color: #006600;\">loadClass<\/span><span style=\"color: #66cc66;\">&#40;<\/span><span style=\"color: #ff0000;\">'Zend_Filter_Geshi'<\/span><span style=\"color: #66cc66;\">&#41;<\/span>; <span style=\"color: #0000ff;\">$zfg<\/span> = <span style=\"color: #000000; font-weight: bold;\">new<\/span> Zend_Filter_Geshi<span style=\"color: #66cc66;\">&#40;<\/span><span style=\"color: #ff0000;\">'php'<\/span>, <span style=\"color: #ff0000;\">'..\/site\/lib\/geshi\/'<\/span><span style=\"color: #66cc66;\">&#41;<\/span>; <a href=\"http:\/\/www.php.net\/echo\"><span style=\"color: #000066;\">echo<\/span><\/a> <span style=\"color: #0000ff;\">$zfg<\/span>-&gt;<span style=\"color: #006600;\">filter<\/span><span style=\"color: #66cc66;\">&#40;<\/span>&lt;&lt;&lt;ABC <span style=\"color: #000000; font-weight: bold;\">&lt;?php<\/span> Zend_Loader::<span style=\"color: #006600;\">loadClass<\/span><span style=\"color: #66cc66;\">&#40;<\/span><span style=\"color: #ff0000;\">'Zend_Filter_Geshi'<\/span><span style=\"color: #66cc66;\">&#41;<\/span>; \\<span style=\"color: #0000ff;\">$zfg<\/span> = <span style=\"color: #000000; font-weight: bold;\">new<\/span> Zend_Filter_Geshi<span style=\"color: #66cc66;\">&#40;<\/span><span style=\"color: #ff0000;\">'php'<\/span>, <span style=\"color: #ff0000;\">'..\/site\/lib\/geshi\/'<\/span><span style=\"color: #66cc66;\">&#41;<\/span>; ABC <span style=\"color: #66cc66;\">&#41;<\/span>;<\/pre>\n<p>Autre endroit ou trouver ce code&nbsp;: <a href=\"http:\/\/www.z-f.fr\/code\/detail\/17\" title=\"http:\/\/www.z-f.fr\/code\/detail\/17\">http:\/\/www.z-f.fr\/code\/detail\/17<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gr\u00e2ce \u00e0 la libraire Geshi (http:\/\/qbnz.com\/highlighter\/) et \u00e0 l&rsquo;ing\u00e9niosit\u00e9 de ZF, colorer tout vos code, facilement, via ce nouveau filtre. Pour l&rsquo;utiliser, T\u00e9l\u00e9charger la libraire geshi et d\u00e9compresser l\u00e0 (dans l&rsquo;exemple dans .\/..\/site\/lib\/geshi\/, donc le fichier geshi.php se trouve dans se r\u00e9pertoire et .\/..\/site\/lib\/geshi\/geshi\/ contient les fichiers de langues) &lt;?php Zend_Loader::loadClass&#40;&rsquo;Zend_Filter_Geshi&rsquo;&#41;; $zfg = new Zend_Filter_Geshi&#40;&rsquo;php&rsquo;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[10],"tags":[110,24,42,28,37,64],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-php","tag-php","tag-programmation","tag-script","tag-trucs-et-astuces","tag-web","tag-zf"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":0,"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grummfy.be\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}