'{$2}', 'folderListHead' => 'Folder Name', 'folderListEntry' => "{\$folderUrl}\n", 'docListHead' => 'Document NameLast Modification DateActions', 'docListEntry' => '{$2}{$3}{$4}', 'docListEmpty' => "No documents in this folder\n", 'pageLink' => ' {$2} ', 'pageCurrent' => ' {$1} ', 'pageList' => '
{$1}
', 'downloadFrame' => '', 'uploadAction' => 'Upload ', 'cancelCOAction' => 'CancelCO ', 'deleteAction' => 'Delete ', 'checkinAction' => 'Check-In ', 'checkoutAction' => 'Check-Out ', 'detailsAction' => 'More ', 'createFolderBtn' => '', 'createDocumentBtn' => '', // Dialogs 'loginForm' => << Login to PHP CMIS Client
Username:
Passwort:
EOF , 'modalDialog' => <<
EOF , 'uploadFileDialog' => <<
File Name:
   
EOF , 'cancelCODialog' => <<Unsaved changes will be lost!
   
EOF , 'deleteDialog' => <<
   
EOF , 'checkoutDialog' => <<Download will start automatically.
   
EOF , 'checkinDialog' => <<(leave file name empty to check-in without uploading a file)
File Name:
   
EOF , 'createFolderDialog' => <<
Folder Name:
   
EOF , 'createDocumentDialog' => <<(leave file name empty to create a document without content)
File Name:
Document Name:
   
EOF , // Page elements 'htmlHeader' => << PHP CMIS Client EOF , 'htmlFooter' => << EOF , 'pageHeader' => <<
PHP CMIS Client
(c) 2012 Karsten Eberding
{\$1}
Content in Folder {\$2}
{\$3}
EOF , 'folderList' => << {\$folderListHead} {\$1}
EOF , 'documentList' => << {\$1} {\$2}
{\$3} EOF ); function PccLayout() { // nothing to do } /* Apply Template function, variable parameter list */ public function applyTemplate($templateName) { $param = func_get_args(); $template = self::$templates[$templateName]; return $this->applyTemplateString($template, $param); } public function applyTemplateString($template, $param) { // small trick to make class variables available in callback function $templates = self::$templates; $self = $this; $callback = // Start of anonymous callback function function ($match) use ($param, $templates, $self) { if ($match[1] == '$') { if (is_numeric($match[2])) { // Numeric, use parameter $x $return = (string) $param[$match[2]]; } else { // non-numeric, apply template again $return = $templates[$match[2]]; if (strpos($return, '{') !== false) { $return = $self->applyTemplateString($return, $param); } } } else { // does not start with $, eval result $return = $self->applyTemplateString($match[2]); $return = eval("return $return;"); } return $return; }; // End of anonymous callback function $return = preg_replace_callback('/\{([$@]?)(((?>[^\{\}]+)|(?R))*)\}/', $callback, $template); return $return; } } ?>