Upgrade to Pro — share decks privately, control downloads, hide ads and more …

クラスの抽象化とオブジェクト インターフェース

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

クラスの抽象化とオブジェクト インターフェース

またその違い

Avatar for reniasz

reniasz

July 24, 2017

Other Decks in Programming

Transcript

  1. ͍ͭந৅Խʁ͍ͭΠϯλʔϑΣʔεʁ <?php class X extends Y { } // X

    ͸ɹΫϥεͷ෦෼ͷYΛ׬੒ͤ͞Δ class X implements Y { } // X ͸ɹY ݴޠͰ࿩͢͜ͱʹࢍ੒͢Δ ?> ݁࿦ɺந৅Ϋϥεͬͯʁ ܧঝؔ܎Λ΋࣮ͭ૷ͷ࠶ར༻ΛͰ͖Δɻ ܧঝͱଟଶੑΛཁٻ͢Δҙຯ͍͕͋ڧ͍ɻ ݁࿦ɺΠϯλϑΣʔεͬͯʁ Ϋϥεͷܕ(࢓༷)Λఆٛ͢Δ΋ͷɻ ΧϓηϧԽͱଟଶੑΛཁٻ͢Δҙຯ͍͕͋ڧ͍ɻ
  2. ࢀߟURL http://www.xpertdeveloper.com/2014/07/abstract-vs-interface/ https://codeinphp.github.io/post/abstract-class-vs-interface/ http://www.techflirt.com/tutorials/oop-in-php/abstract-classes-interface.html https://paulund.co.uk/using-interface-and-abstract-classes-in-php http://php.net/manual/en/language.oop5.abstract.php https://stackoverflow.com/questions/6373224/what-are-the-advantage-if-i-use- abstract-class-in-php http://www.xpertdeveloper.com/2011/10/abstract-in-php/ http://www.xpertdeveloper.com/2011/10/interface-in-php/

    http://jaskokoyn.com/2013/06/11/interfaces/ http://phpenthusiast.com/object-oriented-php-tutorials/inheritance-in-object-oriented- php http://phpenthusiast.com/object-oriented-php-tutorials/interfaces http://phpenthusiast.com/object-oriented-php-tutorials/abstract-classes-and-methods https://stackoverflow.com/questions/1913098/what-is-the-difference-between-an- interface-and-abstract-class https://www.javatpoint.com/difference-between-abstract-class-and-interface http://qiita.com/chkkchy/items/643eed88f59bd2b44d71