Example #1
0
function getPages()
{
    // not used anywhere
    $data = scandir('.');
    $pages = find_in_array($data, "\\.php");
    return $pages;
}
Example #2
0
 static function linkedClasses()
 {
     global $db;
     $tables = find_in_array($db->getTablesList(), "^" . static::$tablename . "__");
     // $tables: all tables with static::$tablename__ at the start (^)
     // pr($tables);
     $output = array();
     if ($tables) {
         foreach ($tables as $key => $tablename) {
             $output[] = tbl2cls(str_replace(static::$tablename . "__", "", $tablename));
         }
     }
     return $output;
 }
 function importExperience($new_exps)
 {
     $fields = array('year_from', 'year_to', 'current', 'employer', 'job_title');
     // only want experience entries we don't already have
     $existing_exps = db_getAll("SELECT * FROM journo_employment WHERE journo_id=?", $this->journo['id']);
     foreach ($new_exps as $exp) {
         if (find_in_array($exp, $existing_exps, 'cmp_exp') === FALSE) {
             $exp['id'] = null;
             $this->genericStoreItem('journo_employment', $fields, $exp);
             $this->imported['experience'][] = $exp;
         }
     }
 }