/** * XXX: * @return array(_data_source) or NULL */ function create($key, $slug) { $ds = new _data_source(); // Compulsory attributes $ds->_initAttribute("key", $key, TRUE); $ds->_initAttribute("slug", $slug, TRUE); // Some extras $ds->setAttribute("created", time()); $ds->create(); return $ds; }