Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZCompany Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ( $id=false)
| get ( $id=-1)
& | getAll ()
& | getByCategory ( $categoryID, $offset=0, $limit=-1, $order="name")
| countByCategory ( $categoryID)
& | searchByCategory ( $categoryID, $query)
| removeCategories ()
| categories ( $companyID=false, $as_object=true, $limit=-1)
& | addresses ( $companyID=false)
| addAddress (&$address)
| removeAddresses ()
& | phones ( $companyID=false)
| addPhone (&$phone)
| removePhones ()
& | onlines ( $onlineID=false)
| addOnline (&$online)
| removeOnlines ()
| addImage (&$image)
& | images ()
| removeImages ()
| setLogoImage (&$image, $id=false)
| deleteImage ( $id=false)
| deleteLogo ( $id=false)
| setCompanyImage (&$image, $id=false)
| setName ( $value)
| setComment ( $value)
| setCreatorID (&$user)
| setCompanyNo ( $value)
| id ()
| name ()
| creatorID ()
| comment ()
| companyNo ()
| setContact ( $value)
| contact ()
| setPersonContact ( $value)
| contactType ()
& | searchByPerson ( $query)
& | projectState ()
| setProjectState ( $value)
| removePersons ( $companyid=false)
| addPerson ( $personid, $companyid=false)
| personCount ( $id=false)
| addViewHit ( $company_id=false)
| totalViewCount ()
& | yearViewCounts ( $year=false)
| viewCount ( $date=false, $type="day")

## Static Public Member Functions
static | exists ( $id)
static & | search ( $query)
static | logoImage ( $id=false)
static | companyImage ( $id=false)
static | persons ( $id=false, $as_object=true, $limit=-1, $offset=0)

## Public Attributes
| $ID
| $CreatorID
| $Name
| $Comment
| $Online
| $ContactID
| $PersonContactID
| $CompanyNo
| $ContactType

## Detailed Description

! eZContact eZCompany handles company information.

Example code:

$company = new eZCompany();
$company->setName( "Company name" );
$company->store();
eZCompany
Definition: ezcompany.php:54
$company
if(!is_numeric( $Year)) if(!is_numeric( $Month)) if(!is_numeric( $Day)) $company
Definition: companystats.php:72

See also
  eZPerson eZAddress

Definition at line 53 of file ezcompany.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZCompany::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZCompany object.

If $id is set the object's values are fetched from the database.

Definition at line 61 of file ezcompany.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addAddress()

eZCompany::addAddress | ( | & | $address | ) |

Adds an address to the current Company.

Definition at line 482 of file ezcompany.php.

References $address, $db, $res, $ret, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addImage()

eZCompany::addImage | ( | & | $image | ) |

Adds a image to the current

Definition at line 671 of file ezcompany.php.

References $db, $image, $res, $ret, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addOnline()

eZCompany::addOnline | ( | & | $online | ) |

Adds an online to the current Company.

Definition at line 623 of file ezcompany.php.

References $db, $res, $ret, $url, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addPerson()

eZCompany::addPerson | ( |  | $personid,
|  |  | $companyid = `false`
| ) |  |

Makes the person a part of the company.

Definition at line 1075 of file ezcompany.php.

References $companyid, $db, $ID, $personid, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addPhone()

eZCompany::addPhone | ( | & | $phone | ) |

Adds an phone to the current Company.

Definition at line 550 of file ezcompany.php.

References $db, $res, $ret, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addresses()

& eZCompany::addresses | ( |  | $companyID = `false` | ) |

Returns the address that belong to this eZCompany object.

Definition at line 457 of file ezcompany.php.

References $db, $ID, and eZDB\globalDatabase().

## ◆ addViewHit()

eZCompany::addViewHit | ( |  | $company_id = `false` | ) |

Adds another view hit for this company for this day.

Definition at line 1148 of file ezcompany.php.

References $db, $id, $ID, $res, $timestamp, eZDB\finish(), and eZDB\globalDatabase().

## ◆ categories()

eZCompany::categories | ( |  | $companyID = `false`,
|  |  | $as_object = `true`,
|  |  | $limit = `-1`
| ) |  |

