/** * @param ActiveModel $cron_jobs * @param ActiveModel $cron_log */ public function index($cron_jobs, $cron_log) { $allHandlers = []; $loader = Loader::getInstance(); $dirs = $loader->findDirectories(['App\\']); foreach ($dirs as $dir_id => $dir) { if ($cronPath = realpath("{$dir}/Controllers/Cron")) { $classes = glob("{$cronPath}/*.php"); foreach ($classes as $class) { if ($classPath = $loader->toPSR4('Cron', basename($class), 'App\\Controllers')) { //ucfirst(basename(dirname(dirname($class)))))) { if ($reflector = new ReflectionClass($classPath)) { foreach ($reflector->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { if (!preg_match('/^\\_/', $method->name)) { $parts = explode('vendor', $dir); $methodValue = sprintf("%s@%s", $method->class, $method->name); $methodName = sprintf("%s (in %s)", $methodValue, @$parts[1] ?: 'app'); $allHandlers[] = ['value' => $methodValue, 'name' => $methodName, 'type' => $method->class]; } } } } } } } View::forge('Admin/Select2/EditCronJob.php', $cron_jobs, $cron_log, ['allHandlers' => $allHandlers]); }
/** * @param CronJob $cron_job */ public function index($cron_job) { if (!empty($cron_job->cron_job_id)) { $script = realpath(sprintf('%s/vendor/bin/script-runner', BASE_DIR)); $run_cmd = sprintf('%s %d', $script, $cron_job->cron_job_id); $output = `{$run_cmd}`; View::forgeWithoutLayout('Admin/RunCronJob.php', ['run' => json_encode(['cmd' => $run_cmd, 'result' => @json_decode($output)])]); } }
public function index($project_id) { $host = App::getInstance()->getSelfHost(); $data = ['converter_url' => sprintf('%s/static/local/swf/converter/converter.swf', $host), 'player_url' => sprintf('%s/static/local/swf/player/player.swf', $host, $project_id), 'project_url' => sprintf('%s/members/projects/data/%d', $host, $project_id)]; if (@$_GET['html'] == '0') { $url = sprintf('%s?%s', $data['converter_url'], http_build_query(array_intersect_key($data, array_flip(['player_url', 'project_url'])))); HttpResponse::getInstance()->redirect($url); } View::forgeWithoutLayout('Swf2Vid/FlashPlayer.php', $data); }
/** * @param ActiveModel $project */ public function index($project) { $ytConfig = App::getInstance()->config->getKey(YouTubeWrapper::youtubeKey); $settings = ['api_key' => $ytConfig['api_key'], 'title' => $project->title]; if ($project->public != 'y') { $scope['hidden'] = true; if ($project->user_id != SessionManager::getInstance()->getUserID()) { $project = []; $settings['private'] = true; } } View::forge('ActiveTheme/StockVideoPage.php', ['settings' => json_encode($settings)], $project); }
/** * @param ActiveModel $ar_campaign * @param ActiveModel $ar_messages */ public function index($ar_campaign, $all_mails, $all_lists) { View::forge('Admin/Autoresponder/EditCampaigns.php', $ar_campaign, $all_mails, $all_lists); }
/** * ViewFromString constructor. * * @param Resolver $resolver * @param Compiler $compiler */ public function __construct(Resolver $resolver, Compiler $compiler) { parent::__construct('', [], false); $this->resolver = $resolver; $this->compiler = $compiler; }
/** * @param ActiveModel $ar_broadcasts */ public function index($ar_broadcasts, $all_mails, $all_lists) { View::forge('Admin/Autoresponder/EditBroadcast.php', $ar_broadcasts, $all_mails, $all_lists); }
/** * @param ActiveModel $ar_lists * @param ActiveModel $ar_list_sqls */ public function index($ar_lists, $ar_list_sqls) { View::forge('Admin/ListView/ViewLists.php', $ar_lists, $ar_list_sqls); }
/** * @param ActiveModel $cron_jobs */ public function index($cron_jobs) { $lastRun = time() - App::getInstance()->config->getKey('site/cron/lastrun', 0); View::forge('Admin/ListView/ViewCronJobs.php', $cron_jobs, array('lastRun' => $lastRun, 'base' => addslashes(StringUtils::unixPath(BASE_DIR)))); }
/** * @param ActiveModel $ar_lists * @param ActiveModel $sqls */ public function index($ar_lists, $sqls) { View::forge('Admin/EditList.php', $ar_lists, $sqls); }
public function index($broadcasts) { View::forge('Admin/ListView/ViewBroadcasts.php', $broadcasts); }
/** * @param ActiveModel $project */ public function index($project) { $categories = YouTubeWrapper::getInstance()->getCategories(); View::forge('Members/YouTubeUpload.php', ['categories' => json_encode($categories)], $project); }
/** * @param ActiveModel $ar_campaigns * @param ActiveModel $ar_messages */ public function index($ar_campaigns) { View::forge('Admin/ListView/ViewCampaigns.php', $ar_campaigns); }