public function fn($id, $callable = null, $needsContainer = false)
    {
        if ($callable === null) {
            $callable = $id;
        }
        if (!is_callable($callable)) {
            throw new \InvalidArgumentException("Not callable");
        }
        $this->set($id, array($callable, $needsContainer));
    }
public function fn($id, $callable = null, $needsContainer = false)
    {
        if ($callable === null) {
            $callable = $id;
        }
        if (!is_callable($callable)) {
            throw new \InvalidArgumentException("Not callable");
        }
        $this->set($id, array($callable, $needsContainer));
    }
public function fn ( $ id , $ callable = null , $ needsContainer = false ) { if ( $ callable === null ) { $ callable = $ id ; } if ( ! is_callable ( $ callable ) ) { throw new \ InvalidArgumentException ( "Not callable" ) ; } $ this -> set ( $ id , array ( $ callable , $ needsContainer ) ) ; }
Set a function at the specified path.

@param array|string $id
@param callable $callable
@param bool $needsContainer
@return void

@throws \InvalidArgumentException
Set a function at the specified path .