Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZLink Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| setType ( $type)
| type ()
| removeType ()
| update ()
| delete ()
| get ( $id)
& | getByCategory ( $id)
& | getNotAccepted ( $offset=0, $limit=30)
| unAcceptedCount ()
& | getLastTenDate ( $limit, $offset)
& | getLastTen ( $limit, $offset)
& | getQuery ( $query, $limit, $offset)
& | getQueryCount ( $query)
& | getAll ()
& | checkUrl ( $url)
| setCategoryDefinition ( $value)
| categoryDefinition ( $as_object=true)
| categories ( $as_object=true)
| setName (&$value)
| setDescription (&$value)
| setKeyWords (&$value)
| setAccepted ( $value)
| setUrl (&$value)
& | name ()
& | description ()
& | keyWords ()
& | created ()
& | modified ()
| accepted ()
& | url ()
| id ()
| setImage (&$value)
& | image ()
| deleteImage ()

## Public Attributes
| $ID
| $Name
| $Description
| $KeyWords
| $Created
| $Modified
| $Accepted
| $ImageID
| $Url
| $url_array

## Detailed Description

! eZLink The eZLink class handles URL links.

Example code:

// Create a new link and set some values.
$link = new eZLink();
$link->setName( "ZEZ website" );
$link->Description( "zez.org is a page dedicated to all kinds of computer programming." );
$link->KeyWords( "code programing c++ php sql python" );
$link->setAccepted( true );
$link->setUrl( "zez.org" );
// Store the link to the datavase.
$link->store();
// Check if the url exist in the database.
$link->checkUrl( "zez.org" );
// Get all the links in a category.
$link->getByCategory( $linkCategoryID );
// Get all the not accepted links.
$link->getNotAccepted();
eZLink
Definition: ezlink.php:65
$link
$link
Definition: ezlink/admin/attributeedit.php:49

See also
  eZLinkCategory eZHit eZQuery

Definition at line 64 of file ezlink.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructor

Definition at line 69 of file ezlink.php.

References $id, and $ID.

## Member Function Documentation

## ◆ accepted()

eZLink::accepted | ( |  | ) |

Returns true if the link is Accepted, false if not.

Definition at line 669 of file ezlink.php.

## ◆ categories()

eZLink::categories | ( |  | $as_object = `true` | ) |

Returns the categories an article is assigned to. The categories are returned as an array of eZLinkCategory objects

Definition at line 547 of file ezlink.php.

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

## ◆ categoryDefinition()

eZLink::categoryDefinition | ( |  | $as_object = `true` | ) |

Returns the link's definition category

Definition at line 519 of file ezlink.php.

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

## ◆ checkUrl()

& eZLink::checkUrl | ( |  | $url | ) |

Check if the url exists.

Definition at line 479 of file ezlink.php.

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

## ◆ created()

& eZLink::created | ( |  | ) |

Returns the date when the link was created.

Definition at line 653 of file ezlink.php.

References $Created.

## ◆ delete()

eZLink::delete | ( |  | ) |

Remove the link and the hits that belongs to the link.

Definition at line 262 of file ezlink.php.

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

## ◆ deleteImage()

eZLink::deleteImage | ( |  | ) |

Delete the current image that belong to this eZLink object.

Definition at line 727 of file ezlink.php.

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

## ◆ description()

& eZLink::description | ( |  | ) |

Returns the link description.

Definition at line 629 of file ezlink.php.

## ◆ get()

eZLink::get | ( |  | $id | ) |

Fetches out informasjon from the daatabase where ID=$id

Definition at line 284 of file ezlink.php.

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

## ◆ getAll()

& eZLink::getAll | ( |  | ) |

Fetches all the links.

Definition at line 466 of file ezlink.php.

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

## ◆ getByCategory()

& eZLink::getByCategory | ( |  | $id | ) |

Fetchs out the links where the linkcategory=$id. Fetchs only accepted links.

Definition at line 315 of file ezlink.php.

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

## ◆ getLastTen()

& eZLink::getLastTen | ( |  | $limit,
|  |  | $offset
| ) |  |

Fetches out the last teen accpeted links.

Definition at line 397 of file ezlink.php.

References $db, $limit, $link_array, $offset, and eZDB\globalDatabase().

## ◆ getLastTenDate()

& eZLink::getLastTenDate | ( |  | $limit,
|  |  | $offset
| ) |  |

Fetches out the last teen accpeted links.

Definition at line 376 of file ezlink.php.

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

## ◆ getNotAccepted()

& eZLink::getNotAccepted | ( |  | $offset = `0`,
|  |  | $limit = `30`
| ) |  |

Fetches out the links that is not accepted.

Default limit is set to 30.

Definition at line 338 of file ezlink.php.

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

## ◆ getQuery()

