{"id":1424,"date":"2016-07-31T10:17:54","date_gmt":"2016-07-31T10:17:54","guid":{"rendered":"https:\/\/www.codebee.co.th\/labs\/?p=1424"},"modified":"2016-10-23T11:51:50","modified_gmt":"2016-10-23T11:51:50","slug":"codeigniter-hooks-%e0%b8%97%e0%b8%b3%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%82%e0%b9%89%e0%b8%b2%e0%b9%83%e0%b8%88%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2","status":"publish","type":"post","link":"https:\/\/www.codebee.co.th\/labs\/codeigniter-hooks-%e0%b8%97%e0%b8%b3%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%82%e0%b9%89%e0%b8%b2%e0%b9%83%e0%b8%88%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2\/","title":{"rendered":"codeigniter hooks \u0e17\u0e33\u0e04\u0e27\u0e32\u0e21\u0e40\u0e02\u0e49\u0e32\u0e43\u0e08\u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks point"},"content":{"rendered":"<h3>codeigniter hooks \u0e17\u0e33\u0e04\u0e27\u0e32\u0e21\u0e40\u0e02\u0e49\u0e32\u0e43\u0e08\u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks point<\/h3>\n<p><\/br><br \/>\n\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a hooks \u0e43\u0e19 codeigniter \u0e40\u0e1b\u0e47\u0e19\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e21\u0e35\u0e44\u0e27\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e31\u0e1a\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e41\u0e17\u0e23\u0e01\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16<br \/>\n\u0e1a\u0e32\u0e07\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19 \u0e42\u0e14\u0e22\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e22\u0e38\u0e48\u0e07\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e44\u0e1f\u0e25\u0e4c\u0e2b\u0e25\u0e31\u0e01 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19 \u0e2d\u0e32\u0e08\u0e21\u0e35\u0e1a\u0e32\u0e07\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<br \/>\n\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07 controller \u0e43\u0e14 \u0e46 \u0e01\u0e48\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e08\u0e30\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07 constructure \u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 <!--more--><\/p>\n<p>\u0e02\u0e2d\u0e07 controller \u0e19\u0e31\u0e49\u0e19 \u0e46 \u0e2b\u0e23\u0e37\u0e2d\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e1a\u0e32\u0e07\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48 constructure \u0e17\u0e33\u0e07\u0e32\u0e19\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27<br \/>\n\u0e2b\u0e23\u0e37\u0e2d\u0e41\u0e21\u0e49\u0e01\u0e23\u0e30\u0e17\u0e31\u0e49\u0e07 controller \u0e19\u0e31\u0e49\u0e19 \u0e46 \u0e44\u0e14\u0e49\u0e17\u0e33\u0e07\u0e32\u0e19\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e04\u0e48\u0e2d\u0e22\u0e40\u0e23\u0e35\u0e22\u0e01\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e1a\u0e32\u0e07\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b \u0e01\u0e47\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e33\u0e44\u0e14\u0e49\u0e14\u0e49\u0e27\u0e22<br \/>\nHooks class \u0e40\u0e0a\u0e48\u0e19\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e19<br \/>\n<\/br><\/p>\n<h4>\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks<\/h4>\n<p>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks \u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e34\u0e14\u0e44\u0e1f\u0e25\u0e4c <strong>application\/config\/config.php<\/strong> \u0e41\u0e25\u0e30\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 enable_hooks<br \/>\n\u0e08\u0e32\u0e01\u0e04\u0e48\u0e32\u0e1b\u0e01\u0e15\u0e34\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 FALSE \u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19 TRUE<\/p>\n<pre class=\"lang:default decode:true \" title=\"\u0e27\u0e34\u0e18\u0e35\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks \u0e43\u0e19 ci\" >$config['enable_hooks'] = TRUE;<\/pre>\n<p><\/br><\/p>\n<h4>\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c hooks class<\/h4>\n<p>\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 hooks \u0e04\u0e25\u0e32\u0e2a\u0e19\u0e31\u0e49\u0e19 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e27\u0e49\u0e43\u0e19\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e49\u0e2d application\/hooks\/ \u0e43\u0e19\u0e17\u0e35\u0e48\u0e19\u0e35\u0e49\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e17\u0e14\u0e25\u0e2d\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c WebHook.php<br \/>\n\u0e42\u0e14\u0e22\u0e17\u0e35\u0e48\u0e20\u0e32\u0e22\u0e43\u0e19\u0e04\u0e25\u0e32\u0e2a\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07 method \u0e21\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e23\u0e30\u0e1a\u0e38\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e43\u0e19 hooks \u0e41\u0e15\u0e48\u0e25\u0e30\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e14\u0e49\u0e27\u0e22 \u0e08\u0e30\u0e44\u0e14\u0e49\u0e42\u0e04\u0e4a\u0e14\u0e1b\u0e23\u0e30\u0e21\u0e32\u0e13\u0e19\u0e35\u0e49<\/p>\n<p><strong>application\/hooks\/WebHook.php<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"application\/hooks\/WebHook.php\" >&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');\r\n \r\nclass WebHook {\r\n \r\n\tpublic function __construct(){\r\n\t \r\n\t}\r\n\tpublic function pre_system(){\r\n\t \techo \"pre_system.&lt;br&gt;\";\r\n\t}\r\n}\r\n?&gt;<\/pre>\n<p><\/br><\/p>\n<h4>\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e41\u0e1a\u0e1a\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e02\u0e2d\u0e07 hooks class<\/h4>\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e44\u0e14\u0e49\u0e04\u0e25\u0e32\u0e2a\u0e41\u0e25\u0e30\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e17\u0e35\u0e48\u0e08\u0e30\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e41\u0e25\u0e49\u0e27 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e44\u0e1b\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c<br \/>\n\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e2a\u0e31\u0e48\u0e07\u0e43\u0e2b\u0e49\u0e04\u0e25\u0e32\u0e2a WebHook \u0e17\u0e33\u0e07\u0e32\u0e19\u0e41\u0e15\u0e48\u0e25\u0e30\u0e40\u0e21\u0e18\u0e2d\u0e14\u0e41\u0e1a\u0e1a\u0e40\u0e1b\u0e47\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e19\u0e31\u0e49\u0e19\u0e40\u0e23\u0e32\u0e08\u0e30\u0e40\u0e02\u0e35\u0e22\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e43\u0e19 hooks.php \u0e44\u0e14\u0e49\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<p><strong>application\/config\/hooks.php<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"application\/hooks\/WebHook.php\" >\r\n<?php\r\ndefined('BASEPATH') OR exit('No direct script access allowed');\r\n\r\n$hook['pre_system'] = array(\r\n        'class'    => 'WebHook', \/\/ \u0e0a\u0e37\u0e48\u0e2d\u0e04\u0e25\u0e32\u0e2a\r\n        'function' => 'pre_system', \/\/ \u0e0a\u0e37\u0e48\u0e2d\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e40\u0e21\u0e18\u0e2d\u0e14\r\n        'filename' => 'WebHook.php', \/\/ \u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c\r\n        'filepath' => 'hooks', \/\/ \u0e42\u0e1f\u0e25\u0e40\u0e14\u0e49\u0e2d\u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c\r\n        'params'   => '' \/\/ \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e2a\u0e48\u0e07\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e1e\u0e32\u0e23\u0e32\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e44\u0e1b\u0e41\u0e1a\u0e1a\u0e2d\u0e32\u0e40\u0e23\u0e22\u0e4c\r\n);\r\n<\/pre>\n<p><\/br><\/p>\n<h4>Hook Points<\/h4>\n<p>\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hook class \u0e19\u0e31\u0e49\u0e19 \u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e31\u0e27\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19<br \/>\n\u0e40\u0e23\u0e32\u0e40\u0e23\u0e35\u0e22\u0e01\u0e2a\u0e34\u0e48\u0e07\u0e19\u0e31\u0e49\u0e19\u0e27\u0e48\u0e32 Hook Points \u0e43\u0e19 codeigniter framework \u0e21\u0e35 Hook Points \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e2b\u0e25\u0e31\u0e01 \u0e46 \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<ul>\n<li><strong>pre_system<\/strong> \u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e15\u0e31\u0e49\u0e07\u0e41\u0e15\u0e48\u0e41\u0e23\u0e01\u0e40\u0e23\u0e34\u0e48\u0e21\u0e02\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e23\u0e30\u0e1a\u0e1a<\/li>\n<li><strong>pre_controller<\/strong> \u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e17\u0e31\u0e19\u0e17\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e15\u0e31\u0e27\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21 (controller) \u0e43\u0e14\u0e46\u0e08\u0e30\u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01<\/li>\n<li><strong>post_controller_constructor<\/strong> \u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e17\u0e31\u0e19\u0e17\u0e35\u0e40\u0e21\u0e37\u0e48\u0e2d constructructor \u0e17\u0e33\u0e07\u0e32\u0e19<\/li>\n<li><strong>post_controller<\/strong> \u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e17\u0e31\u0e19\u0e17\u0e35\u0e40\u0e21\u0e37\u0e48\u0e2d controller \u0e17\u0e33\u0e07\u0e32\u0e19\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e2a\u0e21\u0e1a\u0e23\u0e39\u0e13\u0e4c<\/li>\n<li><strong>post_system<\/strong> \u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e2b\u0e25\u0e31\u0e07\u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07\u0e23\u0e30\u0e1a\u0e1a\u0e2b\u0e25\u0e31\u0e01\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14<\/li>\n<\/ul>\n<p>hook points \u0e2d\u0e37\u0e48\u0e19 \u0e46 \u0e17\u0e48\u0e32\u0e19\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2d\u0e48\u0e32\u0e19\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48 <a href=\"https:\/\/www.codeigniter.com\/user_guide\/general\/hooks.html\" target=\"_blank\">https:\/\/www.codeigniter.com\/user_guide\/general\/hooks.html<\/a><br \/>\n<\/br><\/p>\n<h4>\u0e2a\u0e23\u0e49\u0e32\u0e07 Controller \u0e21\u0e32\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19<\/h4>\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 \u0e2a\u0e23\u0e49\u0e32\u0e07 hook class \u0e41\u0e25\u0e30\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e02\u0e2d\u0e07 hook class \u0e41\u0e25\u0e49\u0e27<br \/>\n\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e43\u0e2b\u0e49\u0e25\u0e2d\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07 controller \u0e21\u0e32\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e14\u0e39\u0e27\u0e48\u0e32\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e23<\/p>\n<p><strong>application\/controllers\/Home.php<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"application\/controllers\/Home.php\" >\r\n<?php\r\ndefined('BASEPATH') OR exit('No direct script access allowed');\r\n\r\nclass Home extends CI_Controller {\r\n\r\n\tpublic function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t}\r\n\tpublic function index()\r\n\t{\r\n\t\t\r\n\t}\r\n}\r\n<\/pre>\n<p>\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/p>\n<pre class=\"lang:default decode:true \" >pre_system<\/pre>\n<p><\/br><\/p>\n<h4>\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07 Hook Points<\/h4>\n<p>\u0e40\u0e02\u0e35\u0e22\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e41\u0e15\u0e48\u0e25\u0e30 point \u0e43\u0e19 application\/hooks\/WebHook.php \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<br \/>\n<strong>application\/hooks\/WebHook.php<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"application\/hooks\/WebHook.php\" >\r\n<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');\r\n \r\nclass WebHook {\r\n \r\n\tpublic function __construct(){\r\n\t \r\n\t}\r\n\tpublic function pre_system(){\r\n\t \techo \"pre_system.<br>\";\r\n\t}\t\r\n\tpublic function pre_controller(){\r\n\t \techo \"pre_controller.<br>\";\r\n\t}\r\n\tpublic function post_controller_constructor(){\r\n\t \techo \"post_controller_constructor.<br>\";\r\n\t}\r\n\tpublic function post_controller(){\r\n\t \techo \"post_controller.<br>\";\r\n\t}\r\n\tpublic function post_system(){\r\n\t \techo \"post_system.<br>\";\r\n\t}\r\n}\r\n?>\r\n<\/pre>\n<p>\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e41\u0e1a\u0e1a\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14 hook points \u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c application\/config\/hooks.php \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<br \/>\n<strong>application\/config\/hooks.php<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"application\/config\/hooks.php\" >\r\n<?php\r\ndefined('BASEPATH') OR exit('No direct script access allowed');\r\n\r\n$hook['pre_system'] = array(\r\n        'class'    => 'WebHook',\r\n        'function' => 'pre_system',\r\n        'filename' => 'WebHook.php',\r\n        'filepath' => 'hooks',\r\n        'params'   => ''\r\n);\r\n$hook['pre_controller'] = array(\r\n        'class'    => 'WebHook',\r\n        'function' => 'pre_controller',\r\n        'filename' => 'WebHook.php',\r\n        'filepath' => 'hooks',\r\n        'params'   => ''\r\n);\r\n$hook['post_controller_constructor'] = array(\r\n        'class'    => 'WebHook',\r\n        'function' => 'post_controller_constructor',\r\n        'filename' => 'WebHook.php',\r\n        'filepath' => 'hooks',\r\n        'params'   => ''\r\n);\r\n$hook['post_controller'] = array(\r\n        'class'    => 'WebHook',\r\n        'function' => 'post_controller',\r\n        'filename' => 'WebHook.php',\r\n        'filepath' => 'hooks',\r\n        'params'   => ''\r\n);\r\n$hook['post_system'] = array(\r\n        'class'    => 'WebHook',\r\n        'function' => 'post_system',\r\n        'filename' => 'WebHook.php',\r\n        'filepath' => 'hooks',\r\n        'params'   => ''\r\n);\r\n\r\n<\/pre>\n<p>\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/p>\n<pre class=\"lang:default decode:true \" >\r\npre_system.\r\npre_controller.\r\npost_controller_constructor.\r\npost_controller.\r\npost_system.\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.codebee.co.th\/labs\/wp-content\/uploads\/2016\/07\/\u0e27\u0e34\u0e18\u0e35\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-hooks-\u0e43\u0e19-codeigniter.png\" alt=\"\u0e27\u0e34\u0e18\u0e35\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-hooks-\u0e43\u0e19-codeigniter\" \/><br \/>\n\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e41\u0e1a\u0e1a\u0e19\u0e35\u0e49\u0e41\u0e25\u0e49\u0e27 \u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e17\u0e23\u0e32\u0e1a\u0e27\u0e48\u0e32 hook point \u0e44\u0e2b\u0e19 \u0e17\u0e33\u0e07\u0e32\u0e19\u0e01\u0e48\u0e2d\u0e19 - \u0e2b\u0e25\u0e31\u0e07 \u0e41\u0e25\u0e30\u0e17\u0e33\u0e07\u0e32\u0e19\u0e15\u0e2d\u0e19\u0e44\u0e2b\u0e19<br \/>\n\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e17\u0e23\u0e32\u0e1a\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e41\u0e25\u0e49\u0e27\u0e01\u0e47\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e33\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e02\u0e2d\u0e07 hooks \u0e43\u0e19 codeigniter framework \u0e44\u0e1b\u0e1b\u0e23\u0e30\u0e22\u0e38\u0e01\u0e15\u0e4c\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19<br \/>\n\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e44\u0e14\u0e49\u0e14\u0e35\u0e22\u0e34\u0e48\u0e07\u0e02\u0e36\u0e49\u0e19 \u0e41\u0e25\u0e30\u0e22\u0e31\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e02\u0e2d\u0e07 codeigniter \u0e44\u0e14\u0e49\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e15\u0e47\u0e21\u0e17\u0e35\u0e48\u0e2d\u0e35\u0e01\u0e14\u0e49\u0e27\u0e22<\/p>\n","protected":false},"excerpt":{"rendered":"<p>codeigniter hooks \u0e17\u0e33\u0e04\u0e27\u0e32\u0e21\u0e40\u0e02\u0e49\u0e32\u0e43\u0e08\u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 hooks point \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a hooks \u0e43\u0e19 codeigniter \u0e40\u0e1b\u0e47\u0e19\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e21\u0e35\u0e44\u0e27\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e31\u0e1a\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e41\u0e17\u0e23\u0e01\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 \u0e1a\u0e32\u0e07\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19 \u0e42\u0e14\u0e22\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e22\u0e38\u0e48\u0e07\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e44\u0e1f\u0e25\u0e4c\u0e2b\u0e25\u0e31\u0e01 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19 \u0e2d\u0e32\u0e08\u0e21\u0e35\u0e1a\u0e32\u0e07\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07 controller \u0e43\u0e14 \u0e46 \u0e01\u0e48\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e08\u0e30\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07 constructure&#8230;<\/p>\n","protected":false},"author":1,"featured_media":508,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"video","meta":{"footnotes":""},"categories":[168,46],"tags":[356,359,5,358,933,371,614,549,501,8,7,935,357,360],"class_list":["post-1424","post","type-post","status-publish","format-video","has-post-thumbnail","hentry","category--php-codeigniter-framework","category-website-development-","tag-codeigniter-hooks-","tag-hooks-point","tag-php-codeigniter","tag--hooks-poin","tag-933","tag-371","tag-614","tag-549","tag-501","tag--ci-framework","tag--codeigniter","tag-935","tag--hooks","tag--hooks--codeigniter","post_format-post-format-video"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/comments?post=1424"}],"version-history":[{"count":20,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1424\/revisions"}],"predecessor-version":[{"id":1445,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1424\/revisions\/1445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media\/508"}],"wp:attachment":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media?parent=1424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/categories?post=1424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/tags?post=1424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}