v1.0.0
English

Publisher.php

system/Publisher/Publisher.php
1 class 22 methods

class Publisher

Publishers read in file paths from a variety of sources and copy the files out to different destinations. This class acts both as a base for individual publication directives as well as the mode of discovery for said instances. In this class a "file" is a full path to a verified file while a "path" is relative to its source or destination and may indicate either a file or directory of unconfirmed existence. Class failures throw the PublisherException, but some underlying methods may percolate different exceptions, like FileException, FileNotFoundException or InvalidArgumentException. Write operations will catch all errors in the file-specific $errors property to minimize impact of partial batch operations.
discover (string $directory = 'Publishers', string $namespace = '') public
wipeDirectory (string $directory) private
__construct (?string $source = null, ?string $destination = null) public
__destruct () public
publish () public
getSource () public
getDestination () public
getScratch () public
getErrors () public
getPublished () public
addPaths (array $paths, bool $recursive = true) public
addPath (string $path, bool $recursive = true) public
addUris (array $uris) public
addUri (string $uri) public
wipe () public
copy (bool $replace = true) public
merge (bool $replace = true) public
replace (string $file, array $replaces) public
addLineAfter (string $file, string $line, string $after) public
addLineBefore (string $file, string $line, string $before) public
verifyAllowed (string $from, string $to) private
safeCopyFile (string $from, string $to, bool $replace) private
phpDG v1.0.0 Publisher.php 662 files 498 classes 763 fn
Generated