Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Perforce.php

function Perforce::writeClientSpecToFile

Parameters

resource|false $spec:

1 call to Perforce::writeClientSpecToFile()
Perforce::writeP4ClientSpec in vendor/composer/composer/src/Composer/Util/Perforce.php

File

vendor/composer/composer/src/Composer/Util/Perforce.php, line 366

Class

Perforce
@author Matt Whittom <Matt.Whittom@veteransunited.com>

Namespace

Composer\Util

Code

public function writeClientSpecToFile($spec) : void {
    fwrite($spec, 'Client: ' . $this->getClient() . PHP_EOL . PHP_EOL);
    fwrite($spec, 'Update: ' . date('Y/m/d H:i:s') . PHP_EOL . PHP_EOL);
    fwrite($spec, 'Access: ' . date('Y/m/d H:i:s') . PHP_EOL);
    fwrite($spec, 'Owner:  ' . $this->getUser() . PHP_EOL . PHP_EOL);
    fwrite($spec, 'Description:' . PHP_EOL);
    fwrite($spec, '  Created by ' . $this->getUser() . ' from composer.' . PHP_EOL . PHP_EOL);
    fwrite($spec, 'Root: ' . $this->getPath() . PHP_EOL . PHP_EOL);
    fwrite($spec, 'Options:  noallwrite noclobber nocompress unlocked modtime rmdir' . PHP_EOL . PHP_EOL);
    fwrite($spec, 'SubmitOptions:  revertunchanged' . PHP_EOL . PHP_EOL);
    fwrite($spec, 'LineEnd:  local' . PHP_EOL . PHP_EOL);
    if ($this->isStream()) {
        fwrite($spec, 'Stream:' . PHP_EOL);
        fwrite($spec, '  ' . $this->getStreamWithoutLabel($this->p4Stream) . PHP_EOL);
    }
    else {
        fwrite($spec, 'View:  ' . $this->getStream() . '/...  //' . $this->getClient() . '/... ' . PHP_EOL);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal