Пример #1
0
 public static function importEntry($path)
 {
     $info = self::parsePath($path);
     //	do the database part
     $entry = new Entry((int) $info['id']);
     $entry->name = $info['name'];
     $entry->simple = $info['simple'];
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }
Пример #2
0
 public static function importEntry($path)
 {
     $parts = explode('/', $path);
     $info = explode('_', $parts[count($parts) - 2]);
     //	do the database part
     $entry = new Entry((int) $info[0]);
     $entry->name = $info[1];
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }
Пример #3
0
 public static function importEntry($path)
 {
     $parts = explode('/', $path);
     $dir = $parts[count($parts) - 2];
     $id = (int) substr($dir, 0, strpos($dir, '_'));
     $name = substr($dir, strpos($dir, '_') + 1);
     //	do the database part
     $entry = new Entry($id);
     $entry->name = $name;
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }