示例#1
0
 public function testGetPhpMemoryCapacity()
 {
     $this->_assertCapacity(Utils::getPhpMemoryCapacity());
 }
示例#2
0
文件: Memory.php 项目: nevvermind/zf2
 /**
  * Get storage capacity.
  *
  * @param  array $options
  * @return array|boolean Capacity as array or false on failure
  * @throws Exception
  *
  * @triggers getCapacity.pre(PreEvent)
  * @triggers getCapacity.post(PostEvent)
  * @triggers getCapacity.exception(ExceptionEvent)
  */
 public function getCapacity(array $options = array())
 {
     $args = new ArrayObject(array('options' => &$options));
     $eventRs = $this->triggerPre(__FUNCTION__, $args);
     if ($eventRs->stopped()) {
         return $eventRs->last();
     }
     $result = Utils::getPhpMemoryCapacity();
     return $this->triggerPost(__FUNCTION__, $args, $result);
 }