is_subclass_of() public method

public is_subclass_of ( $class1, $class2 )
 /**
  * Allows you to change which class SimplePie uses item sources.
  * Useful when you are overloading or extending SimplePie's default classes.
  *
  * @access public
  * @param string $class Name of custom class.
  * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation
  * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation
  */
 function set_source_class($class = 'SimplePie_Source')
 {
     if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Source')) {
         $this->source_class = $class;
         return true;
     }
     return false;
 }
Beispiel #2
0
 /**
  * Allows you to change which class SimplePie uses for <media:restriction>
  * Useful when you are overloading or extending SimplePie's default classes.
  *
  * @access public
  * @param string $class Name of custom class.
  * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation
  * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation
  */
 function set_restriction_class($class = 'SimplePie_Restriction')
 {
     if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Restriction')) {
         $this->restriction_class = $class;
         return true;
     }
     return false;
 }