protected function write($string) {
		// Lazy file open
		if(!isset($this->fp)) {
			if ($this->openFile() === false) {
				return; // Do not write if file open failed.
			}
		}
		
		if ($this->locking) {
			$this->writeWithLocking($string);
		} else {
			$this->writeWithoutLocking($string);
		}
	}
protected function write($string) {
		// Lazy file open
		if(!isset($this->fp)) {
			if ($this->openFile() === false) {
				return; // Do not write if file open failed.
			}
		}
		
		if ($this->locking) {
			$this->writeWithLocking($string);
		} else {
			$this->writeWithoutLocking($string);
		}
	}
protected function write ( $ string ) { // Lazy file open
 if ( ! isset ( $ this -> fp ) ) { if ( $ this -> openFile ( ) === false ) { return ; // Do not write if file open failed.
 } } if ( $ this -> locking ) { $ this -> writeWithLocking ( $ string ) ; } else { $ this -> writeWithoutLocking ( $ string ) ; } }
Writes a string to the target file. Opens file if not already open.
@param string $string Data to write.
Writes a string to the target file . Opens file if not already open .