Guest User

Untitled

a guest
Dec 20th, 2019
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. //...внутри какого-то класса скраппера
  4. public function getChapters(BookInterface $book) {
  5.     if (!$book instanceof LazyBookInterface) {
  6.         /** @var LazyBookInterface $book */
  7.         $book = $this->findByName($book->getName());
  8.     }
  9.     $book->lazyBookInterfaceMethod();
  10. }
RAW Paste Data