appName = $AppName; $this->Config = $Config; $this->rootFolder = $RootFolder; $this->db = $IDBConnection; $this->userManager = $UserManager; } /** * @param InputInterface $input * @param OutputInterface $output * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { $this->output = $output; $this->action = $input->getArgument('action'); if($this->action === "rebuild"){ $users = $this->userManager->search("",20000, 0); $arrayId = array(); echo count($users); foreach($users as $user){ array_push($arrayId,$user->getUID()); } $cache = new CacheManager($this->db, null); $cache->buildCache($this->Config, $this->appName, $this->rootFolder, $arrayId); } } protected function configure() { $this->setName('carnet:cache') ->setDescription('Cache') ->addArgument( 'action', InputArgument::REQUIRED, 'Action: rebuild, clear' ); } } ?>