public function registerClass($className)
    {
        if (isset($this->alreadyRegistered[$className])) {
            return;
        }
        $this->includeApiFile($className);
        $this->checkClassIsSingleton($className);

        $rClass = new ReflectionClass($className);
        if (!$this->shouldHideAPIMethod($rClass->getDocComment())) {
            foreach ($rClass->getMethods() as $method) {
                $this->loadMethodMetadata($className, $method);
            }

            $this->setDocumentation($rClass, $className);
            $this->alreadyRegistered[$className] = true;
        }
    }
public function registerClass($className)
    {
        if (isset($this->alreadyRegistered[$className])) {
            return;
        }
        $this->includeApiFile($className);
        $this->checkClassIsSingleton($className);

        $rClass = new ReflectionClass($className);
        if (!$this->shouldHideAPIMethod($rClass->getDocComment())) {
            foreach ($rClass->getMethods() as $method) {
                $this->loadMethodMetadata($className, $method);
            }

            $this->setDocumentation($rClass, $className);
            $this->alreadyRegistered[$className] = true;
        }
    }
public function registerClass ( $ className ) { if ( isset ( $ this -> alreadyRegistered [ $ className ] ) ) { return ; } $ this -> includeApiFile ( $ className ) ; $ this -> checkClassIsSingleton ( $ className ) ; $ rClass = new ReflectionClass ( $ className ) ; if ( ! $ this -> shouldHideAPIMethod ( $ rClass -> getDocComment ( ) ) ) { foreach ( $ rClass -> getMethods ( ) as $ method ) { $ this -> loadMethodMetadata ( $ className , $ method ) ; } $ this -> setDocumentation ( $ rClass , $ className ) ; $ this -> alreadyRegistered [ $ className ] = true ; } }
Registers the API information of a given module.

The module to be registered must be
- a singleton (providing a getInstance() method)
- the API file must be located in plugins/ModuleName/API.php
for example plugins/Referrers/API.php

The method will introspect the methods, their parameters, etc.

@param string $className ModuleName eg. "API"
Registers the API information of a given module .