public function executable($executable, $subpath = null)
    {
        if (!$executable instanceof Closure && !$executable instanceof Executable) {
            throw new App\Exception("Object is not a closure or instance of Coast\App\Executable");
        }
        if (isset($subpath)) {
            $executable = new App\Subpath($executable, $subpath);
        } else if ($executable instanceof App || $executable instanceof Lazy) {
            $executable->isSubapp(true);
        }
        array_push($this->_executables, $executable instanceof Closure
            ? $executable->bindTo($this)
            : $executable);
        return $this;
    }
public function executable($executable, $subpath = null)
    {
        if (!$executable instanceof Closure && !$executable instanceof Executable) {
            throw new App\Exception("Object is not a closure or instance of Coast\App\Executable");
        }
        if (isset($subpath)) {
            $executable = new App\Subpath($executable, $subpath);
        } else if ($executable instanceof App || $executable instanceof Lazy) {
            $executable->isSubapp(true);
        }
        array_push($this->_executables, $executable instanceof Closure
            ? $executable->bindTo($this)
            : $executable);
        return $this;
    }
public function executable ( $ executable , $ subpath = null ) { if ( ! $ executable instanceof Closure && ! $ executable instanceof Executable ) { throw new App \ Exception ( "Object is not a closure or instance of Coast\App\Executable" ) ; } if ( isset ( $ subpath ) ) { $ executable = new App \ Subpath ( $ executable , $ subpath ) ; } else if ( $ executable instanceof App || $ executable instanceof Lazy ) { $ executable -> isSubapp ( true ) ; } array_push ( $ this -> _executables , $ executable instanceof Closure ? $ executable -> bindTo ( $ this ) : $ executable ) ; return $ this ; }
Add executable to the stack.
@param string $name
@param Closure|Coast\App\Executable $value
@return self
Add executable to the stack .