public function addIndexFile($file, $type = 'cli')
    {
        $type = strtolower($type);

        if (!in_array($type, ['cli', 'web'])) {
            throw new \InvalidArgumentException(sprintf('Index file type "%s" is invalid, must be one of: cli, web', $type));
        }

        $this->index[$type] = [$file, realpath($this->path . DIRECTORY_SEPARATOR . $file)];
    }
public function addIndexFile($file, $type = 'cli')
    {
        $type = strtolower($type);

        if (!in_array($type, ['cli', 'web'])) {
            throw new \InvalidArgumentException(sprintf('Index file type "%s" is invalid, must be one of: cli, web', $type));
        }

        $this->index[$type] = [$file, realpath($this->path . DIRECTORY_SEPARATOR . $file)];
    }
public function addIndexFile ( $ file , $ type = 'cli' ) { $ type = strtolower ( $ type ) ; if ( ! in_array ( $ type , [ 'cli' , 'web' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Index file type "%s" is invalid, must be one of: cli, web' , $ type ) ) ; } $ this -> index [ $ type ] = [ $ file , realpath ( $ this -> path . DIRECTORY_SEPARATOR . $ file ) ] ; }
Adds an index file.

@param string $file The name of the file relative to the project root
@param string $type The SAPI type (Default: 'cli')
Adds an index file .