Returns the categories that belong to this eZCompany object.

Definition at line 425 of file ezcompany.php.

References $db, $ID, $limit, $limit_array, and eZDB\globalDatabase().

## ◆ comment()

eZCompany::comment | ( |  | ) |

Returnerer kommentar.

Definition at line 942 of file ezcompany.php.

References $Comment.

## ◆ companyImage()

static eZCompany::companyImage | ( |  | $id = `false` | ) |
| static

Returns the image of the company as a eZImage object.

Definition at line 856 of file ezcompany.php.

References $db, $id, $ret, and eZDB\globalDatabase().

## ◆ companyNo()

eZCompany::companyNo | ( |  | ) |

Returns Company no.

Definition at line 950 of file ezcompany.php.

References $CompanyNo.

## ◆ contact()

eZCompany::contact | ( |  | ) |

Returns the contact for this company.

Definition at line 968 of file ezcompany.php.

References $ContactID.

## ◆ contactType()

eZCompany::contactType | ( |  | ) |

Returns the contact for this company.

Definition at line 986 of file ezcompany.php.

References $ContactType.

## ◆ countByCategory()

eZCompany::countByCategory | ( |  | $categoryID | ) |

Returns all the companies found in the database in a specific category.

The companies are returned as an array of eZCompany objects.

Definition at line 335 of file ezcompany.php.

References $db, and eZDB\globalDatabase().

Referenced by eZContactSupplier\urlList().

## ◆ creatorID()

eZCompany::creatorID | ( |  | ) |

Returnerer ID til eier av firma ( brukeren som opprettet det ).

Definition at line 934 of file ezcompany.php.

References $CreatorID.

## ◆ delete()

eZCompany::delete | ( |  | $id = `false` | ) |

Deletes a eZCompany object from the database.

Definition at line 134 of file ezcompany.php.

References $db, $id, $ID, $order, $res, eZAddress\delete(), eZPhone\delete(), eZDB\finish(), eZDB\globalDatabase(), and removePersons().

## ◆ deleteImage()

eZCompany::deleteImage | ( |  | $id = `false` | ) |

Deletes the image for the company.

Definition at line 786 of file ezcompany.php.

References $db, $id, $ID, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ deleteLogo()

eZCompany::deleteLogo | ( |  | $id = `false` | ) |

Deletes the logo for the company.

Definition at line 801 of file ezcompany.php.

References $db, $id, $ID, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ exists()

static eZCompany::exists | ( |  | $id | ) |
| static

Returns true if the company exists.

Definition at line 241 of file ezcompany.php.

References $db, $ret, and eZDB\globalDatabase().

## ◆ get()

eZCompany::get | ( |  | $id = `-1` | ) |

Fetches the object information from the database.

Definition at line 209 of file ezcompany.php.

References $db, $id, $ret, $type, eZDB\globalDatabase(), and Name.

## ◆ getAll()

& eZCompany::getAll | ( |  | ) |

Returns all companies found in the database.

The companies are returned as an array of eZCompany objects.

Definition at line 256 of file ezcompany.php.

References $db, and eZDB\globalDatabase().

## ◆ getByCategory()

& eZCompany::getByCategory | ( |  | $categoryID,
|  |  | $offset = `0`,
|  |  | $limit = `-1`,
|  |  | $order = `"name"`
| ) |  |

Returns all the companies found in the database in a specific category.

The companies are returned as an array of eZCompany objects.

Definition at line 277 of file ezcompany.php.

References $db, $dir, $limit, $limit_array, $offset, $order, and eZDB\globalDatabase().

Referenced by eZContactSupplier\urlList().

## ◆ id()

eZCompany::id | ( |  | ) |

Returnerer ID.

Definition at line 918 of file ezcompany.php.

References $ID.

## ◆ images()

& eZCompany::images | ( |  | ) |

Returns every image to a product as a array of eZImage objects.

Definition at line 691 of file ezcompany.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ logoImage()

static eZCompany::logoImage | ( |  | $id = `false` | ) |
| static

