Esempio n. 1
0
File: get.php Progetto: Borvik/Munla
 /**
  * Returns the proper callable method for the form handler callback method given.
  * 
  * Allows users to specify callbacks using the common name without having to remember to add "FormHandler" to each class name.
  * 
  * @param callable $callback The callback method to get the true method for.
  * 
  * @return callable Returns the REAL callable method to be used for the form handler.
  */
 public static function cache_form_callback($callback)
 {
     if (!is_string($callback) && (!is_array($callback) || !array_key_exists(0, $callback))) {
         return null;
     }
     if (!is_string($callback) && !is_array($callback) || is_string($callback) && strpos($callback, '::') === false || is_array($callback) && !is_string($callback[0])) {
         return null;
     }
     return get::static_callable($callback, 'FormHandler');
 }