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; }
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); }
/** * 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); }
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(); }
public function __construct() { parent::__construct(); $this->publicMethods = array_diff($this->publicMethods, array('handleRequest', 'generateDocument', 'statusbar', 'initLanguage', 'isWrapable')); // Een aantal functies *niet* public maken }