public function __construct($path, $mode = 'r+', $delimiter = ',') { parent::__construct($path, $mode); $this->_delimiter = $delimiter; $this->_headers = $this->formatHeaders($this->getRow()); $this->_line = 0; }
/** * * @param string $path * @param string $mode */ public function __construct($path, $mode = 'r+') { if (!file_exists($path)) { touch($path); } parent::__construct($path, $mode); }
/** * Dynamic Getter * * Uses bitwise check against the $props array to determine read status. * * @param $prop Property name to get. * @return Value for the property if it exists and is readable. */ public function __get($prop) { // echo '<pre>'.__METHOD__.'() $this->'.$prop.': '.print_r($this->$prop, true)."</pre>\n"; if (array_key_exists($prop, $this->props) && ($this->props[$prop] & 1) == 1) { return $this->{$prop}; } else { if (parent::__get($prop)) { } } }
public function __construct($path, $mode = 'r+') { parent::__construct($path, $mode); $this->_headers = $this->getRow(); $this->_line = 0; }
/** * The destroy handler, this is executed when a session is destroyed with * session_destroy() and takes the session id as its only parameter. * * @param string $sess_id The session ID to destroy * * @return void */ public function destroy($sess_id) { // Perform standard actions required by all session methods: parent::destroy($sess_id); // Perform file-specific cleanup: $sess_file = $this->getPath() . '/sess_' . $sess_id; if (file_exists($sess_file)) { return unlink($sess_file); } return true; }
/** * The destroy handler, this is executed when a session is destroyed with * session_destroy() and takes the session id as its only parameter. * * @param string $sess_id The session ID to destroy * * @return bool */ public function destroy($sess_id) { // Perform standard actions required by all session methods: parent::destroy($sess_id); // Perform Memcache-specific cleanup: return $this->getConnection()->delete("vufind_sessions/{$sess_id}"); }
public function sayOldHello() { echo parent::sayHello(); }
/** * Does the OpenURL configuration indicate that we should display OpenURLs in * the specified context? * * @param string $area 'results', 'record' or 'holdings' * * @return bool */ public function openURLActive($area) { return AbstractBase::openURLActive($area); }
/** * Create a new ViewModel. * * @param array $params Parameters to pass to ViewModel constructor. * * @return \Zend\View\Model\ViewModel */ protected function createViewModel($params = null) { $view = parent::createViewModel($params); // Set the current action. $currentAction = $this->getCurrentAction(); if (!empty($currentAction)) { $view->currentAction = $currentAction; } // Initialize the array of top-level browse options. $browseOptions = []; // First option: tags -- is it enabled in config.ini? If no setting is // found, assume it is active. Note that this setting is disabled if tags // are universally turned off. if ((!isset($this->config->Browse->tag) || $this->config->Browse->tag) && $this->tagsEnabled()) { $browseOptions[] = $this->buildBrowseOption('Tag', 'Tag'); $view->tagEnabled = true; } // Read configuration settings for LC / Dewey call number display; default // to LC only if no settings exist in config.ini. if (!isset($this->config->Browse->dewey) && !isset($this->config->Browse->lcc)) { $lcc = true; $dewey = false; } else { $lcc = isset($this->config->Browse->lcc) && $this->config->Browse->lcc; $dewey = isset($this->config->Browse->dewey) && $this->config->Browse->dewey; } // Add the call number options as needed -- note that if both options exist, // we need to use special text to disambiguate them. if ($dewey) { $browseOptions[] = $this->buildBrowseOption('Dewey', $lcc ? 'browse_dewey' : 'Call Number'); $view->deweyEnabled = true; } if ($lcc) { $browseOptions[] = $this->buildBrowseOption('LCC', $dewey ? 'browse_lcc' : 'Call Number'); $view->lccEnabled = true; } // Loop through remaining browse options. All may be individually disabled // in config.ini, but if no settings are found, they are assumed to be on. $remainingOptions = ['Author', 'Topic', 'Genre', 'Region', 'Era']; foreach ($remainingOptions as $current) { $option = strToLower($current); if (!isset($this->config->Browse->{$option}) || $this->config->Browse->{$option} == true) { $browseOptions[] = $this->buildBrowseOption($current, $current); $option .= 'Enabled'; $view->{$option} = true; } } // CARRY if ($findby = $this->params()->fromQuery('findby')) { $view->findby = $findby; } if ($query = $this->params()->fromQuery('query')) { $view->query = $query; } if ($category = $this->params()->fromQuery('category')) { $view->category = $category; } $view->browseOptions = $browseOptions; return $view; }
public function __construct($path, $mode = 'r+', $delimiter = ',', $enclosure = '"') { parent::__construct($path, $mode, $delimiter, $enclosure); $this->_headers = $this->getRow(); $this->_line = 0; }
/** * * @param unknown_type $path * @param unknown_type $mode */ public function __construct($path, $mode = 'r+') { parent::__construct($path, $mode); $this->initializate(); }
/** * @param $path * @param string $mode * @param bool $headersInFirstRow */ public function __construct($path, $mode = 'r+', $headersInFirstRow = true) { parent::__construct($path, $mode); $this->headersInFirstRow = $headersInFirstRow; }
/** * * @param unknown_type $path * @param unknown_type $mode */ public function __construct($path, $mode = 'r+', $delimiter = ',', $enclosure = '"') { parent::__construct($path, $mode, $delimiter, $enclosure); $this->initializate(); }