public function delete($reason = null)
	{
		$data = array(
			'title' => $this->title,
			'token' => $this->edittoken,
		);

		// Set options from arguments
		if (!is_null($reason)) {
			$data['reason'] = $reason;
		}

		$r = $this->wikimate->delete($data); // The delete query

		// Check if it worked
		if (isset($r['delete'])) {
			$this->exists = false; // The page was deleted

			$this->error = null; // Reset the error status
			return true;
		}

		$this->error = $r['error']; // Return error response
		return false;
	}
public function delete($reason = null)
	{
		$data = array(
			'title' => $this->title,
			'token' => $this->edittoken,
		);

		// Set options from arguments
		if (!is_null($reason)) {
			$data['reason'] = $reason;
		}

		$r = $this->wikimate->delete($data); // The delete query

		// Check if it worked
		if (isset($r['delete'])) {
			$this->exists = false; // The page was deleted

			$this->error = null; // Reset the error status
			return true;
		}

		$this->error = $r['error']; // Return error response
		return false;
	}
public function delete ( $ reason = null ) { $ data = array ( 'title' => $ this -> title , 'token' => $ this -> edittoken , ) ; // Set options from arguments if ( ! is_null ( $ reason ) ) { $ data [ 'reason' ] = $ reason ; } $ r = $ this -> wikimate -> delete ( $ data ) ; // The delete query // Check if it worked if ( isset ( $ r [ 'delete' ] ) ) { $ this -> exists = false ; // The page was deleted $ this -> error = null ; // Reset the error status return true ; } $ this -> error = $ r [ 'error' ] ; // Return error response return false ; }
Delete the page.

@param   string   $reason  Reason for the deletion
@return  boolean           True if page was deleted successfully
Delete the page .