Esempio n. 1
0
 /**
  * Add an extension method
  *
  * @param   xp.compiler.types.Types type
  * @param   xp.compiler.types.Method method
  */
 public function addExtension(Types $type, Method $method)
 {
     $this->extensions[$type->name() . $method->name] = $method;
 }
Esempio n. 2
0
 /**
  * Checks whether a given type instance is a subclass of this class.
  *
  * @param   xp.compiler.types.Types $t
  * @return  bool
  */
 public function isSubclassOf(Types $t)
 {
     try {
         return $this->class->isSubclassOf($t->name());
     } catch (\lang\ClassNotFoundException $e) {
         return false;
     }
 }