CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript, Python code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Thu Mar 28, 2024 4:35 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: PHP Traits
PostPosted: Mon Dec 15, 2014 10:22 pm 
Offline

Joined: Sun Dec 14, 2014 8:48 pm
Posts: 2
Hi,
any chance of adding PHP Traits in the Class View?
You already have Classes and Interfaces, so adding Traits doesn't seem to be that hard to implement.

Thanks


Top
 Profile  
 
 Post subject: Re: PHP Traits
PostPosted: Tue Dec 16, 2014 1:45 pm 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3931
Hi, robydago.

Thanks. Sure.
We will add it soon.

Regards,
Codelobster Team.


Top
 Profile  
 
 Post subject: Re: PHP Traits
PostPosted: Sat Mar 07, 2015 5:39 am 
Offline

Joined: Thu Mar 05, 2015 9:09 am
Posts: 7
Traits,do not extend or inherit anything (except other traits) so they can be used anywhere. If you have a set of functions you want available in multiple classes, instead of bloating your abstract class, you could just have each use the trait.


Top
 Profile  
 
 Post subject: Re: PHP Traits
PostPosted: Fri Apr 03, 2015 12:34 pm 
Offline

Joined: Fri Apr 03, 2015 12:14 pm
Posts: 1
Location: kerala
Hi Friends!

I'm new here i fully read your forum discussion informations, so i'm also like to share some information about this topic:

Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. The semantics of the combination of Traits and classes is defined in a way which reduces complexity, and avoids the typical problems associated with multiple inheritance and Mixins.

A Trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way. It is not possible to instantiate a Trait on its own. It is an addition to traditional inheritance and enables horizontal composition of behavior; that is, the application of class members without requiring inheritance. :)

_________________
AngularJs support


Top
 Profile  
 
 Post subject: Re: PHP Traits
PostPosted: Sun Dec 11, 2016 1:09 pm 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3931
Hi.

Please, try new version 5.11

Regards,
Codelobster Team.


Top
 Profile  
 
 Post subject: Re: PHP Traits
PostPosted: Tue Mar 07, 2017 2:07 am 
Offline

Joined: Thu Aug 04, 2016 10:06 am
Posts: 46
multiple inheritance and Mixins.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2016 phpBB Group