System/Handlers/Hooks/Source/Classes/HookedClass.php
/**
     * append a method to the methods array
     * @param string|array $method
     * @throws RuntimeException
     */
append a method to the methods array
@param string|array $method
@throws RuntimeException
append a method to the methods array @param string|array $method @throws RuntimeException
public function addMethod($method){
        if(is_array($method) && !empty($method)){
            foreach($method as $hookedClassMethod){
                $this->methods[] = $hookedClassMethod;
            }
        }elseif(!is_array($method) && !empty($method)){
                $this->methods[] = $hookedClassMethod;
        }else{
            throw new RuntimeException('addMethod expect 1 argument and it should not be empty');
        }
    }
public function addMethod ( $ method ) { if ( is_array ( $ method ) && ! empty ( $ method ) ) { foreach ( $ method as $ hookedClassMethod ) { $ this -> methods [ ] = $ hookedClassMethod ; } } elseif ( ! is_array ( $ method ) && ! empty ( $ method ) ) { $ this -> methods [ ] = $ hookedClassMethod ; } else { throw new RuntimeException ( 'addMethod expect 1 argument and it should not be empty' ) ; } }
append a method to the methods array
 @param string|array $method
 @throws RuntimeException
append a method to the methods array @param string|array $method @throws RuntimeException
//checking if the method variable is array and it has indexes //loop though it //append the method to the methods array //if the method variable is not array but not empty then it should be a string or any other value //other checks might be valid such as making sure it is a string //append the method to the methods array //throw an exception if the passed argument does not match our conditions