Пример #1
0
 public function testAdd()
 {
     if (!defined("RP_DEBUG")) {
         define("RP_DEBUG", true);
     }
     $timer = Debug::getTimer();
     Debug::logEvent("testing", $timer);
     Debug::getLog();
     Debug::printPretty();
     //Debug::SaveError(new Exception("zomg this is shit"));
     Debug::printArray("asdafd");
 }
Пример #2
0
 /**
  * Store jobs in the database
  *
  * @since Version 3.8.7
  * @return $this
  */
 public function store()
 {
     foreach ($this->jobs as $job) {
         if (strtolower(trim($job['title'])) != "test job") {
             $Job = new Job();
             $Job->title = $job['title'];
             $Job->Organisation = $this->Organisation;
             $Job->desc = $job['description'];
             $Job->Open = $job['date']['open'];
             $Job->expiry = $job['date']['close'];
             $Job->salary = $job['salary'];
             $Job->duration = implode(", ", $job['type']);
             $Job->Location = new Location($job['location']['name']);
             $Job->Classification = new Classification(strval($job['category']));
             $Job->reference_id = $job['id'];
             $Job->url = new Url();
             $Job->url->apply = strval($job['url']['apply']);
             try {
                 $Job->commit();
             } catch (Exception $e) {
                 Debug::printArray($e->getMessage());
                 die;
             }
         }
     }
 }