Returns the logo image of the company as a eZImage object.

Definition at line 722 of file ezcompany.php.

References $db, $id, $ret, and eZDB\globalDatabase().

## ◆ name()

eZCompany::name | ( |  | ) |

Returnerer firmanavn.

Definition at line 926 of file ezcompany.php.

References $Name.

## ◆ onlines()

& eZCompany::onlines | ( |  | $onlineID = `false` | ) |

Returns the onlines that belong to this eZCompany object.

Definition at line 598 of file ezcompany.php.

References $db, $ID, and eZDB\globalDatabase().

## ◆ personCount()

eZCompany::personCount | ( |  | $id = `false` | ) |

Returns the number of persons related to this company

Definition at line 1098 of file ezcompany.php.

References $db, $id, $ID, and eZDB\globalDatabase().

## ◆ persons()

static eZCompany::persons | ( |  | $id = `false`,
|  |  | $as_object = `true`,
|  |  | $limit = `-1`,
|  |  | $offset = `0`
| ) |  |
| static

Returns an array of persons related to this company

Definition at line 1112 of file ezcompany.php.

References $db, $id, $ID, $limit, $limit_array, $offset, $ret, $row, and eZDB\globalDatabase().

Referenced by eZConsultation\findConsultationsByContact().

## ◆ phones()

& eZCompany::phones | ( |  | $companyID = `false` | ) |

Returns the phones that belong to this eZCompany object.

Definition at line 525 of file ezcompany.php.

References $db, $ID, and eZDB\globalDatabase().

## ◆ projectState()

& eZCompany::projectState | ( |  | ) |

Returns the project state of this company.

Definition at line 1018 of file ezcompany.php.

References $db, $ret, and eZDB\globalDatabase().

## ◆ removeAddresses()

eZCompany::removeAddresses | ( |  | ) |

Delete all address and the relation to the eZContact_Company

Definition at line 505 of file ezcompany.php.

References $db, $res, eZAddress\delete(), eZDB\finish(), and eZDB\globalDatabase().

## ◆ removeCategories()

eZCompany::removeCategories | ( |  | ) |

Removes the company from every user category.

Definition at line 412 of file ezcompany.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ removeImages()

eZCompany::removeImages | ( |  | ) |

Delete all images for this company.

Definition at line 711 of file ezcompany.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ removeOnlines()

eZCompany::removeOnlines | ( |  | ) |

Delete all onlines and the relation to the eZContact_Company

Definition at line 650 of file ezcompany.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ removePersons()

eZCompany::removePersons | ( |  | $companyid = `false` | ) |

Makes the person a part of the company.

Definition at line 1061 of file ezcompany.php.

References $companyid, $db, $ID, $res, eZDB\finish(), and eZDB\globalDatabase().

Referenced by delete().

## ◆ removePhones()

eZCompany::removePhones | ( |  | ) |

Delete all phones and the relation to the eZContact_Company

Definition at line 578 of file ezcompany.php.

References $db, $res, eZPhone\delete(), eZDB\finish(), and eZDB\globalDatabase().

## ◆ search()

static& eZCompany::search | ( |  | $query | ) |
| static

Henter ut alle firma i databasen som inneholder s�kestrengen.

Definition at line 386 of file ezcompany.php.

References $db, $query, and eZDB\globalDatabase().

## ◆ searchByCategory()

& eZCompany::searchByCategory | ( |  | $categoryID,
|  |  | $query
| ) |  |

Search the company database in a single category, using query as the search string in company name.

Definition at line 350 of file ezcompany.php.

References $db, $query, and eZDB\globalDatabase().

## ◆ searchByPerson()

& eZCompany::searchByPerson | ( |  | $query | ) |

Definition at line 995 of file ezcompany.php.

References $db, $query, and eZDB\globalDatabase().

## ◆ setComment()

eZCompany::setComment | ( |  | $value | ) |

Sets the comment of the company.

Definition at line 890 of file ezcompany.php.

## ◆ setCompanyImage()

eZCompany::setCompanyImage | ( | & | $image,
|  |  | $id = `false`
| ) |  |

Sets the company image for the company.

