Search
 
SCRIPT & CODE EXAMPLE
 

PHP

trait class has consttoctor

trait HasPluginInfoTrait{
    public function __construct() { 

        $this->plugin_name        = PLUGIN_NAME;
        $this->version            = PLUGIN_VERSION;

        if ( method_exists( $this, 'init' ){
            $this->init();
        }
    }
}

class SampleClass {
    use HasPluginInfoTrait;

    private function init(){
        // Code specific to SampleClass
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: get vendor store url dokan 
Php :: ubuntu add phpstorm to launcher 
Php :: mysql_query not working in php 7 
Php :: wordpress session variables 
Php :: can we acces session variable in two files 
Php :: how can i check that a json file already has something inside 
Php :: user ,role ,permission customize laravel application 
Php :: laravel windows stop serving 
Php :: open two files at once in phpstrom 
Php :: export data to excel in codeigniter using phpexcel 
Php :: filter data in wordpress 
Php :: php division without round 
Php :: eager loading in hasmany belongsto relationship 
Php :: Comment rediriger la page “Panier” et sauter la page Commande 
Php :: try/catch -- much needed 
Php :: Sorting Products by Custom Meta Fields 
Php :: list bulan php 
Php :: php function to show nav menu with example 
Php :: one to one relationship laravel 
Php :: array inserted in laravel 
Php :: multiple checked delete in laravel8 
Php :: crypt (PHP 4, PHP 5, PHP 7, PHP 8) crypt — One-way string hashing 
Php :: best web server for php 
Php :: ascii vrednosti php 
Php :: This behaviour is (currently) not supported by Doctrine 2 
Php :: wp php blog info background image 
Php :: php calculate variance 
Php :: Laravel display the date the participation was created 
Php :: how to delete single row from grid in magento 
Php :: calculate average in eager loading laravel 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =