Fixed documentation

This commit is contained in:
Dennis Eichhorn 2016-08-28 16:36:02 +02:00
parent 773d3a962f
commit 952cec0bf9
5 changed files with 48 additions and 8 deletions

View File

@ -115,7 +115,7 @@ class AccountManager implements \Countable
*
* @return int
*
* @throws
* @throws \Exception Throws this exception if the account to login is not found in the AccountManager.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
@ -123,7 +123,7 @@ class AccountManager implements \Countable
public function login(int $account, string $login, string $password) : int
{
if (!isset($this->accounts[$account])) {
throw new \Exception('Account not loaded');
throw new \Exception('Account not found in the account manager.');
}
return $this->auth->login($login, $password);

View File

@ -49,7 +49,7 @@ class ConnectionFactory
*
* @return ConnectionInterface
*
* @throws \Exception
* @throws \InvalidArgumentException Throws this exception if the database is not supported.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>

View File

@ -62,7 +62,7 @@ class HttpSession implements SessionInterface
* @param int $liftetime Session life time
* @param string|int|bool $sid Session id
*
* @throws \Exception
* @throws \Exception Throws this exception if the session is alrady locked for further interaction.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>

View File

@ -15,7 +15,7 @@
*/
namespace phpOMS\Localization;
use phpOMS\Datatypes\EnumArray;
use phpOMS\Datatypes\Enum;
/**
* Country codes ISO list.
@ -28,7 +28,7 @@ use phpOMS\Datatypes\EnumArray;
* @link http://orange-management.com
* @since 1.0.0
*/
class ISO3166CharEnum extends EnumArray
class ISO3166CharEnum extends Enum
{
const _AFG = 'AFG';
const _ALA = 'ALA';

View File

@ -210,6 +210,16 @@ class File extends FileAbstract implements FileInterface
return $changed;
}
/**
* Gets the size of a file in bytes.
*
* @param string $path Path of the file to get the size for.
*
* @return int Returns the size of the file.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function size(string $path) : int
{
if (!file_exists($path)) {
@ -219,6 +229,16 @@ class File extends FileAbstract implements FileInterface
return filesize($path);
}
/**
* Gets the id of the owner of the file.
*
* @param string $path Path of the file to get the owner for.
*
* @return int Returns the owner of the file.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function owner(string $path) : int
{
if (!file_exists($path)) {
@ -228,6 +248,16 @@ class File extends FileAbstract implements FileInterface
return fileowner($path);
}
/**
* Gets the permission of a file.
*
* @param string $path Path of the file to get the permission for.
*
* @return int Returns the permission of the file.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function permission(string $path) : int
{
if (!file_exists($path)) {
@ -237,6 +267,16 @@ class File extends FileAbstract implements FileInterface
return fileperms($path);
}
/**
* Gets the directory name of a file.
*
* @param string $path Path of the file to get the directory name for.
*
* @return string Returns the directory name of the file.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function dirname(string $path) : string
{
return dirname($path);
@ -325,9 +365,9 @@ class File extends FileAbstract implements FileInterface
}
/**
* Get file content.
* Gets the content of the current file.
*
* @return string
* @return string Content of the file.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>