public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); if ($this->testAvailability() === true) { $this->getContext()->getLoggerManager()->log('REPORTING: GD available. Compressing images and convert to PNG', AgaviLogger::DEBUG); } }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->__client = $this->getParameter('client'); $this->__rd = $this->getParameter('descriptor'); if (!$this->__client instanceof SoapClient) { throw new AppKitModelException('Model needs SoapClient ' . '(parameter client)'); } if (!$this->__rd instanceof JasperResourceDescriptor) { throw new AppKitModelException('Model needs a ' . 'JasperResourceDescriptor (parameter descriptor)'); } }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->__client = $this->getParameter('client'); $this->__uri = $this->getParameter('uri'); $this->__p = $this->getParameter('parameters', array()); if (!$this->__client instanceof SoapClient) { throw new AppKitModelException('Model needs a SoapClient to work'); } if (!$this->__uri) { throw new AppKitModelException('Model needs a reportUnit uri to work'); } $this->buildSoapRequest($this->__uri); }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->__report = $this->getParameter('report'); $this->__client = $this->getParameter('client'); $this->__format = $this->getParameter('format', 'pdf'); $this->__parameters = $this->getParameter('parameters', array()); if (!$this->__report instanceof JasperResourceDescriptor) { throw new AppKitModelException('report must be instance of JasperResourceDescriptor'); } if (!$this->__client instanceof JasperSoapMultipartClient) { throw new AppKitModelException('client must be instance of SoapClient'); } $this->__placeholderImage = $this->getContext()->getModel('Image.Placeholder', 'Reporting'); $this->__compressor = $this->getContext()->getModel('Image.Compressor', 'Reporting'); }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->__client = $this->getParameter('client'); $this->__uri = $this->getParameter('uri'); $this->__filter = $this->getParameter('filter'); if (!$this->__client instanceof SoapClient) { throw new AppKitModelException('Model needs SoapClient (parameter client)'); } if (!$this->__uri) { throw new AppKitModelException('Model needs Jasper uri of the report (parameter uri)'); } $this->__typeMapping = AgaviConfig::get('modules.reporting.parameter.mapping.type'); $this->__nameMapping = AgaviConfig::get('modules.reporting.parameter.mapping.name'); $this->__controlMapping = AgaviConfig::get('modules.reporting.parameter.mapping.control'); }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->__dir = AgaviConfig::get('modules.reporting.dir.download'); if (!is_dir($this->__dir)) { @mkdir($this->__dir); } if (!is_dir($this->__dir)) { $this->log('Reporting: Permission denied to create temp dir: "%s"', $this->__dir, AgaviLogger::FATAL); throw new AppKitModelException('Reporting: No permission, could not create dir: ' . $this->__dir); } else { $this->fileGarbageCollector(); } $this->__user = $this->getContext()->getUser(); if (!$this->__user instanceof AgaviSecurityUser) { throw new AppKitModelException('Could not get user instance'); } }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->imageData = $this->createImage(); }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); }