& eZLink::getQuery | ( |  | $query,
|  |  | $limit,
|  |  | $offset
| ) |  |

Fetches the links that matches the $query.

Default limit is set to 25.

Definition at line 414 of file ezlink.php.

References $db, $limit, $link_array, $offset, $query, $ret, and eZDB\globalDatabase().

## ◆ getQueryCount()

& eZLink::getQueryCount | ( |  | $query | ) |

Returns the total count of a query.

Definition at line 442 of file ezlink.php.

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

## ◆ id()

eZLink::id | ( |  | ) |

Returns the id of the link.

Definition at line 688 of file ezlink.php.

References $ID.

## ◆ image()

& eZLink::image | ( |  | ) |

Returns the image as a eZImage object.

false is returned if no link is assigned to the link.

Definition at line 713 of file ezlink.php.

References $ret.

## ◆ keyWords()

& eZLink::keyWords | ( |  | ) |

Returns the link keywords.

Definition at line 639 of file ezlink.php.

References $KeyWords.

## ◆ modified()

& eZLink::modified | ( |  | ) |

Returns the date when the link was modified.

Definition at line 661 of file ezlink.php.

References $Modified.

## ◆ name()

& eZLink::name | ( |  | ) |

Returns the link name.

Definition at line 619 of file ezlink.php.

References Name.

## ◆ removeType()

eZLink::removeType | ( |  | ) |

Removes the links type definition.

Definition at line 212 of file ezlink.php.

References $db, and eZDB\globalDatabase().

## ◆ setAccepted()

eZLink::setAccepted | ( |  | $value | ) |

Sets if the link is accepted, true/false.

Definition at line 600 of file ezlink.php.

## ◆ setCategoryDefinition()

eZLink::setCategoryDefinition | ( |  | $value | ) |

Set's the link's defined category. This is the main category for the link. Additional categories can be added with eZLinkCategory::addLink();

Definition at line 492 of file ezlink.php.

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

## ◆ setDescription()

eZLink::setDescription | ( | & | $value | ) |

Sets the link description

Definition at line 583 of file ezlink.php.

## ◆ setImage()

eZLink::setImage | ( | & | $value | ) |

Set an image for this category.

Definition at line 696 of file ezlink.php.

## ◆ setKeyWords()

eZLink::setKeyWords | ( | & | $value | ) |

Sets the link keywords.

Definition at line 592 of file ezlink.php.

## ◆ setName()

eZLink::setName | ( | & | $value | ) |

Sets the link name.

Definition at line 575 of file ezlink.php.

References Name.

## ◆ setType()

eZLink::setType | ( |  | $type | ) |

Sets the links type.

Definition at line 151 of file ezlink.php.

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

## ◆ setUrl()

eZLink::setUrl | ( | & | $value | ) |

Sets the link URL.

Definition at line 611 of file ezlink.php.

## ◆ store()

eZLink::store | ( |  | ) |

Stores a link to the database.

Definition at line 82 of file ezlink.php.

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

## ◆ type()

eZLink::type | ( |  | ) |

Returns the link's type.

Definition at line 192 of file ezlink.php.

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

## ◆ unAcceptedCount()

eZLink::unAcceptedCount | ( |  | ) |

Returns the total numbers of links that is not accepted.

Definition at line 360 of file ezlink.php.

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

## ◆ update()

eZLink::update | ( |  | ) |

Update to the database.

Definition at line 226 of file ezlink.php.

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

## ◆ url()

& eZLink::url | ( |  | ) |

Retruns the url of the link.

Definition at line 680 of file ezlink.php.

References $Url.

## Member Data Documentation

## ◆ $Accepted

eZLink::$Accepted

Definition at line 742 of file ezlink.php.

## ◆ $Created

eZLink::$Created

Definition at line 740 of file ezlink.php.

Referenced by created().

## ◆ $Description

eZLink::$Description

Definition at line 738 of file ezlink.php.

## ◆ $ID

eZLink::$ID

Definition at line 736 of file ezlink.php.

Referenced by __construct(), and id().

## ◆ $ImageID

eZLink::$ImageID

Definition at line 743 of file ezlink.php.

## ◆ $KeyWords

eZLink::$KeyWords

Definition at line 739 of file ezlink.php.

Referenced by keyWords().

## ◆ $Modified

eZLink::$Modified

Definition at line 741 of file ezlink.php.

Referenced by modified().

## ◆ $Name

eZLink::$Name

Definition at line 737 of file ezlink.php.

## ◆ $Url

eZLink::$Url

Definition at line 744 of file ezlink.php.

Referenced by url().

## ◆ $url_array

eZLink::$url_array

Definition at line 745 of file ezlink.php.

Referenced by checkUrl().

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

- ezlink.php

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