function attachToEvent(iEvent $event)
    {
        if ( \Poirot\isCommandLine() )
            // Restriction IP Only Work With Http Sapi
            return $this;


        $self = $this;
        $event->on(EventHeapOfSapi::EVENT_APP_MATCH_REQUEST, function() use ($self) {
            $self->_assertAccess();
        });

        return $this;
    }
function attachToEvent(iEvent $event)
    {
        if ( \Poirot\isCommandLine() )
            // Restriction IP Only Work With Http Sapi
            return $this;


        $self = $this;
        $event->on(EventHeapOfSapi::EVENT_APP_MATCH_REQUEST, function() use ($self) {
            $self->_assertAccess();
        });

        return $this;
    }
function attachToEvent ( iEvent $ event ) { if ( \ Poirot \ isCommandLine ( ) ) // Restriction IP Only Work With Http Sapi return $ this ; $ self = $ this ; $ event -> on ( EventHeapOfSapi :: EVENT_APP_MATCH_REQUEST , function ( ) use ( $ self ) { $ self -> _assertAccess ( ) ; } ) ; return $ this ; }
Attach To Event

note: not throw any exception if event type is unknown!

@param iEvent|EventHeapOfSapi $event

@return $this
Attach To Event