Subversion Repositories oidplus

Rev

Rev 1131 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1131 Rev 1186
Line 30... Line 30...
30
         * Interfaces which have the prefix INTF_OID_, following by an OID (underscore instead of dots)
30
         * Interfaces which have the prefix INTF_OID_, following by an OID (underscore instead of dots)
31
         * are specially handled by OIDplus. If they do not exist (e.g. because their plugin is not installed),
31
         * are specially handled by OIDplus. If they do not exist (e.g. because their plugin is not installed),
32
         * then they are replaced with an empty interface by the OIDplus autoloader.
32
         * then they are replaced with an empty interface by the OIDplus autoloader.
33
         * @param string $oid
33
         * @param string $oid
34
         * @return bool
34
         * @return bool
35
         * @deprecated use "$x instanceof INTF_OID_..." instead, to allow type checking
35
         * @deprecated use "$x instanceof INTF_OID_..." instead (this allows type checking)
36
         */
36
         */
37
        public final function implementsFeature(string $oid): bool {
37
        public final function implementsFeature(string $oid): bool {
38
                $interface_name = "INTF_OID_".str_replace('.', '_', $oid);
38
                $interface_name = "INTF_OID_".str_replace('.', '_', $oid);
39
                return in_array($interface_name, class_implements($this));
39
                return in_array($interface_name, class_implements($this));
40
        }
40
        }