protected function detectType()
    {
        if (property_exists($this, 'allow')) {
            return $this->allow;
        }

        $interfaces = (new ReflectionClass($this))->getInterfaceNames();

        if ($interfaces) {
            return $interfaces[0];
        }

        return get_class($this);
    }
protected function detectType()
    {
        if (property_exists($this, 'allow')) {
            return $this->allow;
        }

        $interfaces = (new ReflectionClass($this))->getInterfaceNames();

        if ($interfaces) {
            return $interfaces[0];
        }

        return get_class($this);
    }
protected function detectType ( ) { if ( property_exists ( $ this , 'allow' ) ) { return $ this -> allow ; } $ interfaces = ( new ReflectionClass ( $ this ) ) -> getInterfaceNames ( ) ; if ( $ interfaces ) { return $ interfaces [ 0 ] ; } return get_class ( $ this ) ; }
Try to guess the type of its candidates. First look for
an property "allow". If this is not set search the interfaces,
finally just return the class of this object.

@return string
Try to guess the type of its candidates . First look for an property allow . If this is not set search the interfaces finally just return the class of this object .