models/Context.php
public function addFile($fileName)
    {
        $this->files[$fileName] = sha1_file($fileName);

        $reflection = new FileReflector($fileName, true);
        $reflection->process();

        foreach ($reflection->getClasses() as $class) {
            $class = new ClassDoc($class, $this, ['sourceFile' => $fileName]);
            $this->classes[$class->name] = $class;
        }
        foreach ($reflection->getInterfaces() as $interface) {
            $interface = new InterfaceDoc($interface, $this, ['sourceFile' => $fileName]);
            $this->interfaces[$interface->name] = $interface;
        }
        foreach ($reflection->getTraits() as $trait) {
            $trait = new TraitDoc($trait, $this, ['sourceFile' => $fileName]);
            $this->traits[$trait->name] = $trait;
        }
    }
public function addFile($fileName)
    {
        $this->files[$fileName] = sha1_file($fileName);

        $reflection = new FileReflector($fileName, true);
        $reflection->process();

        foreach ($reflection->getClasses() as $class) {
            $class = new ClassDoc($class, $this, ['sourceFile' => $fileName]);
            $this->classes[$class->name] = $class;
        }
        foreach ($reflection->getInterfaces() as $interface) {
            $interface = new InterfaceDoc($interface, $this, ['sourceFile' => $fileName]);
            $this->interfaces[$interface->name] = $interface;
        }
        foreach ($reflection->getTraits() as $trait) {
            $trait = new TraitDoc($trait, $this, ['sourceFile' => $fileName]);
            $this->traits[$trait->name] = $trait;
        }
    }
public function addFile ( $ fileName ) { $ this -> files [ $ fileName ] = sha1_file ( $ fileName ) ; $ reflection = new FileReflector ( $ fileName , true ) ; $ reflection -> process ( ) ; foreach ( $ reflection -> getClasses ( ) as $ class ) { $ class = new ClassDoc ( $ class , $ this , [ 'sourceFile' => $ fileName ] ) ; $ this -> classes [ $ class -> name ] = $ class ; } foreach ( $ reflection -> getInterfaces ( ) as $ interface ) { $ interface = new InterfaceDoc ( $ interface , $ this , [ 'sourceFile' => $ fileName ] ) ; $ this -> interfaces [ $ interface -> name ] = $ interface ; } foreach ( $ reflection -> getTraits ( ) as $ trait ) { $ trait = new TraitDoc ( $ trait , $ this , [ 'sourceFile' => $ fileName ] ) ; $ this -> traits [ $ trait -> name ] = $ trait ; } }
Adds file to context
@param string $fileName
Adds file to context