The argument must be a eZImage object.

Definition at line 818 of file ezcompany.php.

References $db, $id, $ID, $image, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ setCompanyNo()

eZCompany::setCompanyNo | ( |  | $value | ) |

Sets the contact type of the company.

Definition at line 910 of file ezcompany.php.

## ◆ setContact()

eZCompany::setContact | ( |  | $value | ) |

Set the contact for this object to $value.

Definition at line 959 of file ezcompany.php.

## ◆ setCreatorID()

eZCompany::setCreatorID | ( | & | $user | ) |

Sets the creatorID of the company.

Definition at line 898 of file ezcompany.php.

References $user, and $userID.

## ◆ setLogoImage()

eZCompany::setLogoImage | ( | & | $image,
|  |  | $id = `false`
| ) |  |

Sets the logo image for the company.

The argument must be a eZImage object.

Definition at line 749 of file ezcompany.php.

References $db, $id, $ID, $image, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ setName()

eZCompany::setName | ( |  | $value | ) |

Sets the name of the company.

Definition at line 882 of file ezcompany.php.

References Name.

## ◆ setPersonContact()

eZCompany::setPersonContact | ( |  | $value | ) |

Set the person contact for this object to $value.

Definition at line 977 of file ezcompany.php.

## ◆ setProjectState()

eZCompany::setProjectState | ( |  | $value | ) |

Returns the project state of this company.

Definition at line 1038 of file ezcompany.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ store()

eZCompany::store | ( |  | ) |

Stores a company to the database

Definition at line 75 of file ezcompany.php.

References $db, $name, $res, $type, eZDB\finish(), eZDB\globalDatabase(), and Name.

## ◆ totalViewCount()

eZCompany::totalViewCount | ( |  | ) |

Returns the total number of views for this company.

Definition at line 1180 of file ezcompany.php.

References $db, $row, and eZDB\globalDatabase().

## ◆ viewCount()

eZCompany::viewCount | ( |  | $date = `false`,
|  |  | $type = `"day"`
| ) |  |

Returns the number of views for this company on a given date or date range, default is this day. Date ranges are either "day", "month" or "year"

Definition at line 1219 of file ezcompany.php.

References $date, $day, $db, $month, $row, $type, $year, and eZDB\globalDatabase().

Referenced by yearViewCounts().

## ◆ yearViewCounts()

& eZCompany::yearViewCounts | ( |  | $year = `false` | ) |

Returns array of months in a year, where each month contains the total view count for that month. Each month is an array with these keys: count: The total count for the month month: The month number (starting at 1)

Definition at line 1195 of file ezcompany.php.

References $count, $date, $i, $month, $ret, $year, and viewCount().

## Member Data Documentation

## ◆ $Comment

eZCompany::$Comment

Definition at line 1262 of file ezcompany.php.

Referenced by comment().

## ◆ $CompanyNo

eZCompany::$CompanyNo

Definition at line 1266 of file ezcompany.php.

Referenced by companyNo().

## ◆ $ContactID

eZCompany::$ContactID

Definition at line 1264 of file ezcompany.php.

Referenced by contact().

## ◆ $ContactType

eZCompany::$ContactType

Definition at line 1267 of file ezcompany.php.

Referenced by contactType().

## ◆ $CreatorID

eZCompany::$CreatorID

Definition at line 1260 of file ezcompany.php.

Referenced by creatorID().

## ◆ $ID

eZCompany::$ID

Definition at line 1259 of file ezcompany.php.

Referenced by __construct(), addPerson(), addresses(), addViewHit(), categories(), delete(), deleteImage(), deleteLogo(), id(), onlines(), personCount(), persons(), phones(), removePersons(), setCompanyImage(), and setLogoImage().

## ◆ $Name

eZCompany::$Name

Definition at line 1261 of file ezcompany.php.

Referenced by name().

## ◆ $Online

eZCompany::$Online

Definition at line 1263 of file ezcompany.php.

## ◆ $PersonContactID

eZCompany::$PersonContactID

Definition at line 1265 of file ezcompany.php.

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

- ezcompany.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.