Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17042 | Rev 17045 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 17042 Rev 17044
Línea 362... Línea 362...
362
    }
362
    }
Línea 363... Línea 363...
363
 
363
 
364
    public function getPathByType($type)
364
    public function getPathByType($type)
365
    {
365
    {
-
 
366
        switch ($type) {
-
 
367
            case self::TYPE_DEFAULT:
-
 
368
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'default';
-
 
369
                break;
366
        switch ($type) {
370
 
367
            case TYPE_CHAT:
371
            case self::TYPE_CHAT:
-
 
372
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'chat';
368
                return $this->getPathChat();
373
                break;
369
 
374
 
370
            case TYPE_GROUP:
375
            case self::TYPE_GROUP:
-
 
376
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'group';
371
                return $this->getPathGroup();
377
                break;
372
 
378
 
373
            case TYPE_USER:
379
            case self::TYPE_USER:
-
 
380
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'user';
374
                return $this->getPathUser();
381
                break;
375
 
382
 
376
            case TYPE_IMAGE:
383
            case self::TYPE_IMAGE:
-
 
384
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'image';
377
                return $this->getPathImage();
385
                break;
378
 
386
 
-
 
387
            case self::TYPE_JOB:
379
            case TYPE_JOB:
388
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'job';
380
                return $this->getPathJob();
389
                break;
381
 
390
 
382
            case TYPE_COMPANY:
391
            case self::TYPE_COMPANY:
-
 
392
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'company';
383
                return $this->getPathCompany();
393
                break;
384
 
394
 
385
            case TYPE_FEED:
395
            case self::TYPE_FEED:
-
 
396
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'feed';
-
 
397
                break;
-
 
398
 
-
 
399
            case self::TYPE_MEDIA:
-
 
400
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'media';
386
                return $this->getPathFeed();
401
                break;
387
 
402
 
388
            case TYPE_POST:
403
            case self::TYPE_POST:
-
 
404
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'post';
389
                return $this->getPathPost();
405
                break;
390
 
406
 
391
            case TYPE_MICROLEARNING_TOPIC:
407
            case self::TYPE_MICROLEARNING_TOPIC:
-
 
408
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'microlearning' . DIRECTORY_SEPARATOR . 'topic';
392
                return $this->getPathMicrolearningTopic();
409
                break;
393
 
410
 
394
            case TYPE_MICROLEARNING_CAPSULE:
411
            case self::TYPE_MICROLEARNING_CAPSULE:
-
 
412
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'microlearning' . DIRECTORY_SEPARATOR . 'capsule';
395
                return $this->getPathMicrolearningCapsule();
413
                break;
396
 
414
 
397
            case TYPE_MICROLEARNING_SLIDE:
415
            case self::TYPE_MICROLEARNING_SLIDE:
-
 
416
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'microlearning' . DIRECTORY_SEPARATOR . 'slide';
398
                return $this->getPathMicrolearningSlide();
417
                break;
399
 
418
 
400
            case TYPE_JOB_DESCRIPTION:
419
            case self::TYPE_JOB_DESCRIPTION:
-
 
420
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'job-description';
401
                return $this->getPathJobDescription();
421
                break;
402
 
422
 
403
            case TYPE_SELF_EVALUATION:
423
            case self::TYPE_SELF_EVALUATION:
-
 
424
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'self-evaluation';
404
                return $this->getPathSelfEvaluation();
425
                break;
405
 
426
 
406
            case TYPE_PERFORMANCE_EVALUATION:
427
            case self::TYPE_PERFORMANCE_EVALUATION:
-
 
428
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'performance-evaluation';
407
                return $this->getPathPerformanceEvaluation();
429
                break;
408
 
430
 
409
            case TYPE_RECRUITMENT_SELECTION:
431
            case self::TYPE_RECRUITMENT_SELECTION:
-
 
432
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'recruitment-selection';
410
                return $this->getPathRecruitmentSelection();
433
                break;
411
 
434
 
412
            case TYPE_PLANNING_OBJECTIVES_AND_GOALS:
435
            case self::TYPE_PLANNING_OBJECTIVES_AND_GOALS:
413
                return $this->getPathPlanningObjectivesAnGoals();
-
 
-
 
436
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'planning-objectives-and-goals';
414
 
437
                break;
415
 
438
 
416
            case TYPE_MESSAGE:
439
            case self::TYPE_MESSAGE:
-
 
440
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'message';
417
                return $this->getPathMessage();
441
                break;
418
 
442
 
419
            case TYPE_SURVEY:
443
            case self::TYPE_SURVEY:
-
 
444
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'survey';
420
                return $this->getPathSurvey();
445
                break;
421
 
446
 
422
            case TYPE_NETWORK:
447
            case self::TYPE_NETWORK:
-
 
448
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'network';
423
                return $this->getPathNetwork();
449
                break;
424
 
450
 
425
            case TYPE_DAILY_PULSE:
451
            case self::TYPE_DAILY_PULSE:
-
 
452
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'daily-pulse';
426
                return $this->getPathDailyPulse();
453
                break;
427
 
454
 
428
            case TYPE_ENGAGEMENT_REWARD:
455
            case self::TYPE_ENGAGEMENT_REWARD:
-
 
456
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'engagement-reward';
429
                return $this->getPathEngagementReward();
457
                break;
430
 
458
 
431
            case TYPE_KNOWLEDGE_AREA:
459
            case self::TYPE_KNOWLEDGE_AREA:
-
 
460
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'knowledge-area';
432
                return $this->getPathKnowledgeArea();
461
                break;
433
 
462
 
434
            case TYPE_MY_COACH:
463
            case self::TYPE_MY_COACH:
-
 
464
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'my-coach';
435
                return $this->getPathMyCoach();
465
                break;
436
 
466
 
-
 
467
            case self::TYPE_HABIT_EMOJI:
437
            case TYPE_HABIT_EMOJI:
468
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'habit' . DIRECTORY_SEPARATOR . 'emoji';
438
                return $this->getPathHabitEmoji();
469
                break;
439
 
470
 
-
 
471
            case self::TYPE_HABIT_CONTENT:
440
            case TYPE_HABIT_CONTENT:
472
                $path = $this->storagePath . DIRECTORY_SEPARATOR . 'habit' . DIRECTORY_SEPARATOR . 'content';
Línea 441... Línea 473...
441
                return $this->getPathHabitContent();
473
                break;
442
 
474
 
-
 
475
            default:
-
 
476
                $path = $this->storagePath;
-
 
477
                break;
-
 
478
        }
-
 
479
 
443
            default:
480
        if (! file_exists($path)) {
-
 
481
            mkdir($path, 0775, true);
-
 
482
        }
444
                return DIRECTORY_SEPARATOR;
483
 
Línea 445... Línea 484...
445
        }
484
        return $path;
446
    }
485
    }
447
 
486
 
Línea 710... Línea 749...
710
    public function getPathEngagementReward()
749
    public function getPathEngagementReward()
711
    {
750
    {
712
        return $this->config['leaderslinked.storage.fullpath_engagement_reward'];
751
        return $this->config['leaderslinked.storage.fullpath_engagement_reward'];
713
    }
752
    }
Línea 714... Línea -...
714
 
-
 
715
    /**
-
 
716
     *
-
 
717
     * @return string
-
 
718
     */
753
 
719
    public function getPathDailyPulse()
754
    public function getPathDailyPulse()
720
    {
755
    {
721
        return $this->config['leaderslinked.storage.fullpath_daily_pulse'];
756
        return $this->getPathByType(self::TYPE_DAILY_PULSE);
Línea 722... Línea 757...
722
    }
757
    }
723
 
758
 
724
    /**
759
    /**