noalyss Version-9
Public Member Functions | Private Attributes
Package_Noalyss Class Reference

package noalyss is the mother class of the class to install and download package More...

+ Inheritance diagram for Package_Noalyss:
+ Collaboration diagram for Package_Noalyss:

Public Member Functions

 __construct ($name, $description, $full_path)
 
 can_download ()
 check that NOALYSS_HOME exists and is writable More...
 
 can_install ()
 
 download ()
 
 get_description ()
 
 get_file ()
 
 get_name ()
 
 get_path ()
 
 install ()
 
 set_description ($description)
 
 set_file ($file)
 
 set_name ($name)
 
 set_path ($path)
 

Private Attributes

 $description
 
 $file
 
 $name
 
 $path
 

Detailed Description

package noalyss is the mother class of the class to install and download package

Definition at line 31 of file package_noalyss.class.php.

Constructor & Destructor Documentation

◆ __construct()

Package_Noalyss::__construct (   $name,
  $description,
  $full_path 
)

Definition at line 39 of file package_noalyss.class.php.

40 {
41 $this->file=basename(trim($full_path));
42 $this->path=dirname(trim($full_path));
43
44 $this->description=$description;
45 $this->name=$name;
46 }
$from_poste name

References $description, $name, and name.

Member Function Documentation

◆ can_download()

Package_Noalyss::can_download ( )

check that NOALYSS_HOME exists and is writable

Definition at line 95 of file package_noalyss.class.php.

96 {
97 $download_dir=NOALYSS_HOME."/tmp";
98 if (is_dir($download_dir)&&is_writable($download_dir))
99 {
100 return TRUE;
101 }
102 return FALSE;
103 }

Referenced by download().

◆ can_install()

Package_Noalyss::can_install ( )
abstract

Reimplemented in Package_Core, Package_Plugin, and Package_Template.

◆ download()

Package_Noalyss::download ( )

Definition at line 105 of file package_noalyss.class.php.

106 {
107 if ( ! $this->can_download() ) return false;
108 // If install is writable then download
109
110
111 $full=$this->get_path()."/".$this->get_file();
112 $file = file_get_contents(NOALYSS_PACKAGE_REPOSITORY."/".$full);
113 $fh_file=fopen(NOALYSS_HOME."/tmp/".$this->get_file(),"w+");
114
115 fwrite($fh_file, $file);
116 fclose($fh_file);
117 return TRUE;
118
119 }
can_download()
check that NOALYSS_HOME exists and is writable

References $file, can_download(), get_file(), and get_path().

+ Here is the call graph for this function:

◆ get_description()

Package_Noalyss::get_description ( )

Definition at line 69 of file package_noalyss.class.php.

70 {
71 return $this->description;
72 }

References $description.

◆ get_file()

Package_Noalyss::get_file ( )

Definition at line 59 of file package_noalyss.class.php.

60 {
61 return $this->file;
62 }

References $file.

Referenced by download().

◆ get_name()

Package_Noalyss::get_name ( )

Definition at line 64 of file package_noalyss.class.php.

65 {
66 return $this->name;
67 }

References $name.

◆ get_path()

Package_Noalyss::get_path ( )

Definition at line 48 of file package_noalyss.class.php.

49 {
50 return $this->path;
51 }

References $path.

Referenced by download().

◆ install()

Package_Noalyss::install ( )
abstract

Reimplemented in Package_Core, Package_Plugin, and Package_Template.

◆ set_description()

Package_Noalyss::set_description (   $description)

Definition at line 86 of file package_noalyss.class.php.

87 {
88 $this->description=$description;
89 return $this;
90 }

References $description.

◆ set_file()

Package_Noalyss::set_file (   $file)

Definition at line 74 of file package_noalyss.class.php.

75 {
76 $this->file=$file;
77 return $this;
78 }

References $file.

◆ set_name()

Package_Noalyss::set_name (   $name)

Definition at line 80 of file package_noalyss.class.php.

81 {
82 $this->name=$name;
83 return $this;
84 }

References $name, and name.

◆ set_path()

Package_Noalyss::set_path (   $path)

Definition at line 53 of file package_noalyss.class.php.

54 {
55 $this->path=$path;
56 return $this;
57 }

References $path.

Field Documentation

◆ $description

Package_Noalyss::$description
private

◆ $file

Package_Noalyss::$file
private

Definition at line 34 of file package_noalyss.class.php.

Referenced by download(), get_file(), and set_file().

◆ $name

Package_Noalyss::$name
private

Definition at line 36 of file package_noalyss.class.php.

Referenced by __construct(), get_name(), and set_name().

◆ $path

Package_Noalyss::$path
private

Definition at line 35 of file package_noalyss.class.php.

Referenced by get_path(), and set_path().


The documentation for this class was generated from the following file: