Esempio n. 1
0
 public function getLangs($forceReread = false)
 {
     $closure = function ($options) {
         return unserialize(file_get_contents($options));
     };
     return parent::getLangsByClosure($closure, $forceReread, $this->path . "languagelist.serialysed");
 }
Esempio n. 2
0
 public function getLangs($forceReread = false)
 {
     $closure = function () {
         return preg_split("/;/", shell_exec('for i in ' . "`highlight -p|awk -F: '{print \$2}'| sed -e 's/(\\|)//g'`" . ' ; do echo -n "$i;"; done'));
     };
     return parent::getLangsByClosure($closure, $forceReread);
 }
Esempio n. 3
0
 public function getLangs($forceReread = false)
 {
     $closure = function () {
         $langs = preg_split("/\n/", trim(shell_exec("pygmentize -L lexer|tail -n+5|grep -v ^*|awk -F'(' '{print \$1}'")));
         foreach ($langs as $k => $v) {
             $langs[$k] = trim($v);
         }
         return $langs;
     };
     return parent::getLangsByClosure($closure, $forceReread);
 }
Esempio n. 4
0
 public function getLangs($forceReread = false)
 {
     $closure = function ($options) {
         $finder = new Finder();
         $finder->files()->name("*.php")->in($options);
         foreach ($finder as $file) {
             $langs[] = preg_replace("/\\.php/", "", $file->getFilename());
         }
         return $langs;
     };
     return parent::getLangsByClosure($closure, $forceReread, $this->langsDir);
 }