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

Поділитися
Вставка
  • Опубліковано 18 вер 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

  • @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.

  • @judeleon8485
    @judeleon8485 Рік тому +1

    Excellent tutorial with good explanation

  • @user-vt2ys4cc7f
    @user-vt2ys4cc7f Рік тому

    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

  • @shwanyoussif3588
    @shwanyoussif3588 2 роки тому +1

    thank you bro, very helpfull

  • @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

  • @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?

  • @sumit1vadher
    @sumit1vadher 3 роки тому

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

  • @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.

  • @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.

  • @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?

  • @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.

  • @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.

  • @szymusu
    @szymusu 4 роки тому +2

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

  • @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

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому

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

  • @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

  • @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.

  • @rahilarious
    @rahilarious 4 роки тому +1

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