/**
	 * @static
	 * @param $target Title
	 * @param $base
	 * @param $full
	 * @param $performer
	 * @return DeleteJob
	 */
	public static function newJob( Title $target, $base, $full, /*User*/ $performer ) {
		$job = new self( $target );
		$job->setUser( FuzzyBot::getUser() );
		$job->setFull( $full );
		$job->setBase( $base );
		$msg = $job->getFull() ? 'pt-deletepage-full-logreason' : 'pt-deletepage-lang-logreason';
		$job->setSummary( wfMsgForContent( $msg, $base ) );
		$job->setPerformer( $performer );
		return $job;
	}
Example #2
0
 /**
  * Create a new Bytes instance.
  *
  * @param int $base   The base to use when converting to different units. Must be one of the `Bytes::BASE_*`
  *                    constants. Optional, defaults to `BASE_BINARY`.
  * @param int $suffix The suffix style for units. Must be one of the `Bytes::SUFFIX_*` constants. Optional,
  *                    defaults to SUFFIX_IEC (KiB, MiB, etc.)
  *
  * @return \nochso\Omni\Bytes
  */
 public static function create($base = self::BASE_BINARY, $suffix = self::SUFFIX_IEC)
 {
     $bytes = new self();
     $bytes->setBase($base)->setSuffix($suffix);
     return $bytes;
 }
Example #3
0
 /**
  * creates a math object from type subscript
  *
  * @param string|integer $base base
  * @param string|integer $sub  subscript
  *
  * @return \math\objects\string
  */
 public static function sub($base, $sub)
 {
     $o = new self("string::sub", [$base, $sub]);
     $o->setBase(true);
     return $o;
 }
Example #4
0
 /**
  * creates a dot sign
  *
  * @return \math\objects\signs
  */
 public static function cdot()
 {
     $o = new self("string::cdot", []);
     $o->setBase(true);
     return $o;
 }