本文整理汇总了PHP中unknown::getApp方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::getApp方法的具体用法?PHP unknown::getApp怎么用?PHP unknown::getApp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::getApp方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: iniServices
/**
*
* @param unknown $pageOptions
*/
protected function iniServices($pageOptions)
{
$services = array();
if (false !== ($getServices = $pageOptions->getApp('services'))) {
foreach ($getServices as $key => $service) {
$services[$key] = $this->getServiceLocator()->get($service);
}
}
return $services;
}
示例2: process
/**
*
* @param unknown $pageOptions
* @param string $role
* @param string $acl
*/
public function process($pageOptions, $role = null, $acl = null)
{
$datas = $this->getRequest()->getPost();
$current = $cat = '';
$current = str_replace('_', DS, $datas['currentpath']);
if (strlen($current) > 0) {
$cat = '/' . $datas['currentpath'];
}
$redirectUrl = $pageOptions->getApp('settoroute');
if (isset($datas['new-folder']) && strlen($datas['new-folder']) > 1) {
$this->worker->setFsCurrent($current);
$this->worker->setNewDirectory($datas['new-folder']);
$this->worker->mkdir();
$this->flashMessenger()->setNamespace('mcwork')->addSuccessMessage('Successfully created a new directory');
} else {
$this->flashMessenger()->setNamespace('mcwork')->addErrorMessage('Error while create a new directory');
}
return $this->redirect()->toUrl($redirectUrl . $cat);
}
示例3: process
/**
*
* @param unknown $pageOptions
* @param unknown $defaultRole
* @param unknown $acl
* @return Ambigous <\Zend\Http\Response, \Zend\Stdlib\ResponseInterface>|\Zend\View\Model\ViewModel
*/
public function process($pageOptions, $role = null, $acl = null)
{
$category = '';
if (null !== $this->groupIdent) {
$category = '/category/' . $this->getGroupIdent();
}
$form = $this->getForm();
$form->setInputFilter($form->getInputFilter());
$form->setData($this->getRequest()->getPost());
if ($form->isValid()) {
$formDatas = $form->getData();
try {
if (method_exists($this->worker, 'setIdentity')) {
$this->worker->setIdentity($this->getIdentity());
}
$msg = $this->worker->save($form->getData(), $this->worker->fetchPopulateValues($this->getIdent(), false));
return $this->redirect()->toUrl($pageOptions->getApp('settoroute') . $category);
} catch (\Exception $e) {
exit($e->getMessage());
}
} else {
$this->backendlayout($pageOptions, $this->getIdentity(), $role, $acl, $this->layout(), $this->getServiceLocator());
$services = array();
return $this->buildView(array('acl' => $acl, 'role' => $role, 'resource' => $this->getServiceLocator()->get('mcwork_acl_resource'), 'current' => $pageOptions->getActive(), 'services' => $services, 'identity' => $this->getIdentity(), 'usergroups' => $this->getServiceLocator()->get('contentinum_acl_usrgrp'), 'content' => $pageOptions->getPageContent(), 'form' => $form, 'category' => $this->getGroupIdent(), 'paramter' => $pageOptions->getParams(), 'appparameter' => $pageOptions->getApp('appparameter'), 'xmlHttpRequest' => $this->getXmlHttpRequest()), $pageOptions);
}
}