filenotinrepositoryerror.class.php

来自「ProjectPier 源码 很好的项目管理程序」· PHP 代码 · 共 71 行

PHP
71
字号
<?php  /**  * This error is throw when we are trying to manipulate with file that   * is not in the file repository  *  * @version 1.0  * @http://www.projectpier.org/  */  class FileNotInRepositoryError extends Error {      /**    * Unique file ID    *    * @var string    */    private $file_id;        /**    * Construct the FileNotInRepositoryError    *    * @access public    * @param void    * @return FileNotInRepositoryError    */    function __construct($file_id, $message = null) {      if (is_null($message)) $message = "File '$file_id' can not be found in the repository";      parent::__construct($message);      $this->setFileId($file_id);    } // __construct        /**    * Return errors specific params...    *    * @param void    * @return array    */    function getAdditionalParams() {      return array(        'file ID' => $this->getFileId()      ); // array    } // getAdditionalParams        // ---------------------------------------------------    //  Getters and setters    // ---------------------------------------------------        /**    * Get file_id    *    * @param null    * @return string    */    function getFileId() {      return $this->file_id;    } // getFileId        /**    * Set file_id value    *    * @param string $value    * @return null    */    function setFileId($value) {      $this->file_id = $value;    } // setFileId    } // FileNotInRepositoryError?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?