| by bindevmin | No comments

Undestanding PHP Namespaces

I have hard time understanding PHP namespace. So, this post is things I learn from working with it. Namespace keyword starts the file. When you include the class that has namespace defined, you also need to type the keyword use and the namespace you want to use follows. Without using namespace, this would work. However, […]

Read More
| by bindevmin | No comments

Builder Pattern In Java

Keys to remember Outer class has a public static Builder class Outer class has a private constructor that takes an instance of the builder The Builder has method to set value to the properties The Builder class has a build() method that call the outer class’ constructor (that takes one Builder instance) Inside the outer’s […]

Read More
| by bindevmin | No comments

[Ultimate] Guide to PHP Autoload

Calling spl_autoload_register without argument spl_autoload_register() without arguments will invoke (call) another function called spl_autoload when php script tries to access an unknown class. The name of the unknown class will be passed to spl_autoload. spl_autoload first then find if there is a file name identical to the class name (lower and upper case, php 7) […]

Read More
| by bindevmin | No comments

Understanding Traits In PHP

Trait is something a class has. A trait doesn’t define a type of a class. For example, Teacher is a type. Talk a lot is a trait. A teacher can either talk a lot or not. The code above will output “I talk a lot” One class can implement multiple traits. However, those traits must […]

Read More
| by bindevmin | No comments

How Does add_filter Work In WordPress

Filters are the source of confusion when I first started my WP development. I only gained a better understanding of this topic until recently. Thus, I want to share with you my finding. As you may already know (I hope), WordPress users can modify parts of WordPress website with filter. You use the add_filter function […]

Read More
| by bindevmin | No comments

How Are WordPress Post/Page’s Title Got Rendered

This post is another effort of mine in understanding the core of WordPress. Hopefully at the end of this post, you’ll gain something about. My goal is to have better understanding of the way WP render particular parts of the website by using the filters. Dive into the header.php file of WP theme I’m using […]

Read More
| by bindevmin | No comments

Adding new tab to WooCommerce Product Data Panel

Adding new tab to WooCommerce Product Data panel is simple. First, you need to add the tab item. The name of the hook is: So, the add_action would be: And the function wc_custom_tab_head is responsible for outputting the tab’s head HTML Here is an implementation of wc_custom_tab_head Adding content to the tab We have successfully […]

Read More
| by bindevmin | No comments

The Ultimate Guide/Troubleshooting To Install OsTicket On Nginx

OsTicket is an awesome ticketing system. It’s better than Hesk in my opinion. However, the sad thing about this ticketing software is it doesn’t support nginx server officially. However, if you are running Nginx, you can make it work. Nginx configuration for OsTicket How to fix file upload undefined 400 in OSTicket Kudos to this […]

Read More
| by bindevmin | No comments

React Notes

List and keys Don’t use index as key Key must be unique Passing key to the child of the list, not in the render function Form Textarea uses value attribute Select doesn’t use selected attribute but specify the selected value in the value attribute of select opening tag If passing value in as an array […]

Read More