Interface in PHP for beginners with Examples - OOP in PHP | Part 8

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • The following video explains what is an interface, how to create and implement it in PHP.
    We will create a simple interface and implement it.
    We will see an interface inheritance.
    We will see how to implement multiple interfaces.
    We will see constants in an interface.
    We will create an abstract class which implements an interface.
    In the second part of the video, we will see several real examples of why interfaces are necessary and useful.
    Introduction to OOP in PHP - • Introduction to OOP in...
    Creating classes in PHP - • Creating classes, prop...
    Inheritance in PHP - • Inheritance for beginn...
    Abstract classes in PHP - • Abstract classes, abst...
    Follow me on social media:
    / thecodeholic
    / thecodeholic
    github.com/the...

Комментарии • 31

  • @mrmonkhere
    @mrmonkhere Год назад

    these videos of this playlists are taking hell lot of time. may be coz each and every word that you say, feels so valuable to me and I don't go further until I get it. plus am making notes also. I don't know how to speed myself up rn, but trust me these videos did add tons of value for me. Thnks a lot

  • @randomCheese
    @randomCheese 2 года назад +2

    Wow, extremely helpful course (which is free!) on OOP. Fantastic explanations and examples. Thank you so much! Currently working through the GitHub roadmap and it is great.

  • @shwanyoussif3588
    @shwanyoussif3588 2 года назад +1

    thank you bro, very helpfull

  • @sumit1vadher
    @sumit1vadher 3 года назад

    This playlist is very useful 👌 Regarding 10:45 is this an example of composition as well ?

  • @judeleon8485
    @judeleon8485 Год назад +1

    Excellent tutorial with good explanation

  • @dev_99999
    @dev_99999 Год назад

    Thanks so much, this video take some hours to implement it it's very useful, please make solid principles course like this playlist

  • @SPOKOZE2
    @SPOKOZE2 3 года назад

    example four... I don't know why is it work for you, there are nor penguin nor duck on the table behind you :D

  • @sreejishnair5922
    @sreejishnair5922 3 года назад

    Can we create instances of interface? if no then how did we pass the name of the interface and the object inside the constructor of the application class?

  • @szymusu
    @szymusu 4 года назад +2

    15:27 that "files" sounds like rapper on autotune.

  • @VihaanMathur1019VM2
    @VihaanMathur1019VM2 3 года назад

    Pretty Clear. You have awesome clarity in your explanation. But one thing i would like to know: why u r saying "PHP.net" ????

    • @TheCodeholic
      @TheCodeholic  3 года назад +1

      Maybe because that's official docs website of php.

  • @TheEndOfMadness
    @TheEndOfMadness 5 лет назад +2

    Very clear. Thanks. In case you need a job, call me.

    • @TheCodeholic
      @TheCodeholic  5 лет назад +1

      Thank you man.
      I would like to know more about your offer.

  • @SherzodUsmonov
    @SherzodUsmonov Год назад

    Perfect brother

    • @TheCodeholic
      @TheCodeholic  Год назад +1

      Thanks ✌️

    • @SherzodUsmonov
      @SherzodUsmonov Год назад

      @@TheCodeholic I like your video. Do you have any courses or do you teach anybody?

  • @shaikhanuman8012
    @shaikhanuman8012 4 года назад

    brother can you explain clear cut explanation on interfaces i understand all the previous lesssons except this. please give me another example

    • @TheCodeholic
      @TheCodeholic  4 года назад +1

      tutorials.supunkavinda.blog/php/oop-interfaces

  • @pepeback
    @pepeback 5 лет назад +2

    Poor explanation for beginners. You pass the interface to Application.php and explain nothing about the purpose. See 10:40 Basically you explain the How but not the Why in the example.

    • @TheCodeholic
      @TheCodeholic  5 лет назад +1

      It seems to me that you have not watched the video fully.
      I explain how to create interfaces and also why it is useful and show examples. That is what beginners need in my opinion.

    • @pepeback
      @pepeback 5 лет назад +2

      @@TheCodeholic Your videos are good. You explained the theory quite well. But you need to explain better your examples. What is the purpose of passing an Interface to Application.php at 10:40 ? If you show the purpose in the example, people will be able to apply it to the real world. Thanks.

  • @kalcas33
    @kalcas33 4 года назад +1

    Hi Zura! I have learned a lot from your videos but can you please also upload files that you work with. It would be great to review the mechanism in my VS - please attach a link :) Thanks! keep going you do a great job.

    • @TheCodeholic
      @TheCodeholic  4 года назад +1

      Thank you for your feedback and kind words.
      You are right. I should have link in the description. When I record this video I was new on youtube and did not do it for some reason.
      But I attach link in my latest videos.

  • @rahilarious
    @rahilarious 4 года назад +1

    This was bit hard to understand. Had to rewind for few times ...

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 года назад

    That briefcase at the right corner! Typically academic people possess such briefcases, students and professors. So which one are you?!

  • @RagTheNutsOff
    @RagTheNutsOff 5 лет назад

    Howdy, so interfaces are basically "templates". They define what should be in any implementation of them and can be expanded too. Is that right? Matt

    • @TheCodeholic
      @TheCodeholic  5 лет назад +1

      That's absolutelly right.
      In interfaces you define the behavior, actions, what should be done, but implemented classes decide how should be done.

    • @piotrd.2653
      @piotrd.2653 5 лет назад +2

      An Abstract class can be also a template, but in the abstract class, we can put some logic in the body. In the Interface, we cannot do this.