protected function createSymbolicLink()
    {
        $this->displayMsgInCli(' > Create symbolic link ... ');

        $alreadyCreated = file_exists($this->targetSrcPath);

        //If symlink already exist and it's a reinstall mode
        if ($alreadyCreated && $this->forceReinstall === true) {
            $this->displayMsgInCli('[Force Reinstall: Remove symlink] ');
            $alreadyCreated = false;

            //Error with remove symlink
            if (!unlink($this->targetSrcPath)) {
                $this->displayMsgNLInCli('Symbolic link remove fail.', 'red', 'bold');
                
                throw new Exception(
                    'Reinstall fail. Symlink remove error',
                    $this::ERR_REINSTALL_FAIL_UNLINK
                );
            }
        }

        //If module already exist in "modules" directory
        if ($alreadyCreated) {
            $this->displayMsgNLInCli(
                'Not created. Module already exist in \'modules\' directory.',
                'yellow',
                'bold'
            );
            return;
        }

        //If the creation of the symbolic link has failed.
        if (!symlink($this->sourceSrcPath, $this->targetSrcPath)) {
            $this->displayMsgNLInCli('Symbolic link creation fail.', 'red', 'bold');
            
            throw new Exception(
                'Symbolic link creation fail.',
                $this::ERR_INSTALL_FAIL_SYMLINK
            );
        }

        $this->displayMsgNLInCli('Done', 'green', 'bold');
    }
protected function createSymbolicLink()
    {
        $this->displayMsgInCli(' > Create symbolic link ... ');

        $alreadyCreated = file_exists($this->targetSrcPath);

        //If symlink already exist and it's a reinstall mode
        if ($alreadyCreated && $this->forceReinstall === true) {
            $this->displayMsgInCli('[Force Reinstall: Remove symlink] ');
            $alreadyCreated = false;

            //Error with remove symlink
            if (!unlink($this->targetSrcPath)) {
                $this->displayMsgNLInCli('Symbolic link remove fail.', 'red', 'bold');
                
                throw new Exception(
                    'Reinstall fail. Symlink remove error',
                    $this::ERR_REINSTALL_FAIL_UNLINK
                );
            }
        }

        //If module already exist in "modules" directory
        if ($alreadyCreated) {
            $this->displayMsgNLInCli(
                'Not created. Module already exist in \'modules\' directory.',
                'yellow',
                'bold'
            );
            return;
        }

        //If the creation of the symbolic link has failed.
        if (!symlink($this->sourceSrcPath, $this->targetSrcPath)) {
            $this->displayMsgNLInCli('Symbolic link creation fail.', 'red', 'bold');
            
            throw new Exception(
                'Symbolic link creation fail.',
                $this::ERR_INSTALL_FAIL_SYMLINK
            );
        }

        $this->displayMsgNLInCli('Done', 'green', 'bold');
    }
protected function createSymbolicLink ( ) { $ this -> displayMsgInCli ( ' > Create symbolic link ... ' ) ; $ alreadyCreated = file_exists ( $ this -> targetSrcPath ) ; //If symlink already exist and it's a reinstall mode if ( $ alreadyCreated && $ this -> forceReinstall === true ) { $ this -> displayMsgInCli ( '[Force Reinstall: Remove symlink] ' ) ; $ alreadyCreated = false ; //Error with remove symlink if ( ! unlink ( $ this -> targetSrcPath ) ) { $ this -> displayMsgNLInCli ( 'Symbolic link remove fail.' , 'red' , 'bold' ) ; throw new Exception ( 'Reinstall fail. Symlink remove error' , $ this :: ERR_REINSTALL_FAIL_UNLINK ) ; } } //If module already exist in "modules" directory if ( $ alreadyCreated ) { $ this -> displayMsgNLInCli ( 'Not created. Module already exist in \'modules\' directory.' , 'yellow' , 'bold' ) ; return ; } //If the creation of the symbolic link has failed. if ( ! symlink ( $ this -> sourceSrcPath , $ this -> targetSrcPath ) ) { $ this -> displayMsgNLInCli ( 'Symbolic link creation fail.' , 'red' , 'bold' ) ; throw new Exception ( 'Symbolic link creation fail.' , $ this :: ERR_INSTALL_FAIL_SYMLINK ) ; } $ this -> displayMsgNLInCli ( 'Done' , 'green' , 'bold' ) ; }
Create symlink into project module directory

@return void

@throws \Exception : If remove symlink fail with the reinstall option
Create symlink into project module directory