예제 #1
0
 public function __construct($imagesFolder, $targetFolder = null)
 {
     parent::__construct();
     $this->imagesFolder = $imagesFolder;
     if ($targetFolder == null) {
         $targetFolder = \Sledgehammer\TMP_DIR . 'ThumbnailFolder/' . basename($imagesFolder) . '_' . substr(md5($imagesFolder), 8, 16) . '/';
     }
     $this->targetFolder = $targetFolder;
 }
예제 #2
0
 public function folder($folder, $filename = false)
 {
     $instance = $this->load($folder);
     if (isset($instance->{$filename})) {
         $repo = getRepository($this->repository);
         $data = $repo->export('Order', $instance->{$filename}, $this->maxRecursion + 2);
         return $this->format($data, 'json');
     }
     return parent::folder($folder, $filename);
 }
예제 #3
0
파일: Folder.php 프로젝트: sledgehammer/mvc
 /**
  * De VirtualFolder van een bepaalde class opvragen die zich hoger in de hierarchie bevind.
  *
  * @return Folder
  */
 public function &getParentByClass($class)
 {
     if (strtolower(get_class($this)) == strtolower($class)) {
         // Is dit de gespecifeerde virtualfolder?
         return $this;
     } elseif ($this->parent === null) {
         // Is de virtualfolder niet gevonden in de hierarchie?
         $message = $class === null ? 'VirtualFolder "' . get_class($this) . '" has no parent' : 'VirtualFolder \'' . $class . '\' is niet actief';
         throw new Exception($message);
     }
     return $this->parent->getParentByClass($class);
 }
예제 #4
0
 public function generateContent()
 {
     $auth = new HttpAuthentication('https://' . $this->subdomain . '.atlassian.net/', function ($username, $password) {
         $this->jira = new Jira('https://' . $this->subdomain . '.atlassian.net', $username, $password);
         try {
             $this->jira->get('myself');
             return true;
         } catch (Exception $e) {
             return false;
         }
     });
     $credentials = $auth->authenticate();
     if (!$credentials) {
         return new HttpError(401);
     }
     return parent::generateContent();
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->publicMethods = array_diff($this->publicMethods, array('handleRequest', 'generateDocument', 'statusbar', 'initLanguage', 'isWrapable'));
     // Een aantal functies *niet* public maken
 }