public static function build(array $data) { $obj = new static($data); if (!$obj->logger()) { throw new \InvalidArgumentException("logger may not be empty"); } if (!$obj->m()) { throw new \InvalidArgumentException("mapperBuilder may not be empty"); } return $obj; }
public static function build(array $data) { $job = new static($data); if (empty($job->m())) { throw new \InvalidArgumentException("must define mapperBuilder"); } if (empty($job->getGridResolution())) { throw new \InvalidArgumentException("gridResolution may not be empty"); } if (empty($job->getQueue())) { throw new \InvalidArgumentException("queue may not be empty"); } if (empty($job->getBoundaryBuilder())) { throw new \InvalidArgumentException("boundary_builder may not be empty"); } return $job; }
protected static function _init() { if (!static::$m) { static::$m = new Memcache